-
-
Notifications
You must be signed in to change notification settings - Fork 461
feat: Allow Hybrid SDK to setTrace
#4137
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
Changes from 29 commits
c233756
d0f9805
c124eb1
ac7be23
46039a5
14ab70e
4a94bdd
ef20aae
461aa8a
b95088c
19c0eaa
d7316ea
3d99e63
b427553
82deae2
4152092
2af13de
cba1f4c
05147f9
cbe837c
9a10493
a589c3d
093e907
0682748
dc0a6d5
7447f11
68fea13
31c6718
2243841
d9d43ee
f8f097a
e6a7438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,19 @@ public static PropagationContext fromHeaders( | |
| sentryTraceHeader.isSampled()); | ||
| } | ||
|
|
||
| public static @NotNull PropagationContext fromExistingTrace( | ||
| final @NotNull String traceId, | ||
| final @NotNull String spanId, | ||
| final @Nullable Double decisionSampleRate, | ||
| final @Nullable Double decisionSampleRand) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add an optional
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see the need or benefit of doing that from the Unity SDK's perspective. @krystofwoldrich would this help RN?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the moment, I don't see why we would need Baggage synced as well.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we pass replayId via baggage to downstream services
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need that because the ReplayID is generated on native and synced up to RN Replay Integration which adds it to DSC. The traceID is the opposite, hybrid (RN) generates it and we need to sync it down to native. |
||
| return new PropagationContext( | ||
| new SentryId(traceId), | ||
| new SpanId(), | ||
| new SpanId(spanId), | ||
| TracingUtils.ensureBaggage(null, null, decisionSampleRate, decisionSampleRand), | ||
| null); | ||
| } | ||
|
|
||
| private @NotNull SentryId traceId; | ||
| private @NotNull SpanId spanId; | ||
| private @Nullable SpanId parentSpanId; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.