Class ResourceTranslator.AttributeMapping

  • Enclosing class:
    ResourceTranslator

    public abstract static class ResourceTranslator.AttributeMapping
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static ResourceTranslator.AttributeMapping create​(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey)  
      static ResourceTranslator.AttributeMapping create​(java.lang.String labelName, io.opentelemetry.api.common.AttributeKey<?> otelKey, java.lang.String fallbackLiteral)  
      static ResourceTranslator.AttributeMapping create​(java.lang.String labelName, java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys)  
      static ResourceTranslator.AttributeMapping create​(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.
      void fill​(io.opentelemetry.sdk.resources.Resource resource, com.google.cloud.opentelemetry.resource.GcpResource.Builder builder)  
      abstract java.lang.String getLabelName()
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeMapping

        public AttributeMapping()
    • 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,
                                                                 java.lang.String fallbackLiteral)
      • create

        public static ResourceTranslator.AttributeMapping create​(java.lang.String labelName,
                                                                 java.util.List<io.opentelemetry.api.common.AttributeKey<?>> otelKeys,
                                                                 java.lang.String fallbackLiteral)