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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user