Package io.opentelemetry.sdk.common
Class InstrumentationLibraryInfo
java.lang.Object
io.opentelemetry.sdk.common.InstrumentationLibraryInfo
Holds information about the instrumentation library specified when creating an instance of
Tracer using the Tracer Provider.-
Method Summary
Modifier and TypeMethodDescriptionstatic InstrumentationLibraryInfoCreates a new instance ofInstrumentationLibraryInfo.static InstrumentationLibraryInfoCreates a new instance ofInstrumentationLibraryInfo.static InstrumentationLibraryInfoempty()Returns an "empty"InstrumentationLibraryInfo.abstract StringgetName()Returns the name of the instrumentation library.abstract StringReturns the URL of the schema used by this instrumentation library, ornullif not available.abstract StringReturns the version of the instrumentation library, ornullif not available.
-
Method Details
-
create
Creates a new instance ofInstrumentationLibraryInfo.- Parameters:
name- name of the instrumentation library (e.g., "io.opentelemetry.contrib.mongodb"), must not be nullversion- version of the instrumentation library (e.g., "1.0.0"), might be null- Returns:
- the new instance
-
create
public static InstrumentationLibraryInfo create(String name, @Nullable String version, @Nullable String schemaUrl) Creates a new instance ofInstrumentationLibraryInfo.- Parameters:
name- name of the instrumentation library (e.g., "io.opentelemetry.contrib.mongodb"), must not be nullversion- version of the instrumentation library (e.g., "1.0.0"), might be nullschemaUrl- the URL of the OpenTelemetry schema being used by this instrumentation library.- Returns:
- the new instance
- Since:
- 1.4.0
-
empty
Returns an "empty"InstrumentationLibraryInfo.- Returns:
- an "empty"
InstrumentationLibraryInfo.
-
getName
Returns the name of the instrumentation library.- Returns:
- the name of the instrumentation library.
-
getVersion
Returns the version of the instrumentation library, ornullif not available.- Returns:
- the version of the instrumentation library, or
nullif not available.
-
getSchemaUrl
Returns the URL of the schema used by this instrumentation library, ornullif not available.- Returns:
- the URL of the schema used by this instrumentation library, or
nullif not available.
-