Skip to content
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

Propagate sample rate in tracestate #1021

Closed
gregkalapos opened this issue Nov 10, 2020 · 0 comments · Fixed by #1147
Closed

Propagate sample rate in tracestate #1021

gregkalapos opened this issue Nov 10, 2020 · 0 comments · Fixed by #1147
Assignees
Labels
agent-dotnet enhancement New feature or request

Comments

@gregkalapos
Copy link
Contributor

Follow up to #906.

With #1020 we already mark sample rate on transactions and spans. The next step is to propagate it in the tracestate.

Spec here.

@russcam russcam self-assigned this Jan 13, 2021
@russcam russcam added agent-dotnet enhancement New feature or request labels Jan 21, 2021
russcam added a commit to russcam/apm-agent-dotnet that referenced this issue Jan 29, 2021
This commit propagates the sample rate of the
APM agent through the tracestate header, and
uses the sample rate received in incoming tracestate
as the sample rate for non-root transactions and spans.

Introduce TraceState type to model tracestate,
allowing incoming headers to be added and sample
rate to be set. Move TraceState validation from
TraceContext onto TraceState.

Obsolete TryDeserializeFromString and SerializeToString
on DistributedTracingData in favour of a method that accepts
both traceparent and tracestate, and properties that get
the traceparent and tracestate text headers, respectively.

Change Transaction and Span SampleRate to double?
to allow a value to be omitted when incoming
Trace context does not contain a tracestate header
or the header does not contain the es vendor s attribute.

Closes elastic#1021
russcam added a commit to russcam/apm-agent-dotnet that referenced this issue Feb 11, 2021
This commit propagates the sample rate of the
APM agent through the tracestate header, and
uses the sample rate received in incoming tracestate
as the sample rate for non-root transactions and spans.

Introduce TraceState type to model tracestate,
allowing incoming headers to be added and sample
rate to be set. Move TraceState validation from
TraceContext onto TraceState.

Obsolete TryDeserializeFromString and SerializeToString
on DistributedTracingData in favour of a method that accepts
both traceparent and tracestate, and properties that get
the traceparent and tracestate text headers, respectively.

Change Transaction and Span SampleRate to double?
to allow a value to be omitted when incoming
Trace context does not contain a tracestate header
or the header does not contain the es vendor s attribute.

Closes elastic#1021
russcam added a commit that referenced this issue Mar 26, 2021
This commit propagates the sample rate of the
APM agent through the tracestate header, and
uses the sample rate received in incoming tracestate
as the sample rate for non-root transactions and spans.

Introduce TraceState type to model tracestate,
allowing incoming headers to be added and sample
rate to be set. Move TraceState validation from
TraceContext onto TraceState.

Change Transaction and Span SampleRate to double?
to allow a value to be omitted when incoming
Trace context does not contain a tracestate header
or the header does not contain the es vendor s attribute for
a non-root transaction.

When an activity is created when a transaction is started, use the tracestate
from the activity, if present, but set the sample rate from the sampler and
mutate tracestate if the es vendor is present. A transaction created without
explicitly passed DistributedTracingData is considered to be a root transaction,
so the sample rate is governed by the sampler.

Closes #1021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-dotnet enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants