Class TraceConfiguration


  • @Immutable
    public abstract class TraceConfiguration
    extends java.lang.Object
    Configurations for TraceExporter.
    • Method Detail

      • getCredentials

        @Nullable
        public abstract com.google.auth.Credentials getCredentials()
        Returns the Credentials.
        Returns:
        the Credentials.
      • getProjectId

        public abstract java.lang.String getProjectId()
        Returns the cloud project id.
        Returns:
        the cloud project id.
      • getTraceServiceStub

        @Nullable
        @Deprecated
        public abstract com.google.cloud.trace.v2.stub.TraceServiceStub getTraceServiceStub()
        Deprecated.
        Returns a TraceServiceStub instance used to make RPC calls.
        Returns:
        the trace service stub.
      • getTraceServiceEndpoint

        @Nullable
        public abstract java.lang.String getTraceServiceEndpoint()
        Returns the endpoint where to write traces.

        The default is tracing.googleapis.com:443

      • getFixedAttributes

        public abstract java.util.Map<java.lang.String,​com.google.devtools.cloudtrace.v2.AttributeValue> getFixedAttributes()
        Returns a map of attributes that is added to all the exported spans.
        Returns:
        the map of attributes that is added to all the exported spans.
      • getAttributeMapping

        public abstract com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> getAttributeMapping()
        Returns a map of attribute renames that will be applied to all attributes of exported spans.
        Returns:
        A map of OTEL name to GCP name for spans.
      • getDeadline

        public abstract java.time.Duration getDeadline()
        Returns the deadline for exporting to Trace backend.

        Default value is 10 seconds.

        Returns:
        the export deadline.