tangled
alpha
login
or
join now
arabica.social
/
arabica
7
fork
atom
Coffee journaling on ATProto (alpha)
alpha.arabica.social
coffee
7
fork
atom
overview
issues
pulls
pipelines
fix: filter out static file requests from otel spans
pdewey.com
3 weeks ago
5af38816
184ef435
verified
This commit was signed with the committer's
known signature
.
pdewey.com
SSH Key Fingerprint:
SHA256:ePOVkJstqVLchGK8m9/OGQG+aFNHD5XN3xjvW9wKCA4=
+4
1 changed file
expand all
collapse all
unified
split
internal
routing
routing.go
+4
internal/routing/routing.go
reviewed
···
2
2
3
3
import (
4
4
"net/http"
5
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
168
+
otelhttp.WithFilter(func(r *http.Request) bool {
169
169
+
return !strings.HasPrefix(r.URL.Path, "/static/") && r.URL.Path != "/favicon.ico"
170
170
+
}),
167
171
otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string {
168
172
return r.Method + " " + r.URL.Path
169
173
}),