Skip to content

fix: normalize empty metric tags before aggregation - #104

Open
Shubham-Padkonde wants to merge 1 commit into
newrelic:mainfrom
Shubham-Padkonde:fix/empty-metric-tags
Open

Shubham-Padkonde wants to merge 1 commit into
newrelic:mainfrom
Shubham-Padkonde:fix/empty-metric-tags

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Recording a gauge, count, or summary with tags={} raises TypeError: unhashable type: 'dict': the empty mapping is left in the metric identity used as a dictionary key.

Normalize empty tags to None, matching omitted tags. This also lets samples recorded with omitted and empty tags aggregate into the same metric. Extend the existing identity and aggregation tests to cover all three metric types.

Validation: four cases fail before the fix; all 150 tests pass afterward. Ruff checks and formatting pass. Credential-dependent doctests could not run without a New Relic license key.

@Shubham-Padkonde
Shubham-Padkonde requested a review from a team as a code owner October 2, 2026 08:20
@CLAassistant

CLAassistant commented Oct 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants