Problem Statement
A new option called Tracing has been added in Cloudflare Wrangler types v5:
export interface Tracing {
enterSpan<T, A extends unknown[]>(
name: string,
callback: (span: Span, ...args: A) => T,
...args: A
): T;
startActiveSpan<T, A extends unknown[]>(
name: string,
callback: (span: Span, ...args: A) => T,
...args: A
): T;
Span: typeof Span;
}
export declare abstract class Span {
get isTraced(): boolean;
setAttribute(key: string, value?: boolean | number | string): void;
end(): void;
}
This will be added when tracing has been enabled by the wrangler config. When tracesSampleRate is set to 0 the Error triggered from Sentry has no trace id. When there is a trace drain from Cloudflare to Sentry then this error won't be attached properly. It'd work when the Error/Event would have a trace id attached.
Solution Brainstorm
Based on the the type there is no trace id, so let's see if there is any way to retrieve it, or only Tailworker have access to it (since they have a SpanContext attached in their type
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Problem Statement
A new option called
Tracinghas been added in Cloudflare Wrangler types v5:This will be added when tracing has been enabled by the wrangler config. When
tracesSampleRateis set to 0 the Error triggered from Sentry has no trace id. When there is a trace drain from Cloudflare to Sentry then this error won't be attached properly. It'd work when the Error/Event would have a trace id attached.Solution Brainstorm
Based on the the type there is no trace id, so let's see if there is any way to retrieve it, or only Tailworker have access to it (since they have a
SpanContextattached in their typeAdditional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.