getsentry / team-sdks

A meta repository for tracking work across all SDK teams.
0 stars 0 forks source link

Project: Add Sampling Decision to Trace Envelope Header #8

Closed cleptric closed 3 months ago

cleptric commented 1 year ago

Project Board

https://github.com/orgs/getsentry/projects/129

### Web Frontend SDKs
- [ ] https://github.com/getsentry/sentry-javascript/issues/8482
### Web Backend SDKs
- [ ] https://github.com/getsentry/sentry-php/pull/1562
- [ ] https://github.com/getsentry/sentry-python/issues/2237
- [ ] https://github.com/getsentry/sentry-ruby/issues/2064
- [ ] https://github.com/getsentry/sentry-go/issues/665
- [ ] https://github.com/getsentry/sentry-java/issues/2832
- [ ] https://github.com/getsentry/sentry-dotnet/issues/2470
### Mobile SDKs
- [ ] https://github.com/getsentry/sentry-dart/issues/1579
- [ ] https://github.com/getsentry/sentry-cocoa/issues/3201

Description

from @iambriccardo

Right now the error tagging doesn't support client side sampling, that is, if a trace is sampled out by the head of the trace, this information is not propagated in the trace header (aka dsc). This means that from the perspective of dynamic sampling, we don't know whether the trace has been sampled out on the client and this could lead to false positives.

We would need to fix this by having the client SDKs add the client sampling decision in the dsc that will be attached to the error. This client sampling decision will work similarly to dynamic sampling, that is, if the head is sampled out all the children are sampled out and vice versa.

Client Sampling Decision DSC RFC

AbhiPrasad commented 1 year ago

To save on bundle size I would like to only add logic that sets sampled on the DSC if there is an active transaction.

@iambriccardo does that seem fine?

cleptric commented 1 year ago

@AbhiPrasad Yep, the same behaviour in PHP, due to other reasons, though 😬

stephanie-anderson commented 3 months ago

Closing, project is completed