Update exception recording guidelines to not use span events#3256
Merged
lmolkova merged 30 commits intoopen-telemetry:mainfrom Jan 28, 2026
Merged
Update exception recording guidelines to not use span events#3256lmolkova merged 30 commits intoopen-telemetry:mainfrom
lmolkova merged 30 commits intoopen-telemetry:mainfrom
Conversation
…cording exceptions
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenTelemetry semantic conventions to deprecate recording exceptions as span events in favor of using log records. This change aligns with OTEP 4430's Span Event API deprecation plan and provides clearer guidance on exception handling across different signals.
Key changes:
- Deprecates the
event.exceptionconvention, marking it as obsoleted with guidance to use logs instead - Updates error recording guidelines to recommend logging exceptions rather than using
Span.recordExceptionAPI - Revises the code example to demonstrate proper exception recording using logger APIs along with span status and metrics
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
model/exceptions/deprecated/events-deprecated.yaml |
Adds deprecation metadata to the exception event, marking it as obsoleted with a note to use logs |
docs/general/recording-errors.md |
Updates exception recording section to recommend logs over span events and revises the code example to demonstrate logger usage |
docs/exceptions/exceptions-spans.md |
Updates status badge from Stable to Deprecated with explanatory note |
.github/copilot-instructions.md |
Updates internal guidelines to reflect that exceptions should be recorded as log records only |
.chloggen/3256.yaml |
Adds changelog entry for the exception recording guideline update |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Liudmila Molkova <neskazu@gmail.com>
trask
reviewed
Jan 27, 2026
Member
Author
…tions into rem-span-events
trask
approved these changes
Jan 27, 2026
lmolkova
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Together with open-telemetry/opentelemetry-specification#4825
Towards OTEP: Span Event API deprecation plan
Towards open-telemetry/opentelemetry-go-contrib#8386 (merged "prototype")
Changes
Span.RecordExceptionfor error recording