Class ResourceConfiguration
java.lang.Object
io.opentelemetry.sdk.autoconfigure.ResourceConfiguration
Auto-configuration for the OpenTelemetry
Resource.- Since:
- 1.28.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.sdk.resources.ResourceCreate aResourcefrom the environment.static io.opentelemetry.sdk.resources.ResourcecreateEnvironmentResource(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config) Create aResourcefrom the environment.
-
Method Details
-
createEnvironmentResource
public static io.opentelemetry.sdk.resources.Resource createEnvironmentResource()Create aResourcefrom the environment. The resource contains attributes parsed from environment variables and system property keysotel.resource.attributesandotel.service.name.- Returns:
- the resource.
-
createEnvironmentResource
public static io.opentelemetry.sdk.resources.Resource createEnvironmentResource(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config) Create aResourcefrom the environment. The resource contains attributes parsed from environment variables and system property keysotel.resource.attributesandotel.service.name.- Parameters:
config- theConfigPropertiesused to obtain resource properties- Returns:
- the resource.
-