getsentry / getsentry/sentry-rust
Apply scope attributes to Rust logs and metrics with spec precedence rules
- Dominant language
- Rust
- Stars
- 752
- Forks
- 190
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 5
Description
Once first-class scope attributes exist in `sentry-core`[ (see ]()[RUST-183](https://linear.app/getsentry/issue/RUST-183/add-first-class-scope-attributes-apis-to-sentry-core)), Rust should apply them to emitted logs and metrics at capture time. The [Attributes spec]() says attributes from the scope chain are applied when telemetry is captured, that global and isolation scope attributes **MUST** apply to logs and metrics, and that telemetry-item attributes (`log` / `metric`) **MUST** take precedence over scope attributes.
This issue should implement scope-attribute merging in the Rust log and metric capture pipelines, preserving explicitly set log/metric attributes. Relevant code paths today are `sentry-core/src/client.rs`, `sentry-core/src/scope/real.rs`, and the existing log/metric tests in `sentry-core/tests/metrics.rs`. If desired, span handling can be evaluated separately, but logs and metrics are already explicitly covered by the spec text.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.