Skip to content

Add trace metric default attribute enrichment in sentry-core #1059

@szokeasaurusrex

Description

@szokeasaurusrex

Split from #1024.

Add default attribute enrichment behavior in sentry-core so emitted metrics include SDK and client metadata attributes, aligned with default attributes. Add sentry.environment, sentry.release, sentry.sdk.name, sentry.sdk.version, and server.address, and preserve explicitly set metric attributes instead of overwriting them. Focus on the relevant metric preparation code in sentry-core/src/client.rs. Add tests for default attributes attached when configured, optional attributes omitted when not configured, and explicitly set metric attributes not overwritten by defaults. Do not include tracing association, user attribute enrichment, or callback processing in this issue.

If code is reused from #997, include Co-authored-by: Joris Bayer <joris.bayer@sentry.io> in commit trailers.

Metadata

Metadata

Assignees

No one assigned

    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