Package com.google.api.gax.tracing
Class SpanName
java.lang.Object
com.google.api.gax.tracing.SpanName
@BetaApi("Surface for tracing is not yet stable")
@InternalApi("For google-cloud-java client use only")
public abstract class SpanName
extends Object
A value class to represent the name of the operation in an
ApiTracer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringThe name of the client. ie BigtableDataabstract StringThe name of the logical operation being traced. ie.static SpanNameof(ApiTracerContext apiTracerContext) Returns a newSpanNameparsed from the givenApiTracerContextstatic SpanNameCreates a new instance of the name.toString()
-
Constructor Details
-
SpanName
public SpanName()
-
-
Method Details
-
of
Creates a new instance of the name.- Parameters:
clientName- The name of the client. In general this will be GAPIC generated client name. However, in some cases, when the GAPIC generated client is wrapped, this will be overridden to specify the manually written wrapper's name.methodName- The name of the logical operation being traced.
-
of
Returns a newSpanNameparsed from the givenApiTracerContextThis is extracted from
ApiTracerContext.fullMethodName()using theFULL_METHOD_NAME_REGEX- If
fullMethodName()is "google.pubsub.v1.Publisher/Publish", the client name is "Publisher". - If
fullMethodName()is "google.pubsub.v1.Publisher/Publish", the base method name is "Publish".
- Returns:
- a new
SpanNamewith the parsed client name and method name
- If
-
getClientName
The name of the client. ie BigtableData -
getMethodName
The name of the logical operation being traced. ie. ReadRows. -
toString
-