Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add attributes argument to recordException API #5333

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

brianphillips
Copy link

(This change was originally introduced in #4071 but subsequently reverted in #4137)

Co-authored-by: Marc Pichler [email protected]

Which problem is this PR solving?

Adds the optional attributes argument to the recordException API.

Fixes #4070 (again)

Short description of the changes

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

  • packages/opentelemetry-sdk-trace-base/test/common/Span.test.ts

Checklist:

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

@brianphillips brianphillips requested a review from a team as a code owner January 11, 2025 23:46
@brianphillips brianphillips force-pushed the attrs-in-record-exception branch from bab99f3 to f72fbb3 Compare January 11, 2025 23:48
api/src/trace/span.ts Outdated Show resolved Hide resolved
This clarifies the `recordException` method signature, cleans up the
logic sequence and avoids an extra invocation of
`sanitizeAttributes(...)`.

 See [this
comment](https://github.com/open-telemetry/opentelemetry-js/pull/5333/files#r1926210496)
for context

Co-authored-by: Godfrey Chan <[email protected]>
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.

recordException should allow additional attributes
3 participants