Once first-class scope attributes exist in sentry-core (see RUST-183), 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.
Once first-class scope attributes exist in
sentry-core(see RUST-183), 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 insentry-core/tests/metrics.rs. If desired, span handling can be evaluated separately, but logs and metrics are already explicitly covered by the spec text.