Package io.bytestreams.exchange.core
Class OTel
java.lang.Object
io.bytestreams.exchange.core.OTel
OpenTelemetry constants and helpers.
Public AttributeKey constants define the metric and span attribute names used by
channel implementations. These are the canonical keys for querying telemetry data.
The meter() and tracer() helpers delegate to GlobalOpenTelemetry.get(), which returns a no-op provider unless the OpenTelemetry SDK is
configured by the application.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIdentifies the traffic direction for a channel, used as an OTel metric attribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final Stringstatic final doublestatic final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<Long> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<String> static final io.opentelemetry.api.common.AttributeKey<Long> static final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic io.opentelemetry.api.metrics.Metermeter()Returns the defaultMeter, resolved lazily fromGlobalOpenTelemetry.static io.opentelemetry.api.trace.Tracertracer()Returns the defaultTracer, resolved lazily fromGlobalOpenTelemetry.static io.opentelemetry.api.common.AttributesReturns the given attributes with error_type added if the throwable is non-null.
-
Field Details
-
CHANNEL_ID
-
CHANNEL_TYPE
-
DIRECTION
-
ERROR_TYPE
-
MESSAGE_ID
-
MESSAGE_TYPE
-
SERVER_ADDRESS
-
SERVER_PORT
-
NETWORK_TRANSPORT
-
NETWORK_TYPE
-
NETWORK_PEER_ADDRESS
-
NETWORK_PEER_PORT
-
NANOS_PER_MS
public static final double NANOS_PER_MS- See Also:
-
NAMESPACE
- See Also:
-
UNIT_ATTEMPT
- See Also:
-
UNIT_REQUEST
- See Also:
-
-
Method Details
-
meter
public static io.opentelemetry.api.metrics.Meter meter()Returns the defaultMeter, resolved lazily fromGlobalOpenTelemetry. -
tracer
public static io.opentelemetry.api.trace.Tracer tracer()Returns the defaultTracer, resolved lazily fromGlobalOpenTelemetry. -
endSpan
-
withError
public static io.opentelemetry.api.common.Attributes withError(io.opentelemetry.api.common.Attributes attrs, Throwable error) Returns the given attributes with error_type added if the throwable is non-null.
-