trace user login and datasource name instead of id (#29183)

id's are not very helpful when debugging a system.

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist 2020-11-18 09:21:45 +01:00 committed by GitHub
parent 8c9bb7a215
commit 15a6508d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,9 +144,9 @@ func (proxy *DataSourceProxy) HandleRequest() {
proxy.ctx.Req.Request = proxy.ctx.Req.WithContext(ctx)
span.SetTag("datasource_id", proxy.ds.Id)
span.SetTag("datasource_name", proxy.ds.Name)
span.SetTag("datasource_type", proxy.ds.Type)
span.SetTag("user_id", proxy.ctx.SignedInUser.UserId)
span.SetTag("user", proxy.ctx.SignedInUser.Login)
span.SetTag("org_id", proxy.ctx.SignedInUser.OrgId)
proxy.addTraceFromHeaderValue(span, "X-Panel-Id", "panel_id")