Package 

Class OtelConventions

    • Method Summary

      Modifier and Type Method Description
      static String toSpanKindTagValue(SpanKind spanKind) Convert OpenTelemetry SpanKind to SPAN_KIND value.
      static SpanKind toOtelSpanKind(String spanKind) Convert SPAN_KIND value to OpenTelemetry SpanKind.
      static <T> boolean applyReservedAttribute(AgentSpan span, AttributeKey<T> key, T value) Applies the reserved span attributes.
      static void applyNamingConvention(AgentSpan span)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.