Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 0f60ee6

Browse files
author
Bogdan Drutu
authored
Make tracestate a list instead of a map to preserve ordering. (#84)
* Make tracestate a list instead of a map to preserve ordering. * Use plural for trace_state_entries. * Refactor the Tracestate to be a message. * Fix comments.
1 parent 8ca5a12 commit 0f60ee6

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

opencensus/proto/trace/v1/trace.proto

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,29 @@ message Span {
4747
// This field is required.
4848
bytes span_id = 2;
4949

50-
// The `tracestate` field conveys information about request position in multiple distributed
51-
// tracing graphs.
52-
//
53-
// There can be a maximum of 32 members in the map.
54-
//
55-
// The key must begin with a lowercase letter, and can only contain lowercase letters 'a'-'z',
56-
// digits '0'-'9', underscores '_', dashes '-', asterisks '*', and forward slashes '/'. For
57-
// multi-tenant vendors scenarios '@' sign can be used to prefix vendor name. The maximum length
58-
// for the key is 256 characters.
59-
//
60-
// The value is opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the
61-
// range 0x20 to 0x7E) except ',' and '='. Note that this also excludes tabs, newlines, carriage
62-
// returns, etc.
50+
// This field conveys information about request position in multiple distributed tracing graphs.
51+
// It is a list of Tracestate.Entry with a maximum of 32 members in the list.
6352
//
6453
// See the https://github.com/w3c/distributed-tracing for more details about this field.
65-
map<string, string> tracestate = 15;
54+
message Tracestate {
55+
message Entry {
56+
// The key must begin with a lowercase letter, and can only contain
57+
// lowercase letters 'a'-'z', digits '0'-'9', underscores '_', dashes
58+
// '-', asterisks '*', and forward slashes '/'.
59+
string key = 1;
60+
61+
// The value is opaque string up to 256 characters printable ASCII
62+
// RFC0020 characters (i.e., the range 0x20 to 0x7E) except ',' and '='.
63+
// Note that this also excludes tabs, newlines, carriage returns, etc.
64+
string value = 2;
65+
}
66+
67+
// A list of entries that represent the Tracestate.
68+
repeated Entry entries = 1;
69+
}
70+
71+
// The Tracestate on the span.
72+
Tracestate tracestate = 15;
6673

6774
// The `span_id` of this span's parent span. If this is a root span, then this
6875
// field must be empty. The ID is an 8-byte array.

0 commit comments

Comments
 (0)