Send feedback
Class EnabledTraceUtil (3.26.5)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.26.5 keyboard_arrow_down
public class EnabledTraceUtil implements TraceUtil
A utility class that uses OpenTelemetry for trace collection. FirestoreOpenTelemetryOptions
in
FirestoreOptions
can be used to configure its behavior.
Methods
currentContext()
public TraceUtil . Context currentContext ()
Returns the current Context.
currentSpan()
public TraceUtil . Span currentSpan ()
Returns the current span.
getChannelConfigurator()
public 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 >
getOpenTelemetry()
public OpenTelemetry getOpenTelemetry ()
Returns
Type
Description
io.opentelemetry.api.OpenTelemetry
startSpan(String spanName)
public EnabledTraceUtil . 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
Returns
Type
Description
com.google.cloud.firestore.telemetry.EnabledTraceUtil.Span
startSpan(String spanName, TraceUtil.Context parent)
public 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-11-19 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-11-19 UTC."],[],[]]