Conversation
Lms24
commented
Jan 19, 2024
Lms24
commented
Jan 19, 2024
Contributor
size-limit report 📦
|
261cd89 to
74460e2
Compare
Lms24
commented
Jan 23, 2024
packages/core/src/tracing/span.ts
Outdated
Comment on lines
+136
to
+140
| this._attributes = { | ||
| [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanContext.origin || 'manual', | ||
| [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, | ||
| ...spanContext.attributes, | ||
| }; |
Member
Author
There was a problem hiding this comment.
I simplified the _attributes setting logic here to handle precedences correctly if origin or op are defined via spanContext.attributes. In case both, attributes and top level op/origin are defined, attributes take precedence.
mydea
reviewed
Jan 23, 2024
packages/core/src/tracing/span.ts
Outdated
| this.instrumenter = spanContext.instrumenter || 'sentry'; | ||
|
|
||
| this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanContext.origin || 'manual'); | ||
| this._attributes = dropUndefinedKeys({ |
Member
There was a problem hiding this comment.
l: IMHO we can just use this.setAttributes() here, that handles not setting undefined values under the hood anyhow?
mydea
reviewed
Jan 23, 2024
packages/core/src/tracing/trace.ts
Outdated
| /** | ||
| * The origin of the span - if it comes from auto instrumentation or manual instrumentation. | ||
| * | ||
| * @deprecated Set `attributes['sentry.origin']` instead. |
Member
There was a problem hiding this comment.
l: Should we reference the semantic attribute const here instead? Is probably a bit safer..?
Member
Author
There was a problem hiding this comment.
ah right, we export them. Sure, will do!
mydea
approved these changes
Jan 23, 2024
18f1f11 to
30d5ce4
Compare
…attribute partial fix more tests simplify ctor logic dropUndefinedKeys remove stronger typing of `SpanAttributes` review suggestions more replacements fix import
b05313a to
7bfdf80
Compare
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.
To remove ambiguity and normalization logic in v8, we should only set the origin as an attribute, not as a top level option in the new
startSpanAPIs.