Class InstrumentationLibraryInfo


  • @Immutable
    public abstract class InstrumentationLibraryInfo
    extends Object
    Holds information about the instrumentation library specified when creating an instance of Tracer using the Tracer Provider.
    • Method Detail

      • create

        public static InstrumentationLibraryInfo create​(String name,
                                                        @Nullable
                                                        String version)
        Creates a new instance of InstrumentationLibraryInfo.
        Parameters:
        name - name of the instrumentation library (e.g., "io.opentelemetry.contrib.mongodb"), must not be null
        version - version of the instrumentation library (e.g., "1.0.0"), might be null
        Returns:
        the new instance
      • empty

        public static InstrumentationLibraryInfo empty()
        Returns an "empty" InstrumentationLibraryInfo.
        Returns:
        an "empty" InstrumentationLibraryInfo.
      • getName

        public abstract String getName()
        Returns the name of the instrumentation library.
        Returns:
        the name of the instrumentation library.
      • getVersion

        @Nullable
        public abstract String getVersion()
        Returns the version of the instrumentation library, or null if not available.
        Returns:
        the version of the instrumentation library, or null if not available.