From 576148cdbe2b4cfd7fe8e6e17a77a63a5109d840 Mon Sep 17 00:00:00 2001 From: Nozim Mehrubonov Date: Sat, 9 Sep 2023 20:33:10 +0100 Subject: [PATCH] Upgrade cache in module trace file --- module/trace/trace.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/trace/trace.go b/module/trace/trace.go index b7e80114bca..f47e594256d 100644 --- a/module/trace/trace.go +++ b/module/trace/trace.go @@ -41,7 +41,7 @@ type Tracer struct { tracer trace.Tracer shutdown func(context.Context) error log zerolog.Logger - spanCache *lru.Cache + spanCache *lru.Cache[flow.Identifier, trace.Span] chainID string sensitivity uint } @@ -88,7 +88,7 @@ func NewTracer( log.Debug().Err(err).Msg("tracing error") })) - spanCache, err := lru.New(int(DefaultEntityCacheSize)) + spanCache, err := lru.New[flow.Identifier, trace.Span](int(DefaultEntityCacheSize)) if err != nil { return nil, err }