Package org.mockserver.telemetry
Class W3CTraceContext
java.lang.Object
org.mockserver.telemetry.W3CTraceContext
Parsed W3C traceparent header. Format: {version}-{traceId}-{parentId}-{flags}
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFlags()booleanisValid()Check structural validity: version present, traceId is 32 hex chars, parentId is 16 hex chars, flags present.static W3CTraceContextParse a W3C traceparent header value and optional tracestate header value into aW3CTraceContext.Reconstruct the traceparent header value from this context.
-
Constructor Details
-
W3CTraceContext
-
-
Method Details
-
parse
Parse a W3C traceparent header value and optional tracestate header value into aW3CTraceContext. Returns null if the traceparent is null, empty, or has fewer than 4 dash-separated parts. -
toTraceparent
Reconstruct the traceparent header value from this context. -
getVersion
-
getTraceId
-
getParentId
-
getFlags
-
getTraceState
-
isValid
public boolean isValid()Check structural validity: version present, traceId is 32 hex chars, parentId is 16 hex chars, flags present.
-