Commits
closes: https://github.com/maraisr/tctx/issues/5
The specification doesn't mandate a default behavior, as it's "component" dependent. However, it states:
> - If a component made definitive recording decision - this decision SHOULD be reflected in the sampled flag.
> - If a component needs to make a recording decision - it SHOULD respect the sampled flag value. Security considerations SHOULD be applied to protect from abusive or malicious use of this flag.
> - If a component deferred or delayed the decision and only a subset of telemetry will be recorded, the sampled flag should be propagated unchanged. It should be set to 0 as the default option when the trace is initiated by this component.
>
> There are two additional options that vendors MAY follow:
>
> - A component that makes a deferred or delayed recording decision may communicate the priority of a recording by setting sampled flag to 1 for a subset of requests.
> - A component may also fall back to probability sampling and set the sampled flag to 1 for the subset of requests.
Since we can't determine the component's intentions, we should copy the flags and let sampling decisions be handled by libraries like rian.
The specification doesn't mandate a default behavior, as it's "component" dependent. However, it states:
> - If a component made definitive recording decision - this decision SHOULD be reflected in the sampled flag.
> - If a component needs to make a recording decision - it SHOULD respect the sampled flag value. Security considerations SHOULD be applied to protect from abusive or malicious use of this flag.
> - If a component deferred or delayed the decision and only a subset of telemetry will be recorded, the sampled flag should be propagated unchanged. It should be set to 0 as the default option when the trace is initiated by this component.
>
> There are two additional options that vendors MAY follow:
>
> - A component that makes a deferred or delayed recording decision may communicate the priority of a recording by setting sampled flag to 1 for a subset of requests.
> - A component may also fall back to probability sampling and set the sampled flag to 1 for the subset of requests.
Since we can't determine the component's intentions, we should copy the flags and let sampling decisions be handled by libraries like rian.