Class ResourceTranslator.AttributeMapping
- java.lang.Object
-
- com.google.cloud.opentelemetry.resource.ResourceTranslator.AttributeMapping
-
- Enclosing class:
- ResourceTranslator
public abstract static class ResourceTranslator.AttributeMapping extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AttributeMapping()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ResourceTranslator.AttributeMappingcreate(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey)static ResourceTranslator.AttributeMappingcreate(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey, java.lang.String fallbackLiteral)static ResourceTranslator.AttributeMappingcreate(java.lang.String labelName, java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys)static ResourceTranslator.AttributeMappingcreate(java.lang.String labelName, java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys, java.lang.String fallbackLiteral)abstract java.util.Optional<java.lang.String>fallbackLiteral()A fallback value to set the resource.voidfill(io.opentelemetry.sdk.resources.Resource resource, com.google.cloud.opentelemetry.resource.GcpResource.Builder builder)abstract java.lang.StringgetLabelName()The label name used in GCP's MonitoredResource.abstract java.util.List<io.opentelemetry.api.common.AttributeKey<?>>getOtelKeys()The list of OTEL keys that can be used for this resource label, in priority order.
-
-
-
Method Detail
-
getLabelName
public abstract java.lang.String getLabelName()
The label name used in GCP's MonitoredResource.
-
getOtelKeys
public abstract java.util.List<io.opentelemetry.api.common.AttributeKey<?>> getOtelKeys()
The list of OTEL keys that can be used for this resource label, in priority order.
-
fallbackLiteral
public abstract java.util.Optional<java.lang.String> fallbackLiteral()
A fallback value to set the resource.
-
fill
public void fill(io.opentelemetry.sdk.resources.Resource resource, com.google.cloud.opentelemetry.resource.GcpResource.Builder builder)
-
create
public static ResourceTranslator.AttributeMapping create(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey)
-
create
public static ResourceTranslator.AttributeMapping create(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey, java.lang.String fallbackLiteral)
-
create
public static ResourceTranslator.AttributeMapping create(java.lang.String labelName, java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys)
-
create
public static ResourceTranslator.AttributeMapping create(java.lang.String labelName, java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys, java.lang.String fallbackLiteral)
-
-