Data query: Allow logging panel plugin id when executing queries (#81164)

* Data query: Allo logging panel plugin id when executing queries

* Update tracing header middleware

* Test fix

* Add panelPluginType to query analytics

* Cleanup
This commit is contained in:
Dominik Prokop
2024-01-30 00:06:31 -08:00
committed by GitHub
parent 5ab75410e9
commit f77c831e3f
13 changed files with 38 additions and 9 deletions
+3
View File
@@ -343,6 +343,8 @@ func (proxy *DataSourceProxy) logRequest() {
}
}
panelPluginType := proxy.ctx.Req.Header.Get("X-Panel-Plugin-Type")
ctxLogger := logger.FromContext(proxy.ctx.Req.Context())
ctxLogger.Info("Proxying incoming request",
"userid", proxy.ctx.UserID,
@@ -351,6 +353,7 @@ func (proxy *DataSourceProxy) logRequest() {
"datasource", proxy.ds.Type,
"uri", proxy.ctx.Req.RequestURI,
"method", proxy.ctx.Req.Method,
"panelPluginType", panelPluginType,
"body", body)
}