Change trace related log fields in adservice
This commit is contained in:
parent
7d0b45d6c8
commit
bc422cc4f7
1 changed files with 5 additions and 9 deletions
|
@ -3,17 +3,13 @@
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="STDOUT" target="SYSTEM_OUT">
|
<Console name="STDOUT" target="SYSTEM_OUT">
|
||||||
|
|
||||||
<!-- This is a JSON format that can be read by the Stackdriver Logging agent. The trace ID,
|
<!-- This is a JSON appender adds additional fields to logs for logs-traces correlation:
|
||||||
span ID, sampling decision, and timestamp are interpreted by Stackdriver. It uses the
|
trace ID, span ID, and flag showing sampling decision. -->
|
||||||
special JSON keys that the Stackdriver Logging agent converts to "trace", "spanId",
|
|
||||||
"traceSampled", and "timestamp" in the Stackdriver LogEntry
|
|
||||||
(https://cloud.google.com/logging/docs/agent/configuration#special-fields). -->
|
|
||||||
|
|
||||||
<JsonLayout compact="true" eventEol="true">
|
<JsonLayout compact="true" eventEol="true">
|
||||||
<KeyValuePair key="logging.googleapis.com/trace" value="$${ctx:traceId}"/>
|
<KeyValuePair key="trace_id" value="$${ctx:traceId}"/>
|
||||||
<KeyValuePair key="logging.googleapis.com/spanId" value="$${ctx:spanId}"/>
|
<KeyValuePair key="span_id" value="$${ctx:spanId}"/>
|
||||||
<KeyValuePair key="logging.googleapis.com/traceSampled" value="$${ctx:traceSampled}"/>
|
<KeyValuePair key="trace_sampled" value="$${ctx:traceSampled}"/>
|
||||||
<KeyValuePair key="time" value="$${date:yyyy-MM-dd}T$${date:HH:mm:ss.SSS}Z"/>
|
|
||||||
</JsonLayout>
|
</JsonLayout>
|
||||||
|
|
||||||
</Console>
|
</Console>
|
||||||
|
|
Loading…
Add table
Reference in a new issue