[{"data":1,"prerenderedAt":100},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fmain\u002Fobservability":3},{"id":4,"title":5,"body":6,"description":87,"extension":88,"group":89,"meta":90,"navigation":91,"order":92,"path":93,"section":94,"seo":95,"source":96,"stem":97,"version":98,"__hash__":99},"docs\u002Fdocs\u002Fmain\u002Fobservability.md","Metrics and tracing",{"type":7,"value":8,"toc":79},"minimark",[9,14,18,22,30,33,37,48,64,68,71],[10,11,13],"h2",{"id":12},"correlate-requests","Correlate requests",[15,16,17],"p",{},"Default request logging now includes service, environment, request_id and trace_id. The server returns X-Request-ID and a validated W3C traceparent. Pass the request context into services to retain correlation. HTTP-to-gRPC unary instrumentation preserves the trace ID; streaming instrumentation and an OTLP span exporter are not declared supported.",[10,19,21],{"id":20},"opt-in-to-metrics","Opt in to metrics",[15,23,24,25,29],{},"Install ",[26,27,28],"code",{},"observability.HTTP(metrics)"," through application middleware and manage the Metrics resource in your module. Metrics collect requests, errors, in-flight work and cumulative latency buckets. Each collector retains at most 128 operation labels, including overflow; labels are limited to 160 bytes and must not contain control characters. Use fixed route\u002FRPC patterns, never user IDs or raw URLs.",[15,31,32],{},"Finite histogram boundaries are 5, 10, 25, 50, 100, 250, 500, 1000, 2500 and 5000 milliseconds, plus +Inf. Snapshots are concurrency safe. The default application requires no metrics backend.",[10,34,36],{"id":35},"export-to-prometheus","Export to Prometheus",[15,38,39,40,43,44,47],{},"The optional ",[26,41,42],{},"github.com\u002Famkargar\u002Fgonex\u002Fobservability\u002Fprometheus"," package supplies ",[26,45,46],{},"Handler(metrics)",". Mount this standard net\u002Fhttp handler deliberately on a protected operational route\u002Flistener. It emits Prometheus text 0.0.4 and starts no network client or exporter worker. A disconnected monitoring backend cannot block API requests through a push exporter because none is started.",[15,49,50,51,58,59,63],{},"The ",[52,53,57],"a",{"href":54,"rel":55},"https:\u002F\u002Fgithub.com\u002Famkargar\u002Fgonex\u002Ftree\u002Fmain\u002Fexamples\u002Fobservability",[56],"nofollow","diagnostic source example"," demonstrates a dependency failure, 503 readiness, correlated logs and counters\u002Fhistograms, followed by recovery. The executable is a maintainer demonstration; install Gonex in your own application using the ",[52,60,62],{"href":61},"\u002Fdocs\u002Fmain\u002Fquick-start\u002F","CLI guide",".",[10,65,67],{"id":66},"privacy-and-cost","Privacy and cost",[15,69,70],{},"Default logs\u002Flabels exclude bodies, tokens, headers, query strings and raw unmatched paths. Nonstandard method tokens use OTHER. Application-defined fields remain your responsibility. Custom writers\u002Freadiness callbacks must honor their contracts; arbitrary callbacks cannot be forcibly interrupted safely.",[15,72,73,74,78],{},"Core and telemetry overhead are measured separately, including paced loopback workloads and CPU\u002Fheap profiles. Review the ",[52,75,77],{"href":76},"\u002Fdocs\u002Fmain\u002Fproduction-readiness\u002F","readiness evidence"," before treating short CI results as deployment SLOs.",{"title":80,"searchDepth":81,"depth":81,"links":82},"",2,[83,84,85,86],{"id":12,"depth":81,"text":13},{"id":20,"depth":81,"text":21},{"id":35,"depth":81,"text":36},{"id":66,"depth":81,"text":67},"Correlate Gonex request logs and unary RPC traces, collect bounded latency histograms and opt in to Prometheus metrics.","md","SHIP YOUR APP",{},true,147,"\u002Fdocs\u002Fmain\u002Fobservability","build",{"title":5,"description":87},"observability.md","docs\u002Fmain\u002Fobservability","main","2EvDcXkqvVeqaMsLUVCd-sMIX79rueHhuAf3xda6778",1792521640593]