-
Notifications
You must be signed in to change notification settings - Fork 211
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
Tracing without performance #833
Conversation
…745) * feat(tracing without performance): add propagation context to scope * remove redundant dynamic context assignment * more tests
Add ContinueTrace as a method on the hub. This is how other SDKs that have to deal with concurrency tend to do it, ie Java.
@@ -379,6 +405,31 @@ func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event { | |||
} | |||
} | |||
|
|||
// Apply the trace context to errors if there is a Span on the scope. If | |||
// there isn't then fall back to the propagation context. | |||
if event.Type != transactionType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cleptric There was a comment on old type to use this for transactions as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to throw this on all events, so check-ins, errors, transactios, etc.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #833 +/- ##
==========================================
+ Coverage 81.80% 81.92% +0.12%
==========================================
Files 50 51 +1
Lines 4436 4543 +107
==========================================
+ Hits 3629 3722 +93
- Misses 660 669 +9
- Partials 147 152 +5 ☔ View full report in Codecov by Sentry. |
@ribice can I see the code to repro this one? |
https://gist.github.com/ribice/2c583f9c1edc3084d3572e2ea5065419 |
I think your Lines 113 to 122 in 9f80641
The |
Got time to finally come back to this, made a repro on Nodejs, nothing wrong about it not being nested. But I wonder why it got the same parent span id though. It should only got 2-3 captured events Repro https://gist.github.com/aldy505/90354abc6877071dec601c8ddabca092 |
I was able to resolve it by creating a new Scope/Hub in every request. This way it generates new traceID/spanID. https://gist.github.com/ribice/2c583f9c1edc3084d3572e2ea5065419 (service1-updated.go). Not sure if this is the intended way. |
On the JS SDK, the |
Continuation from #752