Skip to content

Add public trace metrics macros and expose the metrics feature #1010

@szokeasaurusrex

Description

@szokeasaurusrex

This issue tracks the public API portion extracted from #997: expose metric emission through Rust macros and make the feature available from the top-level crate.

Scope from #997

Details

The macro API is the intended public surface for now, with support for required name/value plus optional attributes and optional unit, matching the metric operation semantics in the trace metrics spec while routing through the existing hub/scope capture path. Tests/examples should demonstrate that emitted metrics are correctly typed and reach batching/capture as expected.

Notes

We are intentionally keeping the macro-based API in this split; if spec wording needs to be adjusted for Rust API shape, that follow-up should happen separately rather than blocking this extraction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions