feat(metrics): add Prometheus metrics endpoint with traffic and DNS s…#30
Merged
Conversation
…tats Adds a /metrics HTTP endpoint serving Prometheus metrics including: - TCP/UDP connection counts and traffic totals per outbound - DNS cache hit ratio and request counters - Node latency probing via alive dialer set exposure Depends on PR#968 runtime_stats foundation already in origin/main.
DNS Benchmark Compare
Suite Status
control_dns_cacheDNS Benchmark Compare (control_dns_cache)
Failure Log (tail)component_upstream_hotpathDNS Benchmark Compare (component_upstream_hotpath)
Failure Log (tail) |
added 2 commits
April 25, 2026 10:12
Conflict resolution kept HEAD's `(err error)` return signature but left two return statements from PR#29's `(cacheHit bool, err error)` signature as dead code in the shared post-conflict body. Lines fixed: - `return true, nil` → `return nil` - `return false, fmt.Errorf(...)` → `return fmt.Errorf(...)`
dns_control.go:2490/2506 - handleWithResponseWriter_ declared (err error) but two return statements still returned (bool, error) from PR#29's old signature. Stripped the dead bool values. cmd/run.go:866 - newEndpointCfg declared inside the reload goroutine but referenced in the outer main loop's <-runStateChanges case (different scope). Moved endpointConfigChanged block into the reload goroutine where the variable is in scope. scripts/ci/benchmarks/**/*_test.go - overlay benchmark files have package declarations matching their target packages (control, component/dns) but live in standalone directories with no source files. go test ./... tries to compile them standalone and fails on undefined types. Added //go:build ignore to exclude from go test ./... while apply_overlay() in dns-benchmark-compare.sh now strips the tag when copying to the target package directory so benchmarks still compile correctly there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tats
Adds a /metrics HTTP endpoint serving Prometheus metrics including:
Depends on PR#968 runtime_stats foundation already in origin/main.
Background
Checklist
Full Changelogs
Issue Reference
Closes #[issue number]
Test Result