From 9f1e0bd19fc0300f12996b3e6595f093024e06b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B6=E4=BB=B6?= Date: Thu, 18 Aug 2022 13:43:41 +0800 Subject: [PATCH] fix(bunotel): handle option attributes (#656) --- extra/bunotel/otel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/extra/bunotel/otel.go b/extra/bunotel/otel.go index 970f2ace3..051a192b6 100644 --- a/extra/bunotel/otel.go +++ b/extra/bunotel/otel.go @@ -89,6 +89,7 @@ func (h *QueryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent) { fn, file, line := funcFileLine("github.com/uptrace/bun") attrs := make([]attribute.KeyValue, 0, 10) + attrs = append(attrs, h.attrs...) attrs = append(attrs, dbOperation, semconv.DBStatementKey.String(query),