Class ServletSpanNaming
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.servlet.ServletSpanNaming
-
public class ServletSpanNaming extends Object
Helper container for tracking whether servlet integration should update server span name or not.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.opentelemetry.context.Contextinit(io.opentelemetry.context.Context context)static voidsetServletUpdatedServerSpanName(io.opentelemetry.context.Context context)Indicate that the servlet integration has updated the name for the server span.static booleanshouldUpdateServerSpanName(io.opentelemetry.context.Context context)Returns true, if servlet integration should update server span name.
-
-
-
Method Detail
-
init
public static io.opentelemetry.context.Context init(io.opentelemetry.context.Context context)
-
shouldUpdateServerSpanName
public static boolean shouldUpdateServerSpanName(io.opentelemetry.context.Context context)
Returns true, if servlet integration should update server span name. After server span name has been updated withsetServletUpdatedServerSpanNamethis method will returnfalse.- Parameters:
context- server context- Returns:
true, if the server span name should be updated by servlet integration, orfalseotherwise.
-
setServletUpdatedServerSpanName
public static void setServletUpdatedServerSpanName(io.opentelemetry.context.Context context)
Indicate that the servlet integration has updated the name for the server span.- Parameters:
context- server context
-
-