Class ResourceConfiguration

java.lang.Object
io.opentelemetry.sdk.autoconfigure.ResourceConfiguration

public final class ResourceConfiguration extends Object
Auto-configuration for the OpenTelemetry Resource.
Since:
1.28.0
  • Method Details

    • createEnvironmentResource

      public static io.opentelemetry.sdk.resources.Resource createEnvironmentResource()
      Create a Resource from the environment. The resource contains attributes parsed from environment variables and system property keys otel.resource.attributes and otel.service.name.
      Returns:
      the resource.
    • createEnvironmentResource

      public static io.opentelemetry.sdk.resources.Resource createEnvironmentResource(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config)
      Create a Resource from the environment. The resource contains attributes parsed from environment variables and system property keys otel.resource.attributes and otel.service.name.
      Parameters:
      config - the ConfigProperties used to obtain resource properties
      Returns:
      the resource.