Skip to content

Apply scope attributes to Rust logs and metrics with spec precedence rules #1056

@szokeasaurusrex

Description

@szokeasaurusrex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions