mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
tracing: Add otel tracer transport to all http clients (#14972)
* Fixed otelhttp client setups. Note: This may not be the best solution as the http client is defined in many places. There should be a canoncial http client with the proper setup. * Changelog fragment * go mod tidy and gazelle
This commit is contained in:
@@ -78,6 +78,7 @@ go_library(
|
||||
"@com_github_tyler_smith_go_bip39//:go_default_library",
|
||||
"@com_github_tyler_smith_go_bip39//wordlists:go_default_library",
|
||||
"@com_github_wealdtech_go_eth2_wallet_encryptor_keystorev4//:go_default_library",
|
||||
"@io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:go_default_library",
|
||||
"@org_golang_google_grpc//:go_default_library",
|
||||
"@org_golang_google_grpc//codes:go_default_library",
|
||||
"@org_golang_google_grpc//metadata:go_default_library",
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
nodeClientFactory "github.com/prysmaticlabs/prysm/v5/validator/client/node-client-factory"
|
||||
validatorClientFactory "github.com/prysmaticlabs/prysm/v5/validator/client/validator-client-factory"
|
||||
validatorHelpers "github.com/prysmaticlabs/prysm/v5/validator/helpers"
|
||||
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -55,7 +56,7 @@ func (s *Server) registerBeaconClient() error {
|
||||
)
|
||||
|
||||
restHandler := beaconApi.NewBeaconApiJsonRestHandler(
|
||||
http.Client{Timeout: s.beaconApiTimeout},
|
||||
http.Client{Timeout: s.beaconApiTimeout, Transport: otelhttp.NewTransport(http.DefaultTransport)},
|
||||
s.beaconApiEndpoint,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user