otelsql
otelsql copied to clipboard
Ability to add attributes to single queries
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?