Send feedback
Interface TraceUtil (3.30.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.30.0 keyboard_arrow_down
public interface TraceUtil
A utility interface for trace collection. Classes that implement this interface may make their
own design choices for how they approach trace collection. For instance, they may be no-op, or
they may use a particular tracing framework such as OpenTelemetry.
Static Fields
ATTRIBUTE_KEY_ATTEMPT
public static final String ATTRIBUTE_KEY_ATTEMPT
Field Value
Type
Description
String
ATTRIBUTE_KEY_ATTEMPTS_ALLOWED
public static final String ATTRIBUTE_KEY_ATTEMPTS_ALLOWED
Field Value
Type
Description
String
ATTRIBUTE_KEY_ATTEMPTS_REMAINING
public static final String ATTRIBUTE_KEY_ATTEMPTS_REMAINING
Field Value
Type
Description
String
ATTRIBUTE_KEY_DOC_COUNT
public static final String ATTRIBUTE_KEY_DOC_COUNT
Field Value
Type
Description
String
ATTRIBUTE_KEY_IS_RETRY_WITH_CURSOR
public static final String ATTRIBUTE_KEY_IS_RETRY_WITH_CURSOR
Field Value
Type
Description
String
ATTRIBUTE_KEY_IS_TRANSACTIONAL
public static final String ATTRIBUTE_KEY_IS_TRANSACTIONAL
Field Value
Type
Description
String
ATTRIBUTE_KEY_NUM_RESPONSES
public static final String ATTRIBUTE_KEY_NUM_RESPONSES
Field Value
Type
Description
String
ATTRIBUTE_KEY_TRANSACTION_TYPE
public static final String ATTRIBUTE_KEY_TRANSACTION_TYPE
Field Value
Type
Description
String
ATTRIBUTE_SERVICE_PREFIX
public static final String ATTRIBUTE_SERVICE_PREFIX
Field Value
Type
Description
String
ENABLE_TRACING_ENV_VAR
public static final String ENABLE_TRACING_ENV_VAR
Field Value
Type
Description
String
LIBRARY_NAME
public static final String LIBRARY_NAME
Field Value
Type
Description
String
Static Methods
getInstance(FirestoreOptions firestoreOptions)
public static TraceUtil getInstance ( FirestoreOptions firestoreOptions )
Creates and returns an instance of the TraceUtil class.
Parameter
Name
Description
firestoreOptions
FirestoreOptions
The FirestoreOptions object that is requesting an instance of
TraceUtil.
Returns
Type
Description
TraceUtil
An instance of the TraceUtil class.
Methods
currentContext()
public abstract TraceUtil . Context currentContext ()
Returns the current Context.
currentSpan()
public abstract TraceUtil . Span currentSpan ()
Returns the current span.
getChannelConfigurator()
public abstract ApiFunction<ManagedChannelBuilder , ManagedChannelBuilder > getChannelConfigurator ()
Returns a channel configurator for gRPC, or null
if tracing is disabled.
Returns
Type
Description
ApiFunction <io.grpc.ManagedChannelBuilder ,io.grpc.ManagedChannelBuilder >
startSpan(String spanName)
public abstract TraceUtil . Span startSpan ( String spanName )
Starts a new span with the given name, sets it as the current span, and returns it.
Parameter
Name
Description
spanName
String
startSpan(String spanName, TraceUtil.Context parent)
public abstract TraceUtil . Span startSpan ( String spanName , TraceUtil . Context parent )
Starts a new span with the given name and the given context as its parent, sets it as the
current span, and returns it.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-18 UTC."],[],[]]