Class TraceConfiguration
- java.lang.Object
-
- com.google.cloud.opentelemetry.trace.TraceConfiguration
-
@Immutable public abstract class TraceConfiguration extends java.lang.ObjectConfigurations forTraceExporter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTraceConfiguration.BuilderBuilder forTraceConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TraceConfiguration.Builderbuilder()Returns a newTraceConfiguration.Builder.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.abstract com.google.auth.CredentialsgetCredentials()Returns theCredentials.abstract java.time.DurationgetDeadline()Returns the deadline for exporting to Trace backend.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.abstract java.lang.StringgetProjectId()Returns the cloud project id.abstract java.lang.StringgetTraceServiceEndpoint()Returns the endpoint where to write traces.abstract com.google.cloud.trace.v2.stub.TraceServiceStubgetTraceServiceStub()Deprecated.
-
-
-
Method Detail
-
getCredentials
@Nullable public abstract com.google.auth.Credentials getCredentials()
Returns theCredentials.- 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.
-
builder
public static TraceConfiguration.Builder builder()
Returns a newTraceConfiguration.Builder.- Returns:
- a
Builder.
-
-