Instrumentation: Add status_source label to request metrics/logs (#74114)

Ref #68480

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
This commit is contained in:
Marcus Efraimsson
2023-09-11 12:13:13 +02:00
committed by GitHub
co-authored by Giuseppe Guerra
parent 97d568e60a
commit 8ee43f3705
27 changed files with 487 additions and 67 deletions
+9 -7
View File
@@ -7,6 +7,7 @@ import (
"github.com/grafana/grafana/pkg/services/notifications"
"github.com/grafana/grafana/pkg/services/oauthtoken/oauthtokentest"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/web"
)
func ProvideTestEnv(
@@ -19,13 +20,13 @@ func ProvideTestEnv(
oAuthTokenService *oauthtokentest.Service,
) (*TestEnv, error) {
return &TestEnv{
server,
store,
ns,
grpcServer,
pluginRegistry,
httpClientProvider,
oAuthTokenService,
Server: server,
SQLStore: store,
NotificationService: ns,
GRPCServer: grpcServer,
PluginRegistry: pluginRegistry,
HTTPClientProvider: httpClientProvider,
OAuthTokenService: oAuthTokenService,
}, nil
}
@@ -37,4 +38,5 @@ type TestEnv struct {
PluginRegistry registry.Service
HTTPClientProvider httpclient.Provider
OAuthTokenService *oauthtokentest.Service
RequestMiddleware web.Middleware
}