Conversation
size-limit report 📦
|
AbhiPrasad
left a comment
There was a problem hiding this comment.
This is really elegant, it means we can use it with startSpan also.
| /** | ||
| * Continue a trace from a sentryTrace & baggage header. | ||
| * This method takes a sentryTrace, baggage, and an optional request, | ||
| * and will continue tracing from the context provided. | ||
| * It takes a callback that receives a transactionContext that may be used for `startTransaction` or `startSpan`. | ||
| */ | ||
| export function continueTrace<V>( |
There was a problem hiding this comment.
l: I'd add meta tags here for the backend->frontend use case.
| /** | |
| * Continue a trace from a sentryTrace & baggage header. | |
| * This method takes a sentryTrace, baggage, and an optional request, | |
| * and will continue tracing from the context provided. | |
| * It takes a callback that receives a transactionContext that may be used for `startTransaction` or `startSpan`. | |
| */ | |
| export function continueTrace<V>( | |
| /** | |
| * Continue a trace from a `sentry-trace` and `baggage` values. | |
| * These values can be obtained from incoming request headers or, in the browser, from `<meta name="sentry-trace">` and `<meta name="baggage">` HTML tags. | |
| * | |
| * This function takes a `sentry-trace`, `baggage`, and optionally, a `request` object. | |
| * It will continue tracing from the context provided. | |
| * | |
| * It takes a callback that receives a transactionContext that may be used for `startTransaction` or `startSpan`. | |
| */ | |
| export function continueTrace<V>( |
There was a problem hiding this comment.
I updated the comment to reflect this 👍
1ff8049 to
43053b7
Compare
Oops, missed that - added it to browser exports as well! |
43053b7 to
0403078
Compare
|
I am a bit in favor of removing the |
I'll remove the request then. I have no strong feelings and was also not sure. Maybe we can also streamline around just always setting |
0403078 to
a0eb998
Compare
This adds a new
continueTracemethod which can be used to continue a trace from headers.This method has the following signature:
In practice, this can be used like this:
Closes #9011