Class InstrumenterUtil

java.lang.Object
io.opentelemetry.instrumentation.api.internal.InstrumenterUtil

public final class InstrumenterUtil extends Object
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Method Details

    • setInstrumenterAccess

      public static void setInstrumenterAccess(InstrumenterAccess instrumenterAccess)
    • setInstrumenterBuilderAccess

      public static void setInstrumenterBuilderAccess(InstrumenterBuilderAccess instrumenterBuilderAccess)
    • startAndEnd

      public static <REQUEST, RESPONSE> io.opentelemetry.context.Context startAndEnd(Instrumenter<REQUEST,RESPONSE> instrumenter, io.opentelemetry.context.Context parentContext, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error, Instant startTime, Instant endTime)
    • suppressSpan

      public static <REQUEST, RESPONSE> io.opentelemetry.context.Context suppressSpan(Instrumenter<REQUEST,RESPONSE> instrumenter, io.opentelemetry.context.Context parentContext, REQUEST request)
    • suppressSpan

      public static <REQUEST, RESPONSE> io.opentelemetry.context.Context suppressSpan(Instrumenter<REQUEST,RESPONSE> instrumenter, io.opentelemetry.context.Context parentContext, io.opentelemetry.api.trace.SpanKind spanKind)
    • buildUpstreamInstrumenter

      public static <REQUEST, RESPONSE> Instrumenter<REQUEST,RESPONSE> buildUpstreamInstrumenter(InstrumenterBuilder<REQUEST,RESPONSE> builder, io.opentelemetry.context.propagation.TextMapGetter<REQUEST> getter, SpanKindExtractor<REQUEST> spanKindExtractor)
    • buildDownstreamInstrumenter

      public static <REQUEST, RESPONSE> Instrumenter<REQUEST,RESPONSE> buildDownstreamInstrumenter(InstrumenterBuilder<REQUEST,RESPONSE> builder, io.opentelemetry.context.propagation.TextMapSetter<REQUEST> setter, SpanKindExtractor<REQUEST> spanKindExtractor)
    • propagateOperationListenersToOnEnd

      @CanIgnoreReturnValue public static <REQUEST, RESPONSE> InstrumenterBuilder<REQUEST,RESPONSE> propagateOperationListenersToOnEnd(InstrumenterBuilder<REQUEST,RESPONSE> builder)
    • convertSpanStatusExtractor

      public static <REQUESTFROM, RESPONSEFROM, REQUESTTO, RESPONSETO> UnaryOperator<SpanStatusExtractor<REQUESTTO,RESPONSETO>> convertSpanStatusExtractor(UnaryOperator<SpanStatusExtractor<REQUESTFROM,RESPONSEFROM>> extractor, Function<REQUESTFROM,REQUESTTO> requestConverter, Function<RESPONSEFROM,RESPONSETO> responseConverter, Function<REQUESTTO,REQUESTFROM> requestReverseConverter, Function<RESPONSETO,RESPONSEFROM> responseReverseConverter)
    • convertSpanNameExtractor

      public static <REQUESTFROM, REQUESTTO> UnaryOperator<SpanNameExtractor<REQUESTTO>> convertSpanNameExtractor(UnaryOperator<SpanNameExtractor<REQUESTFROM>> extractor, Function<REQUESTFROM,REQUESTTO> requestConverter, Function<REQUESTTO,REQUESTFROM> requestReverseConverter)
    • convertAttributesExtractor

      public static <REQUESTFROM, RESPONSEFROM, REQUESTTO, RESPONSETO> AttributesExtractor<REQUESTTO,RESPONSETO> convertAttributesExtractor(AttributesExtractor<REQUESTFROM,RESPONSEFROM> extractor, Function<REQUESTTO,REQUESTFROM> requestConverter, Function<RESPONSETO,RESPONSEFROM> responseConverter)