go-ethereum/rpc
Jonny Rhea d8b92cb9e6
rpc,internal/telemetry: fix deferred spanEnd to capture errors via pointer (#33772)
The endSpan closure accepted error by value, meaning deferred calls like
defer spanEnd(err) captured the error at defer-time (always nil), not at
function-return time. This meant errors were never recorded on spans.

- Changed endSpan to accept *error
- Updated all call sites in rpc/handler.go to pass error pointers, and
adjusted handleCall to avoid propagating child-span errors to the parent
- Added TestTracingHTTPErrorRecording to verify that errors from RPC
methods are properly recorded on the rpc.runMethod span
2026-02-14 01:00:14 +01:00
..
testdata
client.go
client_example_test.go
client_opt.go
client_opt_test.go
client_test.go
context_headers.go
doc.go
endpoints.go
errors.go
handler.go
http.go
http_test.go
inproc.go
ipc.go
ipc_js.go
ipc_unix.go
ipc_wasip1.go
ipc_windows.go
json.go
metrics.go
server.go
server_test.go
service.go
stdio.go
subscription.go
subscription_test.go
testservice_test.go
tracing_test.go
types.go
types_test.go
websocket.go
websocket_test.go