Enum HttpClientSpanKeyAttributesExtractor

java.lang.Object
java.lang.Enum<HttpClientSpanKeyAttributesExtractor>
io.opentelemetry.instrumentation.netty.common.internal.HttpClientSpanKeyAttributesExtractor
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<NettyConnectionRequest,Object>, io.opentelemetry.instrumentation.api.internal.SpanKeyProvider, Serializable, Comparable<HttpClientSpanKeyAttributesExtractor>, java.lang.constant.Constable

public enum HttpClientSpanKeyAttributesExtractor extends Enum<HttpClientSpanKeyAttributesExtractor> implements io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<NettyConnectionRequest,Object>, io.opentelemetry.instrumentation.api.internal.SpanKeyProvider
Attributes extractor that pretends it's a HttpClientAttributesExtractor so that error only CONNECT spans can be suppressed by higher level HTTP clients based on netty.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Enum Constant Details

  • Method Details

    • values

      public static HttpClientSpanKeyAttributesExtractor[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static HttpClientSpanKeyAttributesExtractor valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • onStart

      public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, NettyConnectionRequest nettyConnectionRequest)
      Specified by:
      onStart in interface io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<NettyConnectionRequest,Object>
    • onEnd

      public void onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, NettyConnectionRequest nettyConnectionRequest, @Nullable Object channel, @Nullable Throwable error)
      Specified by:
      onEnd in interface io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<NettyConnectionRequest,Object>
    • internalGetSpanKey

      public io.opentelemetry.instrumentation.api.internal.SpanKey internalGetSpanKey()
      Specified by:
      internalGetSpanKey in interface io.opentelemetry.instrumentation.api.internal.SpanKeyProvider