This is the default propagator for SpanContexts. The SpanContext type is
designed to support all the data propagated via W3C propagation natively.
| Modifier and Type | Field and Description |
|---|---|
| private static final List | |
| private static final W3CTraceContextPropagator | |
| private static final Logger | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| pack-priv static final String | |
| pack-priv static final String | |
| private static final char | |
| private static final int | |
| private static final int | |
| private static final Set | |
| private static final String | |
| private static final String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public <C> Context | extract(Context
the context, C Context used to store the extracted value.holds propagation fields. For example, an outgoing message or http request. carrier, TextMapGetter<C> invoked for each propagation key to get data from the carrier. getter)Implements io. Extracts data from upstream. |
| private static SpanContext | |
| private static <C> SpanContext | |
| public Collection | fields()
Implements io. The propagation fields defined. |
| public static W3CTraceContextPropagator | getInstance()
Returns a singleton instance of a |
| public <C> void | inject(Context
the context, C Context containing the value to be injected.holds propagation fields. For example, an outgoing message or http request. carrier, TextMapSetter<C> invoked for each propagation key to add or remove. setter)Implements io. Injects data for downstream consumers, for example as HTTP headers. |
| public String |
| FIELDS | back to summary |
|---|---|
| private static final List<String> FIELDS | |
| INSTANCE | back to summary |
|---|---|
| private static final W3CTraceContextPropagator INSTANCE | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| SPAN_ID_HEX_SIZE | back to summary |
|---|---|
| private static final int SPAN_ID_HEX_SIZE | |
| SPAN_ID_OFFSET | back to summary |
|---|---|
| private static final int SPAN_ID_OFFSET | |
| TRACE_ID_HEX_SIZE | back to summary |
|---|---|
| private static final int TRACE_ID_HEX_SIZE | |
| TRACE_ID_OFFSET | back to summary |
|---|---|
| private static final int TRACE_ID_OFFSET | |
| TRACE_OPTION_HEX_SIZE | back to summary |
|---|---|
| private static final int TRACE_OPTION_HEX_SIZE | |
| TRACE_OPTION_OFFSET | back to summary |
|---|---|
| private static final int TRACE_OPTION_OFFSET | |
| TRACE_PARENT | back to summary |
|---|---|
| pack-priv static final String TRACE_PARENT | |
| TRACE_STATE | back to summary |
|---|---|
| pack-priv static final String TRACE_STATE | |
| TRACEPARENT_DELIMITER | back to summary |
|---|---|
| private static final char TRACEPARENT_DELIMITER | |
| TRACEPARENT_DELIMITER_SIZE | back to summary |
|---|---|
| private static final int TRACEPARENT_DELIMITER_SIZE | |
| TRACEPARENT_HEADER_SIZE | back to summary |
|---|---|
| private static final int TRACEPARENT_HEADER_SIZE | |
| VALID_VERSIONS | back to summary |
|---|---|
| private static final Set<String> VALID_VERSIONS | |
| VERSION | back to summary |
|---|---|
| private static final String VERSION | |
| VERSION_00 | back to summary |
|---|---|
| private static final String VERSION_00 | |
| VERSION_SIZE | back to summary |
|---|---|
| private static final int VERSION_SIZE | |
| W3CTraceContextPropagator | back to summary |
|---|---|
| private W3CTraceContextPropagator() | |
| extract | back to summary |
|---|---|
| public <C> Context extract(Context context, C carrier, TextMapGetter<C> getter) Implements io. Doc from io. Extracts data from upstream. For example, from incoming http headers. The returned Context should contain the extracted data, if any, merged with the data from the passed-in Context. If the incoming information could not be parsed, implementations MUST return the original Context, unaltered.
| |
| extractContextFromTraceParent | back to summary |
|---|---|
| private static SpanContext extractContextFromTraceParent(String traceparent) | |
| extractImpl | back to summary |
|---|---|
| private static <C> SpanContext extractImpl(C carrier, TextMapGetter<C> getter) | |
| fields | back to summary |
|---|---|
| public Collection Implements io. Doc from io. The propagation fields defined. If your carrier is reused, you should delete the fields here
before calling For example, if the carrier is a single-use or immutable request object, you don't need to clear fields as they couldn't have been set before. If it is a mutable, retryable object, successive calls should clear these fields first. Some use cases for this are:
| |
| getInstance | back to summary |
|---|---|
| public static W3CTraceContextPropagator getInstance() Returns a singleton instance of a | |
| inject | back to summary |
|---|---|
| public <C> void inject(Context context, C carrier, TextMapSetter<C> setter) Implements io. Doc from io. Injects data for downstream consumers, for example as HTTP headers. The carrier may be null to
facilitate calling this method with a lambda for the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |