Background
Introduced in PR #346, RouteCacheKey::for_route_request derives canonical cache keys from route request payloads. The implementation has no logging, tracing spans, or metrics.
Problem
Operators cannot:
- Diagnose derivation failures in production
- Measure derivation latency or detect regressions
- Monitor error rates for
RouteCacheKeyDerivationError
Required work
- Add a
tracing::debug_span (or #[tracing::instrument]) at the for_route_request entry point recording input size and outcome.
- Emit a
tracing::warn! log when RouteCacheKeyDerivationError is returned, including a stable contextual message.
- Enrich
RouteCacheKeyDerivationError variants with contextual display messages suitable for log output.
- Add a metrics counter (using the existing Prometheus infrastructure) for derivation errors and a histogram for derivation latency.
References
Background
Introduced in PR #346,
RouteCacheKey::for_route_requestderives canonical cache keys from route request payloads. The implementation has no logging, tracing spans, or metrics.Problem
Operators cannot:
RouteCacheKeyDerivationErrorRequired work
tracing::debug_span(or#[tracing::instrument]) at thefor_route_requestentry point recording input size and outcome.tracing::warn!log whenRouteCacheKeyDerivationErroris returned, including a stable contextual message.RouteCacheKeyDerivationErrorvariants with contextual display messages suitable for log output.References