Skip to content

Add event name and severity considerations to log-based exception events#3311

Merged
lmolkova merged 20 commits intoopen-telemetry:mainfrom
lmolkova:exception-severity
Mar 10, 2026
Merged

Add event name and severity considerations to log-based exception events#3311
lmolkova merged 20 commits intoopen-telemetry:mainfrom
lmolkova:exception-severity

Conversation

@lmolkova
Copy link
Copy Markdown
Member

@lmolkova lmolkova commented Jan 19, 2026

Fixes #3100

Extracted from open-telemetry/opentelemetry-specification#4333

Related to #3256

Summarizes guidance behind: #3414, #3426, #3435, #3436

The current guidance on recording exceptions on logs only tells how to attach exception-related details to a log record.
OTel instrumentations, when switching to log-based events from span events, would need to emit the whole record and need guidance on:

  • whether to emit log or event. This PR recommends events.
  • how to name events - use precise names like http.client.request.exception. OTel instrumentations that emit them should document them in central or instrumentation-specific docs.
  • how to set severity. This PR suggests to use Fatal or Error only when exception is not handled by application code. I.e. instrumentations that create server/consumer spans would be ones to ever use error severity. Client and producer should emit warn.

@github-actions github-actions Bot added enhancement New feature or request area:exception labels Jan 19, 2026
Comment thread .chloggen/exception-log-severity.yaml Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

This PR has been labeled as stale due to lack of activity. It will be automatically closed if there is no further activity over the next 7 days.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Feb 15, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@lmolkova lmolkova marked this pull request as ready for review February 15, 2026 20:02
@lmolkova lmolkova requested review from a team as code owners February 15, 2026 20:02
@lmolkova lmolkova moved this to In progress in Logs SIG Feb 15, 2026
@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Feb 15, 2026
@lmolkova lmolkova changed the title Add event name and severity considerations to log-based exceptions Add event name and severity considerations to log-based exception events Feb 15, 2026
Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md
Comment thread docs/exceptions/exceptions-logs.md
Comment thread docs/exceptions/exceptions-logs.md
Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md
Comment thread docs/exceptions/exceptions-logs.md
@lmolkova lmolkova force-pushed the exception-severity branch from ffd9e85 to cc641b2 Compare March 9, 2026 18:00
Comment thread docs/exceptions/exceptions-logs.md Outdated
Copy link
Copy Markdown
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be obvious, but maybe worth being explicit about capturing span context if one exists.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Comment thread docs/exceptions/exceptions-logs.md
Copy link
Copy Markdown
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏅

Comment thread docs/exceptions/exceptions-logs.md Outdated
Comment thread docs/exceptions/exceptions-logs.md Outdated
@lmolkova lmolkova enabled auto-merge March 10, 2026 22:33
@lmolkova lmolkova added this pull request to the merge queue Mar 10, 2026
Merged via the queue into open-telemetry:main with commit 897cb81 Mar 10, 2026
16 of 17 checks passed
@lmolkova lmolkova deleted the exception-severity branch March 10, 2026 22:35
@github-project-automation github-project-automation Bot moved this from In progress to Done in Logs SIG Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

[Logs] Recommend setting Severity Number

5 participants