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.ObjectHolds 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 InstrumentationScopeInfoEMPTY
-
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 InstrumentationScopeInfoBuilderbuilder(java.lang.String name)Returns abuilderfor aInstrumentationScopeInfo.static InstrumentationScopeInfocreate(java.lang.String name)Creates a new instance ofInstrumentationScopeInfo.static InstrumentationScopeInfocreate(java.lang.String name, java.lang.String version, java.lang.String schemaUrl)Deprecated.Usebuilder(String)orcreate(String).(package private) static InstrumentationScopeInfocreate(java.lang.String name, java.lang.String version, java.lang.String schemaUrl, Attributes attributes)static InstrumentationScopeInfoempty()Returns an "empty"InstrumentationScopeInfo.abstract AttributesgetAttributes()Returns the attributes of this instrumentation scope.abstract java.lang.StringgetName()Returns the name of the instrumentation scope.abstract java.lang.StringgetSchemaUrl()Returns the URL of the schema used by this instrumentation scope, ornullif not available.abstract java.lang.StringgetVersion()Returns the version of the instrumentation scope, ornullif 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 abuilderfor 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, ornullif not available.
-
getSchemaUrl
@Nullable public abstract java.lang.String getSchemaUrl()
Returns the URL of the schema used by this instrumentation scope, ornullif not available.
-
getAttributes
public abstract Attributes getAttributes()
Returns the attributes of this instrumentation scope.- Since:
- 1.18.0
-
-