Skip to content

Commit

Permalink
fix: telemetry spans (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
avilagaston9 authored Dec 30, 2024
1 parent b0d08c4 commit f73d455
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions telemetry_api/lib/telemetry_api/periodically.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ defmodule TelemetryApi.Periodically do
PrometheusMetrics.new_gas_price(gas_price)

{:error, error} ->
IO.inspect("Error fetching gas price: #{error}")
Logger.error("Error fetching gas price: #{inspect(error)}")
end
{:noreply, %{}}
end
defp fetch_operators_info() do
case Operators.fetch_all_operators() do
:ok -> :ok
{:error, message} -> IO.inspect("Couldn't fetch operators: #{IO.inspect(message)}")
{:error, message} -> Logger.error("Couldn't fetch operators: #{inspect(message)}")
end
end

Expand All @@ -67,7 +67,7 @@ defmodule TelemetryApi.Periodically do
Operators.update_operator(op, %{status: string_status(status)})

error ->
Logger.error("Error when updating status: #{error}")
Logger.error("Error when updating status: #{inspect(error)}")
end
end)
:ok
Expand Down
7 changes: 1 addition & 6 deletions telemetry_api/lib/telemetry_api/traces.ex
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ defmodule TelemetryApi.Traces do
)

IO.inspect(
"Operator response included. merkle_root: #{IO.inspect(merkle_root)} operator_id: #{IO.inspect(operator_id)}"
"Operator response included. merkle_root: #{inspect(merkle_root)} operator_id: #{inspect(operator_id)}"
)

:ok
Expand Down Expand Up @@ -129,11 +129,6 @@ defmodule TelemetryApi.Traces do
| subspans: Map.delete(trace.subspans, :batcher)
})

with {:ok, _trace} <- set_current_trace(merkle_root) do
Tracer.end_span()
TraceStore.delete_trace(merkle_root)
end

:ok
end
end
Expand Down

0 comments on commit f73d455

Please sign in to comment.