chore(tracing): add tracing for frontend and db session (#91509)
This PR adds instrumentation for loading frontend SPA along with select methods in the dashboard service, and cleans up span handling in sqlstore. --------- Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
co-authored by
Dave Henderson
parent
abbfc15563
commit
d4916207a0
@@ -11,6 +11,7 @@ import (
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
"github.com/grafana/grafana/pkg/services/login"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
func (hs *HTTPServer) GetRedirectURL(c *contextmodel.ReqContext) string {
|
||||
@@ -63,3 +64,9 @@ func ValidateAndNormalizeEmail(email string) (string, error) {
|
||||
|
||||
return e.Address, nil
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) injectSpan(c *contextmodel.ReqContext, name string) (*contextmodel.ReqContext, trace.Span) {
|
||||
ctx, span := hs.tracer.Start(c.Req.Context(), name)
|
||||
c.Req = c.Req.WithContext(ctx)
|
||||
return c, span
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user