Class OpenTelemetryConnection

    • Field Detail

      • OTEL_SYSTEM_PROPERTIES_MAP

        public final Map<String,​String> OTEL_SYSTEM_PROPERTIES_MAP
        Collect all otel specific system properties and cache them in a map.
    • Method Detail

      • isTurnOffTracing

        public boolean isTurnOffTracing()
      • supplier

        public static Supplier<OpenTelemetryConnection> supplier()
        Supplier to use with ConnectionProvider where lazy initialization is required.
        Returns:
        a non-null Supplier<OpenTelemetryConnection>
      • resetForTest

        public static void resetForTest()
        This is for tests to reset the static instance in-between the tests. Reset Global OpenTelemetry instances.
      • spanBuilder

        public io.opentelemetry.api.trace.SpanBuilder spanBuilder​(String spanName)
      • getTraceContext

        public <T> io.opentelemetry.context.Context getTraceContext​(T carrier,
                                                                    io.opentelemetry.context.propagation.TextMapGetter<T> textMapGetter)
        Specified by:
        getTraceContext in interface TraceContextHandler
      • getTraceContext

        public Map<String,​String> getTraceContext​(String transactionId)
        Get the trace context information for a given transaction id. This returns a 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`.
        Parameters:
        transactionId - Local transaction id
        Returns:
        Map
      • getTraceContext

        public Map<String,​String> getTraceContext​(String transactionId,
                                                        org.mule.runtime.api.component.location.ComponentLocation componentLocation)
        Get the trace context information for a given transaction id. This returns a 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`.

        Parameters:
        transactionId - Local transaction id
        componentLocation - ComponentLocation to get context for
        Returns:
        Map
      • injectTraceContext

        public <T> void injectTraceContext​(T carrier,
                                           io.opentelemetry.context.propagation.TextMapSetter<T> textMapSetter)
        Specified by:
        injectTraceContext in interface TraceContextHandler
      • invalidate

        public void invalidate()
      • get

        public io.opentelemetry.api.metrics.Meter get​(String instrumentationScopeName)
      • endProcessorSpan

        public SpanMeta endProcessorSpan​(TraceComponent traceComponent,
                                         org.mule.runtime.api.message.Error error)
      • startTransaction

        public void startTransaction​(TraceComponent traceComponent)
      • setSpanStatus

        public void setSpanStatus​(TraceComponent traceComponent,
                                  io.opentelemetry.api.trace.Span span)