Skip to content

chore(metrics): fixed cardinality leak on extract_error_metadata/1#42

Merged
MikaAK merged 1 commit into
mainfrom
fix_extract_error_metadata_cardinality_bug
Apr 21, 2026
Merged

chore(metrics): fixed cardinality leak on extract_error_metadata/1#42
MikaAK merged 1 commit into
mainfrom
fix_extract_error_metadata_cardinality_bug

Conversation

@cking222
Copy link
Copy Markdown
Collaborator

This was observed as negatively impacting our prom scrape this morning.

Comment thread lib/cache/metrics.ex
%ErrorMessage{code: code, message: error} -> "#{code}: #{error}"
%ErrorMessage{code: code} -> code
reason when is_atom(reason) -> to_string(reason)
reason when is_binary(reason) -> reason
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the string is still needed for those who use string messages!

@cking222 cking222 force-pushed the fix_extract_error_metadata_cardinality_bug branch from 36cb083 to 803ba8b Compare April 21, 2026 00:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.46%. Comparing base (342df01) to head (803ba8b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/cache/metrics.ex 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   83.46%   83.46%           
=======================================
  Files          22       22           
  Lines         617      617           
=======================================
  Hits          515      515           
  Misses        102      102           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MikaAK MikaAK merged commit dc56114 into main Apr 21, 2026
6 of 7 checks passed
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