Skip to content

Commit

Permalink
Improve safety of reporting diagnostic methods and adjust metric name
Browse files Browse the repository at this point in the history
  • Loading branch information
svsool committed Nov 6, 2024
1 parent 4120102 commit 36d1b67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/telemetry_metrics_statsd.ex
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ defmodule TelemetryMetricsStatsd do
case item do
{:udp_worker, udp_worker} ->
:telemetry.execute(
[:telemetry_metrics_statsd, :udp_worker_metrics],
[:telemetry_metrics_statsd, :udp_metrics],
%{
message_queue_len: message_queue_len(udp_worker),
},
Expand All @@ -611,6 +611,11 @@ defmodule TelemetryMetricsStatsd do
schedule_metrics_report(state.diagnostic_metrics_report_interval)

{:noreply, state}
rescue
_ ->
Logger.error("Failed to report diagnostic metrics")

{:noreply, state}
end

@impl true
Expand Down

0 comments on commit 36d1b67

Please sign in to comment.