diff options
| author | 2025-05-05 17:28:01 +0000 | |
|---|---|---|
| committer | 2025-05-05 17:28:01 +0000 | |
| commit | 73aa62581e5650e30831977203fe804b578de47f (patch) | |
| tree | 1ef5232cd5bef7509df0b1d159c24a827b8353be | |
| parent | [chore] Simplify the OTEL setup (#4110) (diff) | |
| download | gotosocial-73aa62581e5650e30831977203fe804b578de47f.tar.xz | |
[chore] fix testrig with new otel setup (#4135)
Follow-up to https://codeberg.org/superseriousbusiness/gotosocial/pulls/4110
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4135
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
| -rw-r--r-- | cmd/gotosocial/action/testrig/testrig.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/gotosocial/action/testrig/testrig.go b/cmd/gotosocial/action/testrig/testrig.go index 89e00521f..6010d4047 100644 --- a/cmd/gotosocial/action/testrig/testrig.go +++ b/cmd/gotosocial/action/testrig/testrig.go @@ -110,7 +110,7 @@ var Start action.GTSAction = func(ctx context.Context) error { } config.SetInstanceLanguages(parsedLangs) - if err := observability.InitializeTracing(); err != nil { + if err := observability.InitializeTracing(ctx); err != nil { return fmt.Errorf("error initializing tracing: %w", err) } @@ -161,7 +161,7 @@ var Start action.GTSAction = func(ctx context.Context) error { defer testrig.StopWorkers(state) // Initialize metrics. - if err := observability.InitializeMetrics(state.DB); err != nil { + if err := observability.InitializeMetrics(ctx, state.DB); err != nil { return fmt.Errorf("error initializing metrics: %w", err) } @@ -250,7 +250,6 @@ var Start action.GTSAction = func(ctx context.Context) error { var ( authModule = api.NewAuth(state, processor, idp, routerSession, sessionName, cookiePolicy) // auth/oauth paths clientModule = api.NewClient(state, processor) // api client endpoints - metricsModule = api.NewMetrics() // Metrics endpoints healthModule = api.NewHealth(state.DB.Ready) // Health check endpoints fileserverModule = api.NewFileserver(processor) // fileserver endpoints robotsModule = api.NewRobots() // robots.txt endpoint @@ -263,7 +262,6 @@ var Start action.GTSAction = func(ctx context.Context) error { // these should be routed in order authModule.Route(route) clientModule.Route(route) - metricsModule.Route(route) healthModule.Route(route) fileserverModule.Route(route) fileserverModule.RouteEmojis(route, instanceAccount.ID) |
