Class ApiTracerContext

java.lang.Object
com.google.api.gax.tracing.ApiTracerContext

@InternalApi public abstract class ApiTracerContext extends Object
A context object that contains information used to infer attributes that are common for all ApiTracers.

For internal use only.

  • Constructor Details

    • ApiTracerContext

      public ApiTracerContext()
  • Method Details

    • serverPort

      @Nullable public abstract Integer serverPort()
      Returns the server port of the RPC.

      Example: 1337. This maps to the server.port attribute.

      Returns:
      the server port, or null if not set
    • operationType

      @Nullable public abstract ApiTracerFactory.OperationType operationType()
      Returns the type of operation the ApiTracer is tracing.
      Returns:
      the operation type, or null if not set
    • serviceName

      @Nullable public abstract String serviceName()
      The service name of a client (e.g. "bigtable", "spanner").
    • urlDomain

      @Nullable public abstract String urlDomain()
      The url domain of the request (e.g. "pubsub.googleapis.com").
    • urlTemplate

      @Nullable public abstract String urlTemplate()
      The url template of the request (e.g. /v1/{name}:access).
    • getAttemptAttributes

      public Map<String,Object> getAttemptAttributes()
      Returns:
      a map of attributes to be included in attempt-level spans
    • empty

      public static ApiTracerContext empty()
    • newBuilder

      public static ApiTracerContext.Builder newBuilder()
    • toBuilder

      public abstract ApiTracerContext.Builder toBuilder()