Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 15 additions & 2 deletions docs/en/api/x-process-propagation-headers-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Example of the value format: `XXXXX-XXXXX-XXXX-XXXX`
Values must include the following segments, and all string type values are in BASE64 encoding.

- Required:
1. Sample. 0 or 1. 0 means that the context exists, but it could (and most likely will) be ignored. 1 means this trace needs to be sampled and sent to the backend.
1. Sample. 0 or 1. 0 means that the context exists, but it could (and most likely will) be ignored. 1 means this trace needs to be sampled and sent to the backend. See [Sampling](#sampling) for how the SkyWalking agents use this value.
1. Trace ID. **String(BASE64 encoded)**. A literal string that is globally unique.
1. Parent trace segment ID. **String(BASE64 encoded)**. A literal string that is globally unique.
1. Parent span ID. Must be an integer. It begins with 0. This span ID points to the parent span in parent trace segment.
Expand All @@ -28,9 +28,22 @@ Values must include the following segments, and all string type values are in BA
1. Parent endpoint. **String(BASE64 encoded)**. The operation name of the first entry span in the parent segment. Its length should be less than 150 UTF-8 characters.
1. Target address of this request used on the client end. **String(BASE64 encoded)**. The network address (not necessarily IP + port) used on the client end to access this target service.

- Sample values:
- Example value:
`1-TRACEID-SEGMENTID-3-PARENT_SERVICE-PARENT_INSTANCE-PARENT_ENDPOINT-IPPORT`

#### Sampling
SkyWalking analyzes the reported traces to provide complete metrics and topology, so it is common for the agents to
sample 100% of the traces, which is their default. Storage is reduced instead by
[trace sampling at the server side](../setup/backend/trace-sampling.md), which drops traces without changing the
metrics and topology. For this reason, the Sample value, designed at the beginning of this protocol, is not used in
practice. By convention, the SkyWalking agent implementations always set Sample to `1` when they write the `sw8`
header, and don't use it to decide whether to trace a request when they read the header.

When an agent supports sampling, the decision should be made once, by the service that starts the trace. An agent that
receives a valid `sw8` header should trace the request without applying its own sampling rate, so the upstream sampling
decision is kept along the trace. The agent's other rules still apply, such as ignored endpoints or suffixes, a
disconnected backend, or a full buffer.

### Extension Header Item
The extension header item is designed for advanced features. It provides interaction capabilities between the agents
deployed in upstream and downstream services.
Expand Down
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Document how a release is named in the release guide: a few words that state its key features, used as the GitHub release title `x.y.z - <release name>`, which the guide's `gh release create` example now uses in place of the bare version.
* Update the release guide for the redesigned website and add a release-name section to the GitHub release body.
* Fix the Zabbix receiver doc's links to the Zabbix documentation, which moved in Zabbix 8.0, by pinning them to Zabbix 6.0.
* Describe the sampling convention in the `sw8` protocol doc: the SkyWalking agents always write `1` as the Sample value and don't use it, and an agent that receives a valid `sw8` header should keep the upstream sampling decision instead of applying its own sampling rate.


All issues and pull requests are [here](https://github.com/apache/skywalking/issues?q=milestone:11.2.0)
Expand Down
Loading