Skip to content

Commit 908cdeb

Browse files
committed
fix: publish query.cache_hit from resolver.Resolve (#8909)
1 parent 9f19ca5 commit 908cdeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runtime/resolver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
runtimev1 "github.com/rilldata/rill/proto/gen/rill/runtime/v1"
1616
"github.com/rilldata/rill/runtime/drivers"
1717
"github.com/rilldata/rill/runtime/pkg/jsonval"
18+
"github.com/rilldata/rill/runtime/pkg/observability"
1819
"go.opentelemetry.io/otel/attribute"
1920
"go.opentelemetry.io/otel/trace"
2021
)
@@ -118,7 +119,7 @@ func (r *Runtime) Resolve(ctx context.Context, opts *ResolveOptions) (res Resolv
118119
ctx, span := tracer.Start(ctx, "runtime.Resolve", trace.WithAttributes(attribute.String("resolver", opts.Resolver)))
119120
var cacheHit bool
120121
defer func() {
121-
span.SetAttributes(attribute.Bool("cache_hit", cacheHit))
122+
observability.AddRequestAttributes(ctx, attribute.Bool("query.cache_hit", cacheHit))
122123
if resErr != nil {
123124
span.SetAttributes(attribute.String("err", resErr.Error()))
124125
}

0 commit comments

Comments
 (0)