You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When None, no activity would be created, use this when we do not want to record the activity
When AllDataAndRecorded, activity would be created and all data(propagation data and other properties such as Links, Tags, and Events) would be recorded and should be recorded in the tracing system, when we want to log data in the tracing system, use this one
When PropagationData, activity would be created and only Id(including ParentId/TraceId/SpanId)/Name/Source would have value, when we try to use it for logging, prefer this than others
When AllData, it likes the AllDataAndRecorded, but the recorded flag would be false, and would not be recorded in the tracing system
Is this correct? and when should we consider using the ActivitySamplingResult.AllData?
when should we consider using the ActivitySamplingResult.AllData
You may look at OpenTelemetry IsRecording. The definition there applies exactly to ActivitySamplingResult.AllData.
Note, don't get confused with the names between .NET and OpenTelemetry. In .NET when having ActivitySamplingResult.AllData the created Activity object will have Activity.IsAllDataRequested = true and this will get mapped to OpenTelemetry Span.IsRecording.
And in .NET Activity.Recorded means in this activity the W3C trace context sampling flag will be set to allow out of proc sampling. OpenTelemetry uses this for sampling too. The names can be confusion because Activity.Recorded is introduced long before OpenTelemetry and other specs. Activity.Recorded will be true if we have ActivitySamplingResult.AllDataAndRecorded
I am closing this issue but feel free to respond with more questions if you have any.
Activity
tarekgh commentedon Aug 24, 2023
Yes.
You may look at OpenTelemetry IsRecording. The definition there applies exactly to
ActivitySamplingResult.AllData.Note, don't get confused with the names between .NET and OpenTelemetry. In .NET when having
ActivitySamplingResult.AllDatathe created Activity object will haveActivity.IsAllDataRequested = trueand this will get mapped to OpenTelemetrySpan.IsRecording.And in .NET
Activity.Recordedmeans in this activity the W3C trace context sampling flag will be set to allow out of proc sampling. OpenTelemetry uses this for sampling too. The names can be confusion becauseActivity.Recordedis introduced long before OpenTelemetry and other specs.Activity.Recordedwill be true if we haveActivitySamplingResult.AllDataAndRecordedI am closing this issue but feel free to respond with more questions if you have any.
WeihanLi commentedon Aug 25, 2023
@tarekgh thanks very much