-
public abstract class PropagationTagsEncapsulates logic related to the Service Propagation including:
- parsing and validation the x-datadog-tags header value - dropping non _dd.p.* tags - error handling and propagation - concurrent updates to the sampling priority - producing the x-datadog-tags header value - producing meta tags to be sent to the agent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPropagationTags.HeaderTypepublic interfacePropagationTags.Factory
-
Method Summary
Modifier and Type Method Description static PropagationTags.Factoryfactory(Config config)static PropagationTags.Factoryfactory(int datadogTagsLimit)static PropagationTags.Factoryfactory()abstract voidupdateTraceSamplingPriority(int samplingPriority, int samplingMechanism)Updates the trace-level sampling priority decision if it hasn't already been made and _dd.p.dmtag doesn't exist. abstract intgetSamplingPriority()abstract voidupdateTraceOrigin(CharSequence origin)abstract CharSequencegetOrigin()abstract longgetTraceIdHighOrderBits()abstract voidupdateTraceIdHighOrderBits(long highOrderBits)abstract StringgetRumSessionId()abstract voidupdateRumSessionId(String sessionId)abstract StringgetW3CTracestate()Gets the original W3Ctracestate header value. abstract voidupdateW3CTracestate(String tracestate)Stores the original W3Ctracestate header value. abstract StringheaderValue(PropagationTags.HeaderType headerType)Constructs a header value that includes valid propagated _dd.p.* tags and possibly a newsampling decision tag _dd.p.dm based on the current state. abstract voidfillTagMap(Map<String, String> tagMap)Fills a provided tagMap with valid propagated _dd.p.* tags and possibly a new sampling decisiontags _dd.p.dm (root span only) based on the current state, or sets only an error tag if theheader value exceeds a configured limit. HashMap<String, String>createTagMap()-
-
Method Detail
-
factory
static PropagationTags.Factory factory(Config config)
-
factory
static PropagationTags.Factory factory(int datadogTagsLimit)
-
factory
static PropagationTags.Factory factory()
-
updateTraceSamplingPriority
abstract void updateTraceSamplingPriority(int samplingPriority, int samplingMechanism)
Updates the trace-level sampling priority decision if it hasn't already been made and _dd.p.dmtag doesn't exist. Called on the root span context.
-
getSamplingPriority
abstract int getSamplingPriority()
-
updateTraceOrigin
abstract void updateTraceOrigin(CharSequence origin)
-
getOrigin
abstract CharSequence getOrigin()
-
getTraceIdHighOrderBits
abstract long getTraceIdHighOrderBits()
-
updateTraceIdHighOrderBits
abstract void updateTraceIdHighOrderBits(long highOrderBits)
-
getRumSessionId
abstract String getRumSessionId()
-
updateRumSessionId
abstract void updateRumSessionId(String sessionId)
-
getW3CTracestate
abstract String getW3CTracestate()
Gets the original W3Ctracestate header value.
-
updateW3CTracestate
abstract void updateW3CTracestate(String tracestate)
Stores the original W3Ctracestate header value.
- Parameters:
tracestate- The original W3C tracestate header value.
-
headerValue
abstract String headerValue(PropagationTags.HeaderType headerType)
Constructs a header value that includes valid propagated _dd.p.* tags and possibly a newsampling decision tag _dd.p.dm based on the current state. Returns null if the value lengthexceeds a configured limit or empty.
-
fillTagMap
abstract void fillTagMap(Map<String, String> tagMap)
Fills a provided tagMap with valid propagated _dd.p.* tags and possibly a new sampling decisiontags _dd.p.dm (root span only) based on the current state, or sets only an error tag if theheader value exceeds a configured limit.
-
createTagMap
HashMap<String, String> createTagMap()
-
-
-
-