Limiting Trace Propagation
By default, trace information (sentry-trace
and baggage
headers) will be added to all outgoing HTTP requests. If you want to limit the URLs where trace information is added, you can specify that using the trace_propagation_targets
option:
Copied
Sentry.init do |config|
config.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0'
# takes strings and regexes
config.trace_propagation_targets = ['myproject.org', /.*\.otherservice.org\/.*/]
# ...
end
In the example above, trace information will be added to all requests to URLs that contain myproject.org
and to all sub domains of otherservice.org
, like https://api.otherservice.org/something/
and https://payment.otherservice.org/something/
.
See our config options documentation for more information about the trace_propagation_targets
option.
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
- Package:
- gem:sentry-ruby
- Version:
- 5.17.3
- Repository:
- https://github.com/getsentry/sentry-ruby