otelsql icon indicating copy to clipboard operation
otelsql copied to clipboard

Ability to add attributes to single queries

Open oliverdain opened this issue 7 months ago • 0 comments

I'm wondering if there's any way to add attributes to individual queries. The use case is that we have a query or two that we know are slow and that's fine (e.g. an "advanced search" functionality) so we want to track things like the 99th percentile latency of all queries except the known slow ones. The ideal would be something like:

func QueryWithAttrs(ctx context.Context, attrs []otel.Attribute, query string, args ...any)

Is that possible?

oliverdain avatar Jul 09 '24 20:07 oliverdain