public class OpenTelemetryConnection extends Object implements TraceContextHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenTelemetryConnection.HashMapTextMapSetter |
| Modifier and Type | Method and Description |
|---|---|
static Optional<OpenTelemetryConnection> |
get() |
static OpenTelemetryConnection |
getInstance(OpenTelemetryConfigWrapper openTelemetryConfigWrapper) |
Map<String,String> |
getTraceContext(String transactionId)
Get the trace context information for a given transaction id.
|
<T> io.opentelemetry.context.Context |
getTraceContext(T carrier,
io.opentelemetry.context.propagation.TextMapGetter<T> textMapGetter) |
TransactionStore |
getTransactionStore() |
<T> void |
injectTraceContext(T carrier,
io.opentelemetry.context.propagation.TextMapSetter<T> textMapSetter) |
void |
invalidate() |
io.opentelemetry.api.trace.SpanBuilder |
spanBuilder(String spanName) |
public static Optional<OpenTelemetryConnection> get()
public static OpenTelemetryConnection getInstance(OpenTelemetryConfigWrapper openTelemetryConfigWrapper)
public io.opentelemetry.api.trace.SpanBuilder spanBuilder(String spanName)
public <T> io.opentelemetry.context.Context getTraceContext(T carrier,
io.opentelemetry.context.propagation.TextMapGetter<T> textMapGetter)
getTraceContext in interface TraceContextHandlerpublic Map<String,String> getTraceContext(String transactionId)
Map with
at least one entry with key TransactionStore.TRACE_TRANSACTION_ID and
transactionId as value.
The other entries in the map depends on the propagator used.
For W3C Trace Context Propagator, it can contain entries for `traceparent`
and optionally `tracestate`.transactionId - Local transaction idpublic <T> void injectTraceContext(T carrier,
io.opentelemetry.context.propagation.TextMapSetter<T> textMapSetter)
injectTraceContext in interface TraceContextHandlerpublic TransactionStore getTransactionStore()
public void invalidate()
Copyright © 2022 AVIO Consulting. All rights reserved.