Logging: Add WithContextualAttributes to pass log params based on the given context (#74428)

* suggestion to use `RegisterContextualLogProvider`

* add `pluginId`

* change to `WithContextualAttributes`

* move approach to instrumentation.go

* improve `WithContextualAttributes`

* unexport consts

* typo

* remove comment

* add `nil` check
This commit is contained in:
Sven Grossmann
2023-09-07 13:13:34 +02:00
committed by GitHub
parent 44e51ffe8b
commit 7e01dde762
5 changed files with 132 additions and 16 deletions
+1
View File
@@ -32,6 +32,7 @@ func (d *Decorator) QueryData(ctx context.Context, req *backend.QueryDataRequest
}
client := clientFromMiddlewares(d.middlewares, d.client)
return client.QueryData(ctx, req)
}