1
1
# Trace Context in non-OTLP Log Formats
2
2
3
- ** Status** : [ Development ] ( ../document-status.md )
3
+ ** Status** : [ Stable ] ( ../document-status.md )
4
4
5
5
<details >
6
6
<summary >Table of Contents</summary >
@@ -24,8 +24,8 @@ representing [trace context](../logs/data-model.md#trace-context-fields). This
24
24
document defines how trace context should be recorded in non-OTLP Log Formats.
25
25
To summarize, the following field names should be used in legacy formats:
26
26
27
- - "trace_id" for [ TraceId] ( ../logs/data-model.md#field-traceid ) , hex-encoded.
28
- - "span_id" for [ SpanId] ( ../logs/data-model.md#field-spanid ) , hex-encoded.
27
+ - "trace_id" for [ TraceId] ( ../logs/data-model.md#field-traceid ) , lowercase and hex-encoded.
28
+ - "span_id" for [ SpanId] ( ../logs/data-model.md#field-spanid ) , lowercase and hex-encoded.
29
29
- "trace_flags" for [ trace flags] ( ../logs/data-model.md#field-traceflags ) , formatted
30
30
according to W3C traceflags format.
31
31
@@ -39,7 +39,7 @@ Trace id, span id and traceflags SHOULD be recorded via SD-ID "opentelemetry".
39
39
For example:
40
40
41
41
```
42
- [opentelemetry trace_id="102981ABCD2901 " span_id="abcdef1010" trace_flags="01"]
42
+ [opentelemetry trace_id="102981abcd2901 " span_id="abcdef1010" trace_flags="01"]
43
43
```
44
44
45
45
### Plain Text Formats
@@ -48,7 +48,7 @@ The fields SHOULD be recorded according to the customary approach used for a
48
48
particular format (e.g. field: value format for LTSV). For example:
49
49
50
50
```
51
- host:192.168.0.1<TAB>trace_id:102981ABCD2901 <TAB>span_id:abcdef1010<TAB>time:[01/Jan/2010:10:11:23 -0400]<TAB>req:GET /health HTTP/1.0<TAB>status:200
51
+ host:192.168.0.1<TAB>trace_id:102981abcd2901 <TAB>span_id:abcdef1010<TAB>time:[01/Jan/2010:10:11:23 -0400]<TAB>req:GET /health HTTP/1.0<TAB>status:200
52
52
```
53
53
54
54
### JSON Formats
@@ -59,7 +59,7 @@ The fields SHOULD be recorded as top-level fields in the JSON structure. For exa
59
59
{
60
60
"timestamp" :1581385157.14429 ,
61
61
"body" :" Incoming request" ,
62
- "trace_id" :" 102981ABCD2901 " ,
62
+ "trace_id" :" 102981abcd2901 " ,
63
63
"span_id" :" abcdef1010"
64
64
}
65
65
```
0 commit comments