Class EnvironmentResourceContributor
java.lang.Object
io.arconia.opentelemetry.autoconfigure.resource.contributor.EnvironmentResourceContributor
- All Implemented Interfaces:
ResourceContributor
@Incubating(since="0.5.0")
public final class EnvironmentResourceContributor
extends Object
implements ResourceContributor
A
ResourceContributor that contributes attributes from the Spring environment and configuration properties,
following the OpenTelemetry Semantic Conventions.
The following attributes are populated:
service.nameservice.namespaceservice.instance.idwebengine.namewebengine.version
Furthermore, any additional attributes defined in the OpenTelemetryResourceProperties are also populated.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentResourceContributor(org.springframework.core.env.Environment environment, OpenTelemetryResourceProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidcontribute(io.opentelemetry.sdk.resources.ResourceBuilder builder)
-
Field Details
-
SERVICE_INSTANCE_ID
-
SERVICE_NAMESPACE
-
WEBENGINE_NAME
-
WEBENGINE_VERSION
-
-
Constructor Details
-
EnvironmentResourceContributor
public EnvironmentResourceContributor(org.springframework.core.env.Environment environment, OpenTelemetryResourceProperties properties)
-
-
Method Details
-
contribute
public void contribute(io.opentelemetry.sdk.resources.ResourceBuilder builder) - Specified by:
contributein interfaceResourceContributor
-