Skip to content

Commit

Permalink
trace id should be lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Jul 8, 2024
1 parent 139ce79 commit 7a9de42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions specification/compatibility/logging_trace_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ representing [trace context](../logs/data-model.md#trace-context-fields). This
document defines how trace context should be recorded in non-OTLP Log Formats.
To summarize, the following field names should be used in legacy formats:

- "trace_id" for [TraceId](../logs/data-model.md#field-traceid), hex-encoded.
- "span_id" for [SpanId](../logs/data-model.md#field-spanid), hex-encoded.
- "trace_id" for [TraceId](../logs/data-model.md#field-traceid), lowercase and hex-encoded.
- "span_id" for [SpanId](../logs/data-model.md#field-spanid), lowercase and hex-encoded.
- "trace_flags" for [trace flags](../logs/data-model.md#field-traceflags), formatted
according to W3C traceflags format.

Expand All @@ -39,7 +39,7 @@ Trace id, span id and traceflags SHOULD be recorded via SD-ID "opentelemetry".
For example:

```
[opentelemetry trace_id="102981ABCD2901" span_id="abcdef1010" trace_flags="01"]
[opentelemetry trace_id="102981abcd2901" span_id="abcdef1010" trace_flags="01"]
```

### Plain Text Formats
Expand All @@ -48,7 +48,7 @@ The fields SHOULD be recorded according to the customary approach used for a
particular format (e.g. field:value format for LTSV). For example:

```
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
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
```

### JSON Formats
Expand All @@ -59,7 +59,7 @@ The fields SHOULD be recorded as top-level fields in the JSON structure. For exa
{
"timestamp":1581385157.14429,
"body":"Incoming request",
"trace_id":"102981ABCD2901",
"trace_id":"102981abcd2901",
"span_id":"abcdef1010"
}
```
Expand Down

0 comments on commit 7a9de42

Please sign in to comment.