Skip to content

Add logger exception support for logs API/SDK#4908

Open
iblancasa wants to merge 3 commits intoopen-telemetry:mainfrom
iblancasa:4907
Open

Add logger exception support for logs API/SDK#4908
iblancasa wants to merge 3 commits intoopen-telemetry:mainfrom
iblancasa:4907

Conversation

@iblancasa
Copy link

Description

Fixes #4907

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added

@iblancasa iblancasa requested a review from a team as a code owner February 11, 2026 17:28
@iblancasa iblancasa marked this pull request as draft February 11, 2026 17:34
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@xrmx
Copy link
Contributor

xrmx commented Feb 12, 2026

Haven't looked in detail at the PR but we are usually cautious on adding in development stuff to the api / sdk.

@trask
Copy link
Member

trask commented Feb 13, 2026

hey @xrmx! check out open-telemetry/opentelemetry-specification#4886

if you can give this PR a basic review and "lgtm" without approving/merging it, then we can treat it as a "qualifying prototype" for marking it stable in the spec. we already have 3 qualifying prototypes which is the min bar for stabilizing the spec, but the more the better!

Copy link
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

LGTM

github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Feb 18, 2026
Fixes #4858

Implementations / Prototypes:

- Java:
[`ExtendedLogRecordBuilder.setException(Throwable)`](https://github.com/open-telemetry/opentelemetry-java/blob/main/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedLogRecordBuilder.java#L137)
- Builder method called before `emit()`
  - Merged and available to users
- .NET:
[`LogRecordAttributeList.RecordException(Exception)`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Api/Logs/LogRecordAttributeList.cs#L191-L198)
- Attribute list method called before `EmitLog()`
- JavaScript:
[opentelemetry-js#6385](open-telemetry/opentelemetry-js#6385)
- Field on LogRecord passed to `emit()`
- Python:
[opentelemetry-python#4908](open-telemetry/opentelemetry-python#4908)
- Parameter on LogRecord passed to `emit()`

(only the Python prototype doesn't yet meet the definition of
[qualifying
prototype](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change)
yet)

Co-authored-by: Robert Pająk <pellared@hotmail.com>
@xrmx
Copy link
Contributor

xrmx commented Feb 18, 2026

hey @xrmx! check out open-telemetry/opentelemetry-specification#4886

if you can give this PR a basic review and "lgtm" without approving/merging it, then we can treat it as a "qualifying prototype" for marking it stable in the spec. we already have 3 qualifying prototypes which is the min bar for stabilizing the spec, but the more the better!

Missed this comment but already approved the other PR 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

Add log exception support to Logger API/SDK

4 participants

Comments