From 8b6e75ae77b7cdbe6330c6ad4cf08dd7b02f61e4 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 19 Mar 2025 15:04:55 +0100 Subject: [PATCH] feat: use sentry tags instead of context for better observability --- internal/proxy/director/director.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/proxy/director/director.go b/internal/proxy/director/director.go index d94b93d..4d74625 100644 --- a/internal/proxy/director/director.go +++ b/internal/proxy/director/director.go @@ -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, }) }