Class EnvironmentResource


  • public final class EnvironmentResource
    extends Object
    Factory for a Resource which parses the standard "otel.resource.attributes" system property or OTEL_RESOURCE_ATTRIBUTES environment variable. Will also use OTEL_SERVICE_NAME/otel.service.name to specifically set the service name.
    • Method Detail

      • get

        public static io.opentelemetry.sdk.resources.Resource get()
        Returns a Resource which contains information from the standard "otel.resource.attributes"/"otel.service.name" system properties or OTEL_RESOURCE_ATTRIBUTES/OTEL_SERVICE_NAME environment variables.