Interface Telemetry

  • All Known Implementing Classes:
    SimpleTelemetry

    @ContainerProvided
    public interface Telemetry
    Provides access to W3C Trace Context propagation information for the currently active span of a connector step, allowing connectors to correlate outbound calls with the process execution's distributed trace.
    • Method Detail

      • getTraceParent

        String getTraceParent()
        Returns the W3C traceparent value for the currently active span, or null if no valid span is active.

        Example usage, setting a single header on an outgoing request:

        
         String traceParent = telemetry.getTraceParent();
         if (traceParent != null) {
             httpRequest.setHeader("traceparent", traceParent);
         }
         
        Returns:
        the traceparent value for the currently active span, or null if no valid span is active
      • getTraceState

        String getTraceState()
        Returns the W3C tracestate value for the currently active span, or null if no valid span is active.

        Example usage, setting a single header on an outgoing request:

        
         String traceState = telemetry.getTraceState();
         if (traceState != null) {
             httpRequest.setHeader("tracestate", traceState);
         }
         
        Returns:
        the tracestate value for the currently active span, or null if no valid span is active