@@ -5,6 +5,7 @@ defmodule TelemetryApi.Traces do
55 alias TelemetryApi.Traces.Trace
66 alias TelemetryApi.Operators
77 alias TelemetryApi.ContractManagers.StakeRegistry
8+ alias TelemetryApi.PrometheusMetrics
89
910 require OpenTelemetry.Tracer
1011 require OpenTelemetry.Ctx
@@ -208,7 +209,6 @@ defmodule TelemetryApi.Traces do
208209 :ok
209210 end
210211 end
211-
212212
213213 @ doc """
214214 Registers the sending of a batcher task to Ethereum in the task trace.
@@ -298,7 +298,7 @@ defmodule TelemetryApi.Traces do
298298 :ok
299299 end
300300 end
301-
301+
302302 @ doc """
303303 Registers a set gas price when the aggregator tries to respond to a task in the task trace.
304304
@@ -368,8 +368,17 @@ defmodule TelemetryApi.Traces do
368368 defp add_missing_operators ( [ ] ) , do: :ok
369369
370370 defp add_missing_operators ( missing_operators ) do
371+ # Concatenate name + address
372+ missing_operators =
373+ missing_operators
374+ |> Enum . map ( fn op -> op . name <> " - " <> String . slice ( op . address , 0 .. 7 ) end )
375+
376+ # Send to prometheus
377+ missing_operators
378+ |> Enum . map ( fn o -> PrometheusMetrics . missing_operator ( o ) end )
379+
371380 missing_operators =
372- missing_operators |> Enum . map ( fn o -> o . name end ) |> Enum . join ( ";" )
381+ missing_operators |> Enum . join ( ";" )
373382
374383 Tracer . add_event ( "Missing Operators" , [ { :operators , missing_operators } ] )
375384 end
0 commit comments