From ecebaf1bdfe8656b7813283119553d1a38be0a27 Mon Sep 17 00:00:00 2001 From: owensmallwood Date: Thu, 24 Oct 2024 13:49:38 -0600 Subject: [PATCH] Unified Storage: Add traces to poller (#95369) add traces to poller --- pkg/storage/unified/sql/backend.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/storage/unified/sql/backend.go b/pkg/storage/unified/sql/backend.go index 0a310203dde..1e9459336d4 100644 --- a/pkg/storage/unified/sql/backend.go +++ b/pkg/storage/unified/sql/backend.go @@ -531,6 +531,7 @@ func (b *backend) poller(ctx context.Context, since groupResourceRV, stream chan case <-b.done: return case <-t.C: + ctx, span := b.tracer.Start(ctx, tracePrefix+"poller") // List the latest RVs grv, err := b.listLatestRVs(ctx) if err != nil { @@ -562,12 +563,15 @@ func (b *backend) poller(ctx context.Context, since groupResourceRV, stream chan } t.Reset(b.pollingInterval) + span.End() } } } // listLatestRVs returns the latest resource version for each (Group, Resource) pair. func (b *backend) listLatestRVs(ctx context.Context) (groupResourceRV, error) { + ctx, span := b.tracer.Start(ctx, tracePrefix+"listLatestRVs") + defer span.End() var grvs []*groupResourceVersion err := b.db.WithTx(ctx, ReadCommittedRO, func(ctx context.Context, tx db.Tx) error { var err error