1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: exclude health endpoint from sentry tracing

This commit is contained in:
Ferdinand Mütsch 2021-04-10 00:10:16 +02:00
parent 1783858854
commit ae97095688

View File

@ -311,7 +311,7 @@ func initSentry(config sentryConfig, debug bool) {
hub := sentry.GetHubFromContext(ctx.Span.Context())
txName := hub.Scope().Transaction()
if strings.HasPrefix(txName, "GET /assets") {
if strings.HasPrefix(txName, "GET /assets") || strings.HasPrefix(txName, "GET /api/health") {
return sentry.SampledFalse
}
if txName == "POST /api/heartbeat" {