SSE: (Instrumentation) Add Tracing (#66700)

spans are prefixed `SSE.`
This commit is contained in:
Kyle Brandt
2023-04-18 08:04:51 -04:00
committed by GitHub
parent f3fcc31277
commit 840fb32ad8
20 changed files with 98 additions and 35 deletions
+3
View File
@@ -70,6 +70,7 @@ func (s *Service) TransformData(ctx context.Context, now time.Time, req *Request
}
start := time.Now()
ctx, span := s.tracer.Start(ctx, "SSE.TransformData")
defer func() {
var respStatus string
switch {
@@ -80,6 +81,8 @@ func (s *Service) TransformData(ctx context.Context, now time.Time, req *Request
}
duration := float64(time.Since(start).Nanoseconds()) / float64(time.Millisecond)
s.metrics.expressionsQuerySummary.WithLabelValues(respStatus).Observe(duration)
span.End()
}()
// Build the pipeline from the request, checking for ordering issues (e.g. loops)