Skip to content

Commit 8305919

Browse files
committed
add colllector lock to prevent reading unfinished collector metrics
Signed-off-by: Markus Blaschke <[email protected]>
1 parent ac32471 commit 8305919

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ func startHttpServer() {
344344
}
345345
})
346346

347-
mux.Handle("/metrics", tracing.RegisterAzureMetricAutoClean(promhttp.Handler()))
347+
mux.Handle("/metrics", collector.HttpWaitForRlock(
348+
tracing.RegisterAzureMetricAutoClean(promhttp.Handler())),
349+
)
348350

349351
srv := &http.Server{
350352
Addr: opts.Server.Bind,

0 commit comments

Comments
 (0)