feat: use sentry tags instead of context for better observability
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good

This commit is contained in:
wpetit 2025-03-19 15:04:55 +01:00
parent 692523e54f
commit 8b6e75ae77

View File

@ -80,9 +80,10 @@ func (d *Director) rewriteRequest(r *http.Request) (*http.Request, error) {
r = r.WithContext(proxyCtx)
if sentryScope, _ := SentryScope(ctx); sentryScope != nil {
sentryScope.SetContext("bouncer", sentry.Context{
"proxy_name": p.Name,
"proxy_target": r.URL.String(),
sentryScope.SetTags(map[string]string{
"bouncer.proxy.name": string(p.Name),
"bouncer.proxy.target.url": r.URL.String(),
"bouncer.proxy.target.host": r.URL.Host,
})
}