Class CloudTraceContext

java.lang.Object
com.google.apphosting.api.CloudTraceContext

public class CloudTraceContext extends Object
Stores tracing context including IDs and settings.
  • Constructor Details

    • CloudTraceContext

      public CloudTraceContext(byte[] traceId, long spanId, long traceMask)
      Create a new context with the given parameters.
      Parameters:
      traceId - id of the trace.
      spanId - current span id.
      traceMask - trace options.
    • CloudTraceContext

      public CloudTraceContext(byte[] traceId, long parentSpanId, long spanId, long traceMask)
      Create a new context with the given parameters.
      Parameters:
      traceId - id of the trace.
      parentSpanId - parent span id.
      spanId - current span id.
      traceMask - trace options.
  • Method Details

    • createChildContext

      public CloudTraceContext createChildContext()
      Creates a child context of the current context.
    • getTraceId

      public byte[] getTraceId()
    • getParentSpanId

      public long getParentSpanId()
    • getSpanId

      public long getSpanId()
    • getTraceMask

      public long getTraceMask()
    • isTraceEnabled

      public boolean isTraceEnabled()