Package io.opentelemetry.sdk.common
Class InstrumentationScopeInfo
- java.lang.Object
-
- io.opentelemetry.sdk.common.InstrumentationScopeInfo
-
- Direct Known Subclasses:
AutoValue_InstrumentationScopeInfo
@Immutable public abstract class InstrumentationScopeInfo extends java.lang.Object
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.
-
-
Field Summary
Fields Modifier and Type Field Description private static InstrumentationScopeInfo
EMPTY
-
Constructor Summary
Constructors Constructor Description InstrumentationScopeInfo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static InstrumentationScopeInfoBuilder
builder(java.lang.String name)
Returns abuilder
for aInstrumentationScopeInfo
.static InstrumentationScopeInfo
create(java.lang.String name)
Creates a new instance ofInstrumentationScopeInfo
.static InstrumentationScopeInfo
create(java.lang.String name, java.lang.String version, java.lang.String schemaUrl)
Deprecated.Usebuilder(String)
orcreate(String)
.(package private) static InstrumentationScopeInfo
create(java.lang.String name, java.lang.String version, java.lang.String schemaUrl, Attributes attributes)
static InstrumentationScopeInfo
empty()
Returns an "empty"InstrumentationScopeInfo
.abstract Attributes
getAttributes()
Returns the attributes of this instrumentation scope.abstract java.lang.String
getName()
Returns the name of the instrumentation scope.abstract java.lang.String
getSchemaUrl()
Returns the URL of the schema used by this instrumentation scope, ornull
if not available.abstract java.lang.String
getVersion()
Returns the version of the instrumentation scope, ornull
if not available.
-
-
-
Field Detail
-
EMPTY
private static final InstrumentationScopeInfo EMPTY
-
-
Method Detail
-
create
public static InstrumentationScopeInfo create(java.lang.String name)
Creates a new instance ofInstrumentationScopeInfo
.
-
create
@Deprecated public static InstrumentationScopeInfo create(java.lang.String name, @Nullable java.lang.String version, @Nullable java.lang.String schemaUrl)
Deprecated.Usebuilder(String)
orcreate(String)
.Creates a new instance ofInstrumentationScopeInfo
.
-
create
static InstrumentationScopeInfo create(java.lang.String name, @Nullable java.lang.String version, @Nullable java.lang.String schemaUrl, Attributes attributes)
-
builder
public static InstrumentationScopeInfoBuilder builder(java.lang.String name)
Returns abuilder
for aInstrumentationScopeInfo
.- Since:
- 1.18.0
-
empty
public static InstrumentationScopeInfo empty()
Returns an "empty"InstrumentationScopeInfo
.
-
getName
public abstract java.lang.String getName()
Returns the name of the instrumentation scope.
-
getVersion
@Nullable public abstract java.lang.String getVersion()
Returns the version of the instrumentation scope, ornull
if not available.
-
getSchemaUrl
@Nullable public abstract java.lang.String getSchemaUrl()
Returns the URL of the schema used by this instrumentation scope, ornull
if not available.
-
getAttributes
public abstract Attributes getAttributes()
Returns the attributes of this instrumentation scope.- Since:
- 1.18.0
-
-