-
public final class OtelConventions
-
-
Method Summary
Modifier and Type Method Description static StringtoSpanKindTagValue(SpanKind spanKind)Convert OpenTelemetry SpanKind to SPAN_KIND value. static SpanKindtoOtelSpanKind(String spanKind)Convert SPAN_KIND value to OpenTelemetry SpanKind. static <T> booleanapplyReservedAttribute(AgentSpan span, AttributeKey<T> key, T value)Applies the reserved span attributes. static voidapplyNamingConvention(AgentSpan span)-
-
Method Detail
-
toSpanKindTagValue
static String toSpanKindTagValue(SpanKind spanKind)
Convert OpenTelemetry SpanKind to SPAN_KIND value.
- Parameters:
spanKind- The OpenTelemetry span kind to convert.
-
toOtelSpanKind
static SpanKind toOtelSpanKind(String spanKind)
Convert SPAN_KIND value to OpenTelemetry SpanKind.
- Parameters:
spanKind- The SPAN_KIND value to convert.
-
applyReservedAttribute
static <T> boolean applyReservedAttribute(AgentSpan span, AttributeKey<T> key, T value)
Applies the reserved span attributes. Only OpenTelemetry specific span attributes are handledhere, the default ones are handled by tag interceptor while setting span attributes.
- Parameters:
span- The span to apply the attributes.key- The attribute key.value- The attribute value.
-
applyNamingConvention
static void applyNamingConvention(AgentSpan span)
-
-
-
-