Package io.opentelemetry.sdk.common
Class InstrumentationScopeInfo
java.lang.Object
io.opentelemetry.sdk.common.InstrumentationScopeInfo
Holds information about instrumentation scope.
Instrumentation scope is a logical unit of the application code with which emitted telemetry is associated. The most common approach is to use the instrumentation library as the scope, however other scopes are also common, e.g. a module, a package, or a class may be chosen as the instrumentation scope.
-
Method Summary
Modifier and TypeMethodDescriptionReturns abuilder
for aInstrumentationScopeInfo
.static InstrumentationScopeInfo
Creates a new instance ofInstrumentationScopeInfo
.static InstrumentationScopeInfo
Deprecated.static InstrumentationScopeInfo
empty()
Returns an "empty"InstrumentationScopeInfo
.abstract io.opentelemetry.api.common.Attributes
Returns the attributes of this instrumentation scope.abstract String
getName()
Returns the name of the instrumentation scope.abstract String
Returns the URL of the schema used by this instrumentation scope, ornull
if not available.abstract String
Returns the version of the instrumentation scope, ornull
if not available.
-
Method Details
-
create
Creates a new instance ofInstrumentationScopeInfo
. -
create
@Deprecated public static InstrumentationScopeInfo create(String name, @Nullable String version, @Nullable String schemaUrl) Deprecated.Usebuilder(String)
orcreate(String)
.Creates a new instance ofInstrumentationScopeInfo
. -
builder
Returns abuilder
for aInstrumentationScopeInfo
.- Since:
- 1.18.0
-
empty
Returns an "empty"InstrumentationScopeInfo
. -
getName
Returns the name of the instrumentation scope. -
getVersion
Returns the version of the instrumentation scope, ornull
if not available. -
getSchemaUrl
Returns the URL of the schema used by this instrumentation scope, ornull
if not available. -
getAttributes
public abstract io.opentelemetry.api.common.Attributes getAttributes()Returns the attributes of this instrumentation scope.- Since:
- 1.18.0
-
builder(String)
orcreate(String)
.