Commit b6f9dce
authored
feat: include otel as custom sampling contex (#2683)
* 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-function
* chore: exercise otel context with tracer_sampler1 parent 3db724c commit b6f9dce
File tree
2 files changed
+37
-1
lines changed- sentry-opentelemetry
- lib/sentry/opentelemetry
- spec/sentry/opentelemetry
2 files changed
+37
-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: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
178 | 205 | | |
179 | 206 | | |
180 | 207 | | |
| |||
0 commit comments