Class ResourceConfiguration
- java.lang.Object
-
- io.opentelemetry.sdk.autoconfigure.ResourceConfiguration
-
public final class ResourceConfiguration extends java.lang.ObjectAuto-configuration for the OpenTelemetryResource.- Since:
- 1.28.0
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringATTRIBUTE_PROPERTY(package private) static java.lang.StringDISABLED_ATTRIBUTE_KEYS(package private) static java.lang.StringEXPERIMENTAL_DISABLED_ATTRIBUTE_KEYSprivate static java.util.logging.Loggerloggerprivate static AttributeKey<java.lang.String>SERVICE_NAME(package private) static java.lang.StringSERVICE_NAME_PROPERTY
-
Constructor Summary
Constructors Modifier Constructor Description privateResourceConfiguration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static ResourceconfigureResource(ConfigProperties config, SpiHelper spiHelper, java.util.function.BiFunction<? super Resource,ConfigProperties,? extends Resource> resourceCustomizer)static ResourcecreateEnvironmentResource()Create aResourcefrom the environment.static ResourcecreateEnvironmentResource(ConfigProperties config)Create aResourcefrom the environment.(package private) static ResourcefilterAttributes(Resource resource, ConfigProperties configProperties)
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
SERVICE_NAME
private static final AttributeKey<java.lang.String> SERVICE_NAME
-
ATTRIBUTE_PROPERTY
static final java.lang.String ATTRIBUTE_PROPERTY
- See Also:
- Constant Field Values
-
SERVICE_NAME_PROPERTY
static final java.lang.String SERVICE_NAME_PROPERTY
- See Also:
- Constant Field Values
-
EXPERIMENTAL_DISABLED_ATTRIBUTE_KEYS
static final java.lang.String EXPERIMENTAL_DISABLED_ATTRIBUTE_KEYS
- See Also:
- Constant Field Values
-
DISABLED_ATTRIBUTE_KEYS
static final java.lang.String DISABLED_ATTRIBUTE_KEYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEnvironmentResource
public static 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 Resource createEnvironmentResource(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.
-
configureResource
static Resource configureResource(ConfigProperties config, SpiHelper spiHelper, java.util.function.BiFunction<? super Resource,ConfigProperties,? extends Resource> resourceCustomizer)
-
filterAttributes
static Resource filterAttributes(Resource resource, ConfigProperties configProperties)
-
-