From 139ce79935a060dc0b179ab373a47956c3443a56 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 27 Feb 2024 18:53:49 +0000 Subject: [PATCH 1/3] stabilize the trace context in non-OTLP formats spec --- CHANGELOG.md | 3 +++ specification/compatibility/logging_trace_context.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cea84cedb4f..8dc41f84097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ release. ### Compatibility +- 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..61b0a5f704a 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 From 7a9de4268329c3de1043979b190c8a39ea88b714 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Mon, 8 Jul 2024 20:27:40 +0000 Subject: [PATCH 2/3] trace id should be lowercase --- specification/compatibility/logging_trace_context.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/compatibility/logging_trace_context.md b/specification/compatibility/logging_trace_context.md index 61b0a5f704a..884d35246cc 100644 --- a/specification/compatibility/logging_trace_context.md +++ b/specification/compatibility/logging_trace_context.md @@ -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" } ``` From a8bac7c3a5e398c962ba4e6510f5c1a9d7a48e37 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Wed, 10 Jul 2024 10:06:53 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dc41f84097..89f4ea08374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ release. ### Compatibility -- Mark the "Trace Context in non-OTLP Log Formats" specification stable. +- 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