diff --git a/CHANGELOG.md b/CHANGELOG.md index cea84cedb4f..89f4ea08374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ release. ### Compatibility +- Define casing for hex-encoded IDs and mark the "Trace Context in non-OTLP Log Formats" specification stable. + ([#3909](https://github.com/open-telemetry/opentelemetry-specification/pull/3909)) + ### SDK Configuration ### Common diff --git a/specification/compatibility/logging_trace_context.md b/specification/compatibility/logging_trace_context.md index 5c7f5e9190e..884d35246cc 100644 --- a/specification/compatibility/logging_trace_context.md +++ b/specification/compatibility/logging_trace_context.md @@ -1,6 +1,6 @@ # Trace Context in non-OTLP Log Formats -**Status**: [Development](../document-status.md) +**Status**: [Stable](../document-status.md)
Table of Contents @@ -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. @@ -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 @@ -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.1trace_id:102981ABCD2901span_id:abcdef1010time:[01/Jan/2010:10:11:23 -0400]req:GET /health HTTP/1.0status:200 +host:192.168.0.1trace_id:102981abcd2901span_id:abcdef1010time:[01/Jan/2010:10:11:23 -0400]req:GET /health HTTP/1.0status:200 ``` ### JSON Formats @@ -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" } ```