Interface StackdriverTraceConstants
public interface StackdriverTraceConstants
Constants for Stackdriver Trace.
Original source at: https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverTraceConstants.java
- Since:
- 3.2.0
- Author:
- João André Martins, Chengyuan Zhao, Vinicius Carvalho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the MDC parameter, Spring Sleuth is storing the span export information at.static final StringThe name of the MDC parameter, Spring Sleuth is storing the span id at.static final StringThe name of the MDC parameter, Spring Sleuth is storing the trace id at.static final StringThe JSON field name for the service context.static final StringThe JSON field name for the log level (severity).static final StringThe JSON field name for the span-id.static final StringThe JSON field name for the nanos of the timestamp.static final StringThe JSON field name for the seconds of the timestamp.static final StringThe JSON field name for the trace-id. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringcomposeFullTraceName(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
-
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
-
TRACE_ID_ATTRIBUTE
-
MDC_FIELD_TRACE_ID
The name of the MDC parameter, Spring Sleuth is storing the trace id at.- See Also:
-
MDC_FIELD_SPAN_ID
The name of the MDC parameter, Spring Sleuth is storing the span id at.- See Also:
-
MDC_FIELD_SPAN_EXPORT
The name of the MDC parameter, Spring Sleuth 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
-