Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: telemetry spans #1670

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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
EthereumMetrics.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
10 changes: 2 additions & 8 deletions telemetry_api/lib/telemetry_api/traces.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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 @@ -124,11 +124,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 Expand Up @@ -208,7 +203,6 @@ defmodule TelemetryApi.Traces do
:ok
end
end


@doc """
Registers the sending of a batcher task to Ethereum in the task trace.
Expand Down Expand Up @@ -298,7 +292,7 @@ defmodule TelemetryApi.Traces do
:ok
end
end

@doc """
Registers a bump in the gas price when the aggregator tries to respond to a task in the task trace.

Expand Down