Default masking and exclusion
The SDK automatically masks common sensitive query parameters, headers, and request/response body fields based on built-in patterns. For example, fields namedpassword, token, secret, or headers like Authorization are masked by default.
To reduce noise, the SDK also automatically excludes common static assets and health check endpoints, such as /robots.txt or /healthz.
See the data privacy page for complete lists of default masking and exclusion patterns.
Mask sensitive data
You can extend the default masking rules by providing additional regular expressions via themask_headers and mask_body_fields parameters. Patterns are case-insensitive and match anywhere within the name. Use ^ and $ anchors for exact matches.
Configuration example
Exclude requests
You can exclude requests from logging using path patterns (regular expressions) via theexclude_paths parameter. Like the masking patterns, these are case-insensitive and match anywhere within the request path. Use ^ and $ anchors for exact matches.
Configuration example
Excluded requests won’t be logged, but are still counted in metrics. To exclude endpoints from metrics, you can mark them as excluded in the dashboard.