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
feat: better otel span naming
pdewey.com
3 weeks ago
184ef435
f795befa
verified
This commit was signed with the committer's
known signature
.
pdewey.com
SSH Key Fingerprint:
SHA256:ePOVkJstqVLchGK8m9/OGQG+aFNHD5XN3xjvW9wKCA4=
+5
-1
1 changed file
expand all
collapse all
unified
split
internal
routing
routing.go
+5
-1
internal/routing/routing.go
···
163
163
handler = middleware.LoggingMiddleware(cfg.Logger)(handler)
164
164
165
165
// 6. Apply OpenTelemetry HTTP instrumentation (outermost - wraps everything)
166
166
-
handler = otelhttp.NewHandler(handler, "arabica")
166
166
+
handler = otelhttp.NewHandler(handler, "arabica",
167
167
+
otelhttp.WithSpanNameFormatter(func(_ string, r *http.Request) string {
168
168
+
return r.Method + " " + r.URL.Path
169
169
+
}),
170
170
+
)
167
171
168
172
return handler
169
173
}