Otel migration (#14424)

* remove opencensus

* gaz

* update dependencies

* add missing dependencies

* fix test?

* Fix note relevance

* add otel http transport middleware

* gaz

* tidy up

* gaz

* changelog

* feedback

* gaz

* fix merge issues
This commit is contained in:
Sammy Rosso
2024-09-12 16:00:20 -07:00
committed by GitHub
parent b5cfd0d35d
commit 170a864239
129 changed files with 416 additions and 415 deletions

View File

@@ -31,10 +31,10 @@ func (s *Service) BlockExists(ctx context.Context, hash common.Hash) (bool, *big
if err != nil {
return false, nil, err
}
span.AddAttributes(trace.BoolAttribute("blockCacheHit", true))
span.SetAttributes(trace.BoolAttribute("blockCacheHit", true))
return true, hdrInfo.Number, nil
}
span.AddAttributes(trace.BoolAttribute("blockCacheHit", false))
span.SetAttributes(trace.BoolAttribute("blockCacheHit", false))
header, err := s.HeaderByHash(ctx, hash)
if err != nil {
return false, big.NewInt(0), errors.Wrap(err, "could not query block with given hash")
@@ -56,10 +56,10 @@ func (s *Service) BlockHashByHeight(ctx context.Context, height *big.Int) (commo
if err != nil {
return [32]byte{}, err
}
span.AddAttributes(trace.BoolAttribute("headerCacheHit", true))
span.SetAttributes(trace.BoolAttribute("headerCacheHit", true))
return hInfo.Hash, nil
}
span.AddAttributes(trace.BoolAttribute("headerCacheHit", false))
span.SetAttributes(trace.BoolAttribute("headerCacheHit", false))
if s.rpcClient == nil {
err := errors.New("nil rpc client")