Filtering
🚧 This document is work in progress.
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in RFC 2119 to indicate requirement levels.
The SDK MUST implement a mechanism for users to filter out spans. The result MUST be binary (true
or false
). Any APIs exposed to the user to filter spans MUST adhere to the following design principles:
- The APIs are optimized for trace completeness
- The APIs are optimized for conclusive sampling decisions
The ignoreSpans
option accepts a glob pattern or string.
Copied
Sentry.init({
ignoreSpans: [
'GET /about',
'events.signal *',
]
})
The integrations
option MAY perform in similar fashion as the ignoreSpans
option, or make explicit opt-out possible via a boolean flag.
Copied
Sentry.init({
integrations: [
fsIntegration: {
ignoreSpans: [
'fs.read',
],
readSpans: true,
writeSpans: false,
}
]
})
If both options mentioned above are not feasible to be implemented in certain SDKs, other approaches MUST be explored that have the same outcome.
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").