Class ServerSpanNaming


  • public final class ServerSpanNaming
    extends Object
    Helper container for tracking whether instrumentation should update server span name or not.
    • Method Detail

      • updateServerSpanName

        public static <T> void updateServerSpanName​(io.opentelemetry.context.Context context,
                                                    ServerSpanNaming.Source source,
                                                    ServerSpanNameSupplier<T> serverSpanName,
                                                    T arg1)
        If there is a server span in the context, and the context has been customized with a ServerSpanName, then this method will update the server span name using the provided ServerSpanNameSupplier if and only if the last ServerSpanNaming.Source to update the span name using this method has strictly lower priority than the provided ServerSpanNaming.Source, and the value returned from the ServerSpanNameSupplier is non-null.

        If there is a server span in the context, and the context has NOT been customized with a ServerSpanName, then this method will update the server span name using the provided ServerSpanNameSupplier if the value returned from it is non-null.

      • updateServerSpanName

        public static <T,​U> void updateServerSpanName​(io.opentelemetry.context.Context context,
                                                            ServerSpanNaming.Source source,
                                                            ServerSpanNameTwoArgSupplier<T,​U> serverSpanName,
                                                            T arg1,
                                                            U arg2)
        If there is a server span in the context, and the context has been customized with a ServerSpanName, then this method will update the server span name using the provided ServerSpanNameTwoArgSupplier if and only if the last ServerSpanNaming.Source to update the span name using this method has strictly lower priority than the provided ServerSpanNaming.Source, and the value returned from the ServerSpanNameTwoArgSupplier is non-null.

        If there is a server span in the context, and the context has NOT been customized with a ServerSpanName, then this method will update the server span name using the provided ServerSpanNameTwoArgSupplier if the value returned from it is non-null.