Interface StackdriverTraceConstants


public interface StackdriverTraceConstants
Constants for Stackdriver Trace.
  • Field Details

    • SEVERITY_ATTRIBUTE

      static final String SEVERITY_ATTRIBUTE
      The JSON field name for the log level (severity).
      See Also:
    • TIMESTAMP_SECONDS_ATTRIBUTE

      static final String TIMESTAMP_SECONDS_ATTRIBUTE
      The JSON field name for the seconds of the timestamp.
      See Also:
    • TIMESTAMP_NANOS_ATTRIBUTE

      static final String TIMESTAMP_NANOS_ATTRIBUTE
      The JSON field name for the nanos of the timestamp.
      See Also:
    • SPAN_ID_ATTRIBUTE

      static final String SPAN_ID_ATTRIBUTE
      The JSON field name for the span-id.
      See Also:
    • TRACE_ID_ATTRIBUTE

      static final String TRACE_ID_ATTRIBUTE
      The JSON field name for the trace-id.
      See Also:
    • MDC_FIELD_TRACE_ID

      static final String MDC_FIELD_TRACE_ID
      The name of the MDC parameter Micrometer is storing the trace id at.
      See Also:
    • MDC_FIELD_SPAN_ID

      static final String MDC_FIELD_SPAN_ID
      The name of the MDC parameter Micrometer is storing the span id at.
      See Also:
    • MDC_FIELD_SPAN_EXPORT

      static final String MDC_FIELD_SPAN_EXPORT
      The name of the MDC parameter Micrometer is storing the span export information at.
      See Also:
    • SERVICE_CONTEXT_ATTRIBUTE

      static final String SERVICE_CONTEXT_ATTRIBUTE
      The JSON field name for the service context.
      Since:
      1.2
      See Also:
  • Method Details

    • composeFullTraceName

      static String composeFullTraceName(String projectId, String traceId)
      Composes the full trace name as expected by the Google Developers Console log viewer, to enable trace correlation with log entries.
      Parameters:
      projectId - the GCP project ID
      traceId - the trace ID
      Returns:
      the trace name in the "projects/[GCP_PROJECT_ID]/trace/[TRACE_ID]" format