Commit 4301706
committed
feat: include otel as custom sampling contex
Sentry's opentelemetry adapter does not do the greatest job in
adapting the opentelemetry span to a semantically correct sentry span,
nor does it expose the opentelemetry span in the context for sampling
decisions. This PR adds a opentelemetry span as an additional custom sampling
context so it can be used for sampling decisions. This gives clients more
opportunity to use the entire context of the opentelemetry span for sampling
decisions, and allows replicating sampling mechanisms as orignally suggested
by the Sentry team via the "Sampling Function".
https://docs.sentry.io/platforms/ruby/configuration/sampling/#setting-a-sampling-function1 parent a3d87a6 commit 4301706
File tree
2 files changed
+24
-1
lines changed- sentry-opentelemetry
- lib/sentry/opentelemetry
- spec/sentry/opentelemetry
2 files changed
+24
-1
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
157 | 171 | | |
158 | 172 | | |
159 | 173 | | |
| |||
0 commit comments