Skip to content

ContinueFromHeaders should handle all combinations of sentry-trace/baggage properly #533

Open
@tonyo

Description

@tonyo

At the moment ContinueFromHeaders function doesn't handle a case properly when sentry-trace is empty, and baggage is populated with some Sentry data.
In this case, the created span should have an empty unfrozen Dynamic Sampling Context, because the current SDK will essentially become the head SDK.

Extracted from #532:

	        // TODO(anton): we should handle this case properly
		// {
		// 	// No sentry-trace, but baggage with Sentry values => this is a head SDK, so the DSC
		// 	// should be empty and unfrozen.
		// 	traceStr:   "",
		// 	baggageStr: "sentry-trace_id=d49d9bf66f13450b81f65bc51cf49c03,sentry-public_key=public,sentry-sample_rate=1",
		// 	wantSpan: Span{
		// 		isTransaction: true,
		// 		dynamicSamplingContext: DynamicSamplingContext{
		// 			Frozen: false,
		// 		},
		// 	},
		// },

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions