Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mutating of trace state #108

Merged
merged 3 commits into from
Apr 18, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions trace_context/HTTP_HEADER_FORMAT.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,16 @@ Multiple tracing systems (with different formatting):
```
tracestate: rojo=00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01,congo=lZWRzIHRoNhcm5hbCBwbGVhc3VyZS4=
```

# Mutating the traceparent field

## Base mutations

Library or platform receiving `traceparent` request header MUST send it to outgoing requests. It MAY mutate the value of this header before passing to outgoing requests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why MAY mutate instead of SHOULD?


Here is the list of allowed mutations:
1. **Update `span-id`**. The value of property `span-id` can be regenerated.
2. **Mark trace for sampling**. The value of `sampled` flag of `trace-options` may be set to `1` if it had value `0` before. `span-id` MUST be regenerated with the `sampled` flag update.
3. **Restarting trace**. All properties - `trace-id`, `span-id`, `trace-options` are regenerated.

Libraries and platforms MUST NOT make any other mutations to the `traceparent` header.