Documentation
¶
Overview ¶
Package observ is the edge observability middleware (ADR-0114, F76): RED metrics (request rate / errors / duration by function+status) off the OTel meter, an edge span that mints or adopts a W3C traceparent so the downstream invocation span parents under it (the ingress hop joins the one-run-one-trace waterfall, ADR-0101/0102), and a structured access log correlated by X-Request-Id. It is additive (never rejects) and no-op-friendly (the default no-op Telemetry ⇒ no metric/trace dials; the access log uses slog). It sits outer than the F75 limiter (so it times the whole hop incl. rejects) and inner than RequestID (so it can read the id). Its ResponseWriter wrapper forwards http.Flusher + http.Hijacker so SSE/WS are never broken.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Target ¶
Target is the request-scoped holder observ seeds and dataplane fills with the resolved function, so the metric/log label is correct even for a Route hit (observ runs outside dataplane.Handler).
func TargetFrom ¶
TargetFrom returns the request's Target holder, if seeded.