Package com.google.cloud.spring.logging
Interface StackdriverTraceConstants
public interface StackdriverTraceConstants
Constants for Stackdriver Trace.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the MDC parameter Micrometer is storing the span export information at.static final String
The name of the MDC parameter Micrometer is storing the span id at.static final String
The name of the MDC parameter Micrometer is storing the trace id at.static final String
The JSON field name for the service context.static final String
The JSON field name for the log level (severity).static final String
The JSON field name for the span-id.static final String
The JSON field name for the nanos of the timestamp.static final String
The JSON field name for the seconds of the timestamp.static final String
The JSON field name for the trace-id. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
SEVERITY_ATTRIBUTE
The JSON field name for the log level (severity).- See Also:
-
TIMESTAMP_SECONDS_ATTRIBUTE
The JSON field name for the seconds of the timestamp.- See Also:
-
TIMESTAMP_NANOS_ATTRIBUTE
The JSON field name for the nanos of the timestamp.- See Also:
-
SPAN_ID_ATTRIBUTE
The JSON field name for the span-id.- See Also:
-
TRACE_ID_ATTRIBUTE
The JSON field name for the trace-id.- See Also:
-
MDC_FIELD_TRACE_ID
The name of the MDC parameter Micrometer is storing the trace id at.- See Also:
-
MDC_FIELD_SPAN_ID
The name of the MDC parameter Micrometer is storing the span id at.- See Also:
-
MDC_FIELD_SPAN_EXPORT
The name of the MDC parameter Micrometer is storing the span export information at.- See Also:
-
SERVICE_CONTEXT_ATTRIBUTE
The JSON field name for the service context.- Since:
- 1.2
- See Also:
-
-
Method Details
-
composeFullTraceName
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 IDtraceId
- the trace ID- Returns:
- the trace name in the "projects/[GCP_PROJECT_ID]/trace/[TRACE_ID]" format
-