Skip to content

fix(otel): record full error message on standard exception event in otel v2#30380

Merged
yassin-berriai merged 1 commit into
litellm_internal_stagingfrom
litellm_fix_guardrail_response
Jun 13, 2026
Merged

fix(otel): record full error message on standard exception event in otel v2#30380
yassin-berriai merged 1 commit into
litellm_internal_stagingfrom
litellm_fix_guardrail_response

Conversation

@yassin-berriai

Copy link
Copy Markdown
Contributor

Relevant issues

Error messages emitted by the OpenTelemetry v2 integration are truncated downstream. Reported via EAIP-2334; the root cause analysis there is that the backend (Elasticsearch) applies a dynamic index field-type mapping that converts the error message field from string to keyword, and keyword defaults to ignore_above: 1024, so anything past 1024 chars is dropped

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Ran the proxy with otel v2 + the console exporter (LITELLM_OTEL_V2=true OTEL_EXPORTER=console), pointing a model at a dead endpoint so the call fails and the v2 failure path emits the LLM-call span.

Config used:

model_list:
  - model_name: broken-model
    litellm_params:
      model: openai/gpt-4o-mini
      api_key: sk-fake-key
      api_base: http://127.0.0.1:9/v1
litellm_settings:
  callbacks: ["otel"]
general_settings:
  master_key: sk-1234

Request:

curl -s http://127.0.0.1:4000/v1/chat/completions \
  -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
  -d '{"model":"broken-model","messages":[{"role":"user","content":"hi"}]}'

Before the fix, the emitted chat broken-model span carried the message only in the status description; its event list was empty, so the only place the message lived was a field a backend dynamic-maps to a truncating keyword:

"status": {
    "status_code": "ERROR",
    "description": "litellm.InternalServerError: InternalServerError: OpenAIException - Connection error."
},
"error.type": "InternalServerError"
"events": []

After the fix, the same span carries the full message on the standard exception event under exception.message (recognized semconv field, mapped as full text), while error.type stays a low-cardinality attribute:

"error.type": "InternalServerError"
"events": [
    {
        "name": "exception",
        "attributes": {
            "exception.type": "InternalServerError",
            "exception.message": "litellm.InternalServerError: InternalServerError: OpenAIException - Connection error."
        }
    }
]

Type

🐛 Bug Fix

Changes

The v2 span engine (emitter.py) previously stamped only error.type and put the message into the span status description; it never recorded the standard OTel exception event that v1 emits via record_exception. A non-semconv field name (e.g. error_message) falls into the backend's default dynamic template, which maps strings to a keyword capped at ignore_above: 1024 and truncates them.

finish_span now also records the standard exception span event carrying exception.type and the full exception.message, so the message rides a recognized semantic-convention field that backends map as full text rather than a truncated keyword. Added ExceptionEvent semconv constants and a regression test asserting a 5000-char message survives intact on the event (and that success spans record no exception event)


Generated by Claude Code

…tel v2

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yassin-berriai

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes truncation of OTel v2 error messages by adding a standard exception span event carrying exception.message and exception.type on the error path in emitter.py. Previously, the message lived only in the span status description and as a bare string attribute; backends like Elasticsearch dynamic-map such attributes as keyword fields capped at 1024 characters.

  • semconv.py gains an ExceptionEvent constant class with the standard exception.* OTel attribute keys (NAME, TYPE, MESSAGE).
  • emitter.py calls span.add_event() with those semconv keys when a span error is present, so the full message rides a recognized field that backends map as full text.
  • Two new in-memory-exporter regression tests assert a 5000-char message survives intact on the event and that success spans emit no exception event.

Confidence Score: 5/5

Additive-only change to the OTel v2 error path; no existing attributes or status fields are removed, and the new event is skipped entirely on the success path.

The change is narrowly scoped to finish_span's error branch: it adds one span.add_event() call using standard OTel semconv constants and leaves every existing attribute and status field intact. The two new tests exercise both the error and success code paths with an in-memory exporter and make no real network calls.

