Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: http request metrics(#1611) #1612

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/driver/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
}
}

n.UseHandler(br)
n.Use(r.PrometheusManager())
n.UseHandler(br)

if r.sqaService != nil {
n.Use(r.sqaService)
Expand Down Expand Up @@ -385,8 +385,8 @@
}
}

n.UseHandler(pr)
n.Use(r.PrometheusManager())
n.UseHandler(pr)

if r.sqaService != nil {
n.Use(r.sqaService)
Expand Down Expand Up @@ -422,8 +422,8 @@
}
}

n.UseHandler(pr)
n.Use(r.PrometheusManager())
n.UseHandler(pr)

if r.sqaService != nil {
n.Use(r.sqaService)
Expand Down Expand Up @@ -452,7 +452,7 @@
grpcRecovery.UnaryServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)),
}
if r.Tracer(ctx).IsLoaded() {
is = append(is, grpcOtel.UnaryServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider())))

Check failure on line 455 in internal/driver/daemon.go

View workflow job for this annotation

GitHub Actions / Run lints and checks

SA1019: grpcOtel.UnaryServerInterceptor is deprecated: Use [NewServerHandler] instead. (staticcheck)
}
is = append(is, r.defaultUnaryInterceptors...)
is = append(is,
Expand All @@ -471,7 +471,7 @@
grpcRecovery.StreamServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)),
}
if r.Tracer(ctx).IsLoaded() {
is = append(is, grpcOtel.StreamServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider())))

Check failure on line 474 in internal/driver/daemon.go

View workflow job for this annotation

GitHub Actions / Run lints and checks

SA1019: grpcOtel.StreamServerInterceptor is deprecated: Use [NewServerHandler] instead. (staticcheck)
}
is = append(is, r.defaultStreamInterceptors...)
is = append(is,
Expand Down Expand Up @@ -554,8 +554,8 @@

r.PrometheusManager().RegisterRouter(router)
r.MetricsHandler().SetRoutes(router)
n.UseHandler(router)
n.Use(r.PrometheusManager())
n.UseHandler(router)

var handler http.Handler = n
options, enabled := r.Config(ctx).CORS("metrics")
Expand Down
Loading