Skip to content

Conversation

@jrhea
Copy link
Contributor

@jrhea jrhea commented Dec 18, 2025

Summary

This PR adds generic OpenTelemetry tracing to the JSON-RPC server in package rpc.

Tracing is disabled by default by relying on the global OpenTelemetry tracer provider, which is a noop unless configured elsewhere. Server.SetTracerProvider is supported for tests, but we might want to ditch this and just rely on helpers accessing the global provider.

Follow-ups

  • CLI configuration of the TracerProvider
  • Engine API–specific spans
@jrhea
Copy link
Contributor Author

jrhea commented Dec 19, 2025

@fjl I am getting this error when the lint step is run:

https://github.com/ethereum/go-ethereum/actions/runs/20384597266/job/58582793251?pr=33452

looks like the otel dependencies I added to geth changed some transitive dependencies and now they don't match what is in cmd/keeper.

I can get it to pass by running go mod tidy in cmd/keeper and checking in cmd/keeper/go.mod and cmd/keeper/go.sum, but I just wanted to verify with you that this is normal and expected.

Copy link

@Scfastermind Scfastermind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terminado breackingfast hoy


// Start tracing span before invoking the subscription method.
ctx, span := h.startSpan(cp.ctx, msg, cp.isBatch)
defer span.End()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjl do we want to trace subscriptions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants