From ba5638b38370232b94012b3b0b61e4de1304ef81 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Fri, 24 May 2024 12:17:32 +0300 Subject: [PATCH] chore(chstorage): set tracing attributes --- internal/chstorage/querier_traces.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/chstorage/querier_traces.go b/internal/chstorage/querier_traces.go index a98735b9..e05fbba5 100644 --- a/internal/chstorage/querier_traces.go +++ b/internal/chstorage/querier_traces.go @@ -208,6 +208,9 @@ func (q *Querier) spanNames(ctx context.Context, tag traceql.Attribute, opts tra ctx, span := q.tracer.Start(ctx, "spanNames", trace.WithAttributes( + attribute.Int64("chstorage.range.start", int64(opts.Start)), + attribute.Int64("chstorage.range.end", int64(opts.End)), + attribute.Stringer("chstorage.tag", tag), attribute.String("chstorage.table", table), ), ) @@ -257,11 +260,14 @@ func (q *Querier) spanNames(ctx context.Context, tag traceql.Attribute, opts tra return iterators.Slice(r), nil } -func (q *Querier) attributeValues(ctx context.Context, tag traceql.Attribute, _ tracestorage.TagValuesOptions) (_ iterators.Iterator[tracestorage.Tag], rerr error) { +func (q *Querier) attributeValues(ctx context.Context, tag traceql.Attribute, opts tracestorage.TagValuesOptions) (_ iterators.Iterator[tracestorage.Tag], rerr error) { table := q.tables.Tags ctx, span := q.tracer.Start(ctx, "attributeValues", trace.WithAttributes( + attribute.Int64("chstorage.range.start", int64(opts.Start)), + attribute.Int64("chstorage.range.end", int64(opts.End)), + attribute.Stringer("chstorage.tag", tag), attribute.String("chstorage.table", table), ), )