Repository navigation
Add V2Fly v5 metrics collection and direct MU Server reporting - #9
Merged
Merged
Conversation
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.
Summary
Snapshots include backend health, runtime stats, and cumulative traffic by proxy tag. The collector reads counters without clearing them and excludes user identities.
Set
MU_NODE_METRICS_REPORTING_ENABLED=truefor a report at startup and every minute. SetMU_METRICS_ENABLED=falsefor push-only operation. A transient report failure gets one retry with the same batch ID. Prometheus V2Fly collection usesMU_V2FLY_METRICS_ENABLED=true.Evidence
/metrics.TestV2FlyMetricsEndpointcovers Prometheus collection.TestReportNodeMetricsWithoutPrometheuscovers authenticated Twirp reporting with Prometheus disabled, stable batches on retry, shared backend addresses, and continued reporting when a backend fails.go test -race ./...,golangci-lint run, andgolangci-lint fmt --diffpassed.Merge Danger
Door Two-way. Both V2Fly metric delivery options default to off.
Blast Radius Monitoring. Before enabling direct reporting, deploy the MU Server handler at
/v1.NodeMetricsService/with token-to-node authorization and idempotent storage keyed by(node_id, batch_id). Reports are held in memory through the retry and can be lost during a prolonged outage.