Class DisabledTraceUtil
java.lang.Object
com.google.cloud.datastore.telemetry.DisabledTraceUtil
- All Implemented Interfaces:
TraceUtil
Tracing utility implementation, used to stub out tracing instrumentation when tracing is
disabled.
-
Field Summary
Fields inherited from interface com.google.cloud.datastore.telemetry.TraceUtil
ATTRIBUTE_SERVICE_PREFIX, ATTRIBUTES_KEY_DEFERRED, ATTRIBUTES_KEY_DOCUMENT_COUNT, ATTRIBUTES_KEY_MISSING, ATTRIBUTES_KEY_MORE_RESULTS, ATTRIBUTES_KEY_READ_CONSISTENCY, ATTRIBUTES_KEY_RECEIVED, ATTRIBUTES_KEY_TRANSACTION_ID, ATTRIBUTES_KEY_TRANSACTIONAL, ENABLE_TRACING_ENV_VAR, LIBRARY_NAME, SPAN_NAME_ALLOCATE_IDS, SPAN_NAME_BEGIN_TRANSACTION, SPAN_NAME_COMMIT, SPAN_NAME_LOOKUP, SPAN_NAME_RESERVE_IDS, SPAN_NAME_ROLLBACK, SPAN_NAME_RUN_AGGREGATION_QUERY, SPAN_NAME_RUN_QUERY, SPAN_NAME_TRANSACTION_COMMIT, SPAN_NAME_TRANSACTION_LOOKUP, SPAN_NAME_TRANSACTION_RUN, SPAN_NAME_TRANSACTION_RUN_AGGREGATION_QUERY, SPAN_NAME_TRANSACTION_RUN_QUERY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.api.trace.SpanBuilderaddSettingsAttributesToCurrentSpan(io.opentelemetry.api.trace.SpanBuilder spanBuilder) Adds common SpanAttributes to the current span, useful when hand-creating a new Span without using the TraceUtil.Span interface.com.google.api.core.ApiFunction<io.grpc.ManagedChannelBuilder,io.grpc.ManagedChannelBuilder> Returns a channel configurator for gRPC, ornullif tracing is disabled.Returns the current Context.Returns the current span.io.opentelemetry.api.trace.TracerReturns the current OpenTelemetry Tracer when OpenTelemetry SDK is provided.com.google.cloud.datastore.telemetry.DisabledTraceUtil.SpanStarts a new span with the given name, sets it as the current span, and returns it.startSpan(String spanName, TraceUtil.Span parentSpan) Starts a new span with the given name and the span represented by the parentSpan as its parent, sets it as the current span and returns it.
-
Constructor Details
-
DisabledTraceUtil
public DisabledTraceUtil()
-
-
Method Details
-
getChannelConfigurator
@Nullable public com.google.api.core.ApiFunction<io.grpc.ManagedChannelBuilder,io.grpc.ManagedChannelBuilder> getChannelConfigurator()Description copied from interface:TraceUtilReturns a channel configurator for gRPC, ornullif tracing is disabled.- Specified by:
getChannelConfiguratorin interfaceTraceUtil
-
startSpan
Description copied from interface:TraceUtilStarts a new span with the given name, sets it as the current span, and returns it. -
startSpan
Description copied from interface:TraceUtilStarts a new span with the given name and the span represented by the parentSpan as its parent, sets it as the current span and returns it. -
addSettingsAttributesToCurrentSpan
public io.opentelemetry.api.trace.SpanBuilder addSettingsAttributesToCurrentSpan(io.opentelemetry.api.trace.SpanBuilder spanBuilder) Description copied from interface:TraceUtilAdds common SpanAttributes to the current span, useful when hand-creating a new Span without using the TraceUtil.Span interface.- Specified by:
addSettingsAttributesToCurrentSpanin interfaceTraceUtil
-
getCurrentSpan
Description copied from interface:TraceUtilReturns the current span.- Specified by:
getCurrentSpanin interfaceTraceUtil
-
getCurrentContext
Description copied from interface:TraceUtilReturns the current Context.- Specified by:
getCurrentContextin interfaceTraceUtil
-
getTracer
public io.opentelemetry.api.trace.Tracer getTracer()Description copied from interface:TraceUtilReturns the current OpenTelemetry Tracer when OpenTelemetry SDK is provided.
-