No files require special attention.

Important Files Changed

Filename Overview
litellm/integrations/otel/emitter.py Adds a standard OTel exception span event carrying exception.type and exception.message on the error path; refactors two repeated expressions into named variables. No existing behaviour changed.
litellm/integrations/otel/model/semconv.py Adds ExceptionEvent semconv constant class (NAME, TYPE, MESSAGE), matching standard OTel exception.* attribute keys. Clean additive change.
tests/test_litellm/integrations/otel/test_otel_v2_components.py Adds two new regression tests and two helper functions. Tests use the in-memory exporter only (no real network calls), covering both the long-message survival path and the no-event-on-success path.

Reviews (2): Last reviewed commit: "fix(otel): record full error message on ..." | Re-trigger Greptile

@yassin-berriai yassin-berriai marked this pull request as ready for review June 13, 2026 16:54
@yassin-berriai yassin-berriai enabled auto-merge (squash) June 13, 2026 17:51
@yassin-berriai yassin-berriai merged commit 3b84150 into litellm_internal_staging Jun 13, 2026
118 of 119 checks passed
@yassin-berriai yassin-berriai deleted the litellm_fix_guardrail_response branch June 13, 2026 18:42
michaelxer pushed a commit to michaelxer/litellm that referenced this pull request Jun 17, 2026
…tel v2 (BerriAI#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
michaelxer pushed a commit to michaelxer/litellm that referenced this pull request Jun 17, 2026
…tel v2 (BerriAI#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
koladefaj pushed a commit to koladefaj/litellm that referenced this pull request Jun 17, 2026
…tel v2 (BerriAI#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
yuneng-berri pushed a commit that referenced this pull request Jun 18, 2026
…tel v2 (#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 3b84150)
yuneng-berri added a commit that referenced this pull request Jun 18, 2026
chore(release): backport #30380, #30503, #30558, #30130, #30588, #30495, #30690 to stable/1.89.x and cut 1.89.2
factnn pushed a commit to factnn/litellm that referenced this pull request Jun 18, 2026
…tel v2 (BerriAI#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request Jun 18, 2026
….2) (#327)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | patch | `v1.89.1` → `v1.89.2` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.89.2`](https://github.com/BerriAI/litellm/releases/tag/v1.89.2)

[Compare Source](BerriAI/litellm@v1.89.2...v1.89.2)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.89.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(ui): rebuild ui by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30703](BerriAI/litellm#30703)
- chore(release): backport [#&#8203;30380](BerriAI/litellm#30380), [#&#8203;30503](BerriAI/litellm#30503), [#&#8203;30558](BerriAI/litellm#30558), [#&#8203;30130](BerriAI/litellm#30130), [#&#8203;30588](BerriAI/litellm#30588), [#&#8203;30495](BerriAI/litellm#30495), [#&#8203;30690](BerriAI/litellm#30690) to stable/1.89.x and cut 1.89.2 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30681](BerriAI/litellm#30681)

**Full Changelog**: <BerriAI/litellm@v1.89.1...v1.89.2>

### [`v1.89.2`](https://github.com/BerriAI/litellm/releases/tag/v1.89.2)

[Compare Source](BerriAI/litellm@v1.89.1...v1.89.2)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.89.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(ui): rebuild ui by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30703](BerriAI/litellm#30703)
- chore(release): backport [#&#8203;30380](BerriAI/litellm#30380), [#&#8203;30503](BerriAI/litellm#30503), [#&#8203;30558](BerriAI/litellm#30558), [#&#8203;30130](BerriAI/litellm#30130), [#&#8203;30588](BerriAI/litellm#30588), [#&#8203;30495](BerriAI/litellm#30495), [#&#8203;30690](BerriAI/litellm#30690) to stable/1.89.x and cut 1.89.2 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30681](BerriAI/litellm#30681)

**Full Changelog**: <BerriAI/litellm@v1.89.1...v1.89.2>

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/327
blake-hamm added a commit to blake-hamm/bhamm-lab that referenced this pull request Jun 19, 2026
…to v1.89.2 (#206)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [https://github.com/BerriAI/litellm.git](https://github.com/BerriAI/litellm) | patch | `v1.89.1` → `v1.89.2` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (https://github.com/BerriAI/litellm.git)</summary>

### [`v1.89.2`](https://github.com/BerriAI/litellm/releases/tag/v1.89.2)

[Compare Source](BerriAI/litellm@v1.89.1...v1.89.2)

#### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.89.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

#### What's Changed

- chore(ui): rebuild ui by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30703](BerriAI/litellm#30703)
- chore(release): backport [#&#8203;30380](BerriAI/litellm#30380), [#&#8203;30503](BerriAI/litellm#30503), [#&#8203;30558](BerriAI/litellm#30558), [#&#8203;30130](BerriAI/litellm#30130), [#&#8203;30588](BerriAI/litellm#30588), [#&#8203;30495](BerriAI/litellm#30495), [#&#8203;30690](BerriAI/litellm#30690) to stable/1.89.x and cut 1.89.2 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30681](BerriAI/litellm#30681)

**Full Changelog**: <BerriAI/litellm@v1.89.1...v1.89.2>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Renovate Bot <renovate@bhamm-lab.com>
Reviewed-on: https://codeberg.org/blake-hamm/bhamm-lab/pulls/206
hbjydev pushed a commit to hbjydev/phoebe that referenced this pull request Jun 19, 2026
….2) (#143)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | patch | `v1.89.1` → `v1.89.2` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.89.2`](https://github.com/BerriAI/litellm/releases/tag/v1.89.2)

[Compare Source](BerriAI/litellm@v1.89.2...v1.89.2)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.89.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(ui): rebuild ui by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30703](BerriAI/litellm#30703)
- chore(release): backport [#&#8203;30380](BerriAI/litellm#30380), [#&#8203;30503](BerriAI/litellm#30503), [#&#8203;30558](BerriAI/litellm#30558), [#&#8203;30130](BerriAI/litellm#30130), [#&#8203;30588](BerriAI/litellm#30588), [#&#8203;30495](BerriAI/litellm#30495), [#&#8203;30690](BerriAI/litellm#30690) to stable/1.89.x and cut 1.89.2 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30681](BerriAI/litellm#30681)

**Full Changelog**: <BerriAI/litellm@v1.89.1...v1.89.2>

### [`v1.89.2`](https://github.com/BerriAI/litellm/releases/tag/v1.89.2)

[Compare Source](BerriAI/litellm@v1.89.1...v1.89.2)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.89.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.89.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(ui): rebuild ui by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30703](BerriAI/litellm#30703)
- chore(release): backport [#&#8203;30380](BerriAI/litellm#30380), [#&#8203;30503](BerriAI/litellm#30503), [#&#8203;30558](BerriAI/litellm#30558), [#&#8203;30130](BerriAI/litellm#30130), [#&#8203;30588](BerriAI/litellm#30588), [#&#8203;30495](BerriAI/litellm#30495), [#&#8203;30690](BerriAI/litellm#30690) to stable/1.89.x and cut 1.89.2 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;30681](BerriAI/litellm#30681)

**Full Changelog**: <BerriAI/litellm@v1.89.1...v1.89.2>

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/London)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzIuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIzMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://forgejo.hayden.moe/hayden/phoebe/pulls/143
marioleonardo pushed a commit to marioleonardo/litellm-mongodb-patched that referenced this pull request Jun 19, 2026
…tel v2 (BerriAI#30380)

The v2 span engine only stamped error.type and stuffed the message into the
span status description; it never recorded the standard OTel exception event.
Backends that dynamic-map unknown string fields (e.g. Elasticsearch) index the
message as a keyword capped at ignore_above:1024, truncating it. Emit the full
message under the recognized exception.message semconv field via a span event so
it is mapped as full text instead.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 3b84150)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants