Custom TracesSamplerCallback
cannot access Spring request attributes when using OTEL
#4192
Labels
TracesSamplerCallback
cannot access Spring request attributes when using OTEL
#4192
Integration
sentry-opentelemetry-agentless-spring
Java Version
17
Version
8.1.0
Steps to Reproduce
spring-boot-starter-web
(customer is using v2.7.11, but this is not relevant),sentry-spring-boot-starter
andsentry-opentelemetry-agentless-spring
TracesSamplerCallback
that returns different sample rates based on the request pathReported by pretchu in this Discord thread
Expected Result
Custom sample rate is returned based on request path, as correctly happens when using the SDK in non-OTEL mode.
Actual Result
context.getCustomSamplingContext()
is alwaysnull
, hence the request path cannot be inspected to make a sampling decision.The text was updated successfully, but these errors were encountered: