ref(ds): Specify how the DSC is interpreted in Relay#17899
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
5545fae to
84baf8c
Compare
There was a problem hiding this comment.
I'm not sure what "Requires DSC" meas in this case, can we be more specific what the condition here is?
There was a problem hiding this comment.
Payload requires DSC, is that better? 🤔
| The existence of a dynamic sampling context does not necessarily mean it is valid, Relay differentiates between three cases: | ||
| 1. No dynamic sampling context | ||
| 2. A dynamic sampling context originating from the same organization | ||
| 3. A dynamic sampling context originating in a project of a different organization or from an unknown project. |
There was a problem hiding this comment.
| The existence of a dynamic sampling context does not necessarily mean it is valid, Relay differentiates between three cases: | |
| 1. No dynamic sampling context | |
| 2. A dynamic sampling context originating from the same organization | |
| 3. A dynamic sampling context originating in a project of a different organization or from an unknown project. | |
| The existence of a dynamic sampling context does not necessarily mean it is valid. Relay differentiates between three cases: | |
| 1. No dynamic sampling context | |
| 2. A dynamic sampling context originating in a project of the same organization | |
| 3. A dynamic sampling context originating in a project of a different organization or an unknown project. |
| 2. A dynamic sampling context originating from the same organization | ||
| 3. A dynamic sampling context originating in a project of a different organization or from an unknown project. | ||
|
|
||
| If an envelope received by Relay does not contain a dynamic sampling context it is always sampled. Certain payloads do always require a dynamic sampling context to be present and will be rejected without a dynamic sampling context. |
There was a problem hiding this comment.
I realize that the second sentence is meant to describe an exception to the first, but they sound contradictory. Perhaps it would help to be explicit about which payloads require a DSC.
There was a problem hiding this comment.
I decided against having an exhaustive list here, these lists go out of date quickly and I'd prefer this document to describe methodology not implementation.
There was a problem hiding this comment.
In that case, I would suggest something like
| If an envelope received by Relay does not contain a dynamic sampling context it is always sampled. Certain payloads do always require a dynamic sampling context to be present and will be rejected without a dynamic sampling context. | |
| Certain payloads do always require a dynamic sampling context to be present and will be rejected without a dynamic sampling context. All other payloads will always be sampled if they do not contain a dynamic sampling context. |
There was a problem hiding this comment.
Much better, thank you!
| 1. No dynamic sampling context. | ||
| 2. A dynamic sampling context originating in a project of the same organization. | ||
| 3. A dynamic sampling context originating in a project of a different organization or an unknown project. | ||
|
|
||
| If an envelope received by Relay does not contain a dynamic sampling context it is always sampled, unless the payload requires a DSC to always be present. | ||
|
|
||
| A dynamic sampling context which originates from either the same project or a project within the same organization is considered valid and Relay will apply the sampling rules from the root project as described in the previous section. | ||
|
|
||
| DSCs originating in different organizations or unknown projects are discarded and Relay will re-compute a DSC based on the data of the payload and scoped to the current project. The computed dynamic sampling context is then used to apply the dynamic sampling rules. |
There was a problem hiding this comment.
I think this would be easier to parse if we inline the descriptions into the list, and make the headers bold.
| 1. No dynamic sampling context. | |
| 2. A dynamic sampling context originating in a project of the same organization. | |
| 3. A dynamic sampling context originating in a project of a different organization or an unknown project. | |
| If an envelope received by Relay does not contain a dynamic sampling context it is always sampled, unless the payload requires a DSC to always be present. | |
| A dynamic sampling context which originates from either the same project or a project within the same organization is considered valid and Relay will apply the sampling rules from the root project as described in the previous section. | |
| DSCs originating in different organizations or unknown projects are discarded and Relay will re-compute a DSC based on the data of the payload and scoped to the current project. The computed dynamic sampling context is then used to apply the dynamic sampling rules. | |
| 1. **No dynamic sampling context**: If an envelope received by Relay does not contain a dynamic sampling context it is always sampled, unless the payload requires a DSC to always be present. | |
| 2. **A dynamic sampling context originating in a project of the same organization**: A dynamic sampling context which originates from either the same project or a project within the same organization is considered valid and Relay will apply the sampling rules from the root project as described in the previous section. | |
| 3. **A dynamic sampling context originating in a project of a different organization or an unknown project**: DSCs originating in different organizations or unknown projects are discarded and Relay will re-compute a DSC based on the data of the payload and scoped to the current project. The computed dynamic sampling context is then used to apply the dynamic sampling rules. | |
DESCRIBE YOUR PR
Adds more information how the DSC is interpreted and applied in Relay.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: