Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee

fix: filter out static file requests from otel spans

pdewey.com 5af38816 184ef435

verified
+4
+4
internal/routing/routing.go
··· 2 2 3 3 import ( 4 4 "net/http" 5 + "strings" 5 6 6 7 "arabica/internal/atproto" 7 8 "arabica/internal/handlers" ··· 164 165 165 166 // 6. Apply OpenTelemetry HTTP instrumentation (outermost - wraps everything) 166 167 handler = otelhttp.NewHandler(handler, "arabica", 168 + otelhttp.WithFilter(func(r *http.Request) bool { 169 + return !strings.HasPrefix(r.URL.Path, "/static/") && r.URL.Path != "/favicon.ico" 170 + }), 167 171 otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string { 168 172 return r.Method + " " + r.URL.Path 169 173 }),