Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cache/metrics.ex
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if Application.ensure_loaded(:prometheus_telemetry) === :ok do
metadata
|> Map.take([:error, :cache_name])
|> Map.update(:error, "unknown", fn
%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!

_ -> "unknown"
Expand Down
Loading