Class ServerSpanNaming
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.servlet.ServerSpanNaming
-
public final class ServerSpanNaming extends Object
Helper container for tracking whether instrumentation should update server span name or not.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerSpanNaming.Source
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static io.opentelemetry.context.Contextinit(io.opentelemetry.context.Context context, ServerSpanNaming.Source initialSource)static voidupdateServerSpanName(io.opentelemetry.context.Context context, ServerSpanNaming.Source source, Supplier<String> serverSpanName)If there is a server span in the context, andinit(Context, Source)has been called to populate aServerSpanNameinto the context, then this method will update the server span name using the providedSupplierif and only if the lastServerSpanNaming.Sourceto update the span name using this method has strictly lower priority than the providedServerSpanNaming.Source, and the value returned from theSupplieris non-null.static voidupdateSource(io.opentelemetry.context.Context context, ServerSpanNaming.Source source)Deprecated.
-
-
-
Method Detail
-
init
public static io.opentelemetry.context.Context init(io.opentelemetry.context.Context context, ServerSpanNaming.Source initialSource)
-
updateServerSpanName
public static void updateServerSpanName(io.opentelemetry.context.Context context, ServerSpanNaming.Source source, Supplier<String> serverSpanName)If there is a server span in the context, andinit(Context, Source)has been called to populate aServerSpanNameinto the context, then this method will update the server span name using the providedSupplierif and only if the lastServerSpanNaming.Sourceto update the span name using this method has strictly lower priority than the providedServerSpanNaming.Source, and the value returned from theSupplieris non-null.If there is a server span in the context, and
init(Context, Source)has NOT been called to populate aServerSpanNameinto the context, then this method will update the server span name using the providedSupplierif the value returned from it is non-null.
-
updateSource
@Deprecated public static void updateSource(io.opentelemetry.context.Context context, ServerSpanNaming.Source source)
Deprecated.
-
-