Skip to content

Commit

Permalink
Delete requirement to generate new trace/span id if an invalid id is …
Browse files Browse the repository at this point in the history
…received (#444)

This is considered an bug in the spec that was uncovered in the discussion here:
#442 (comment)

I did some spelunking and the "generate" recommendation comes from the very first commit:
b5bcfff#diff-ef5f80fbf835dd57e14cb9264944f03d80cf6b04cc7671b0e7fb33167c67efcc
where they were copied from Java repo, to which they were copied from OpenCensus
open-telemetry/opentelemetry-java#134 and in OpenCensus the
wording first time appeared here census-instrumentation/opencensus-proto#160
(authored by @SergeyKanzhelev, merged by @bogdandrutu).

We are deleting the requirement to generate a new trace id or span id if an invalid
id is received. The receivers can decide how they want to treat the invalid id (just
like upon receiving any other invalid id), e.g. they may drop it, log an error, accept
the invalid data, etc. We are not going to prescribe a particular receiver behavior
when invalid trace/span id is received.
  • Loading branch information
tigrannajaryan authored Jan 20, 2023
1 parent d8729d4 commit 2119dc9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions opentelemetry/proto/trace/v1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,13 @@ message Span {
// the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
// is considered invalid.
//
// This field is semantically required. Receiver should generate new
// random trace_id if empty or invalid trace_id was received.
//
// This field is required.
bytes trace_id = 1;

// A unique identifier for a span within a trace, assigned when the span
// is created. The ID is an 8-byte array. An ID with all zeroes is considered
// invalid.
//
// This field is semantically required. Receiver should generate new
// random span_id if empty or invalid span_id was received.
//
// This field is required.
bytes span_id = 2;

Expand Down

0 comments on commit 2119dc9

Please sign in to comment.