Add use cases to README and expand Prometheus metrics - #11
Merged
Conversation
Add a Use Cases section to the README explaining core functionality (domain migrations, SEO, vanity URLs, API deprecation, bot mitigation, multi-team config). Expand Prometheus metrics with build info, uptime, config info, rate limiter observability, standard Go/process collectors, and full syncer instrumentation. Add Prometheus usage guide to README with scrape config, key metrics, and example Grafana alerts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📊 Go Benchmark ResultsSummary
✅ No significant performance regressions detected. 📊 Full benchstat output |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📊 Go Benchmark ResultsSummary
✅ No significant performance regressions detected. 📊 Full benchstat output |
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
Details
New metrics (redirector)
redirector_build_inforedirector_uptime_secondsredirector_config_inforedirector_rate_limited_totalgo_*process_*New metrics (redirector-sync)
redirector_sync_sync_totalredirector_sync_sync_duration_secondsredirector_sync_last_sync_timestamp_secondsredirector_sync_last_sync_successredirector_sync_fetch_totalredirector_sync_fetch_duration_secondsredirector_sync_push_totalredirector_sync_push_duration_secondsredirector_sync_rules_fetchedredirector_sync_lint_errors_totalDesign decisions
OnLimitedFunc) to stay decoupled from the metrics package — dependency injection, not a direct importserver.WithBuildInfo(...)) to avoid breaking the existingserver.New()API/metricsis added alongside/healthand/status, no new listener requiredcollectors.NewGoCollector()andcollectors.NewProcessCollector()for full runtime visibilityFiles changed
README.mddocs/MANAGEMENT_API.mdinternal/metrics/metrics.gointernal/metrics/syncer_metrics.gointernal/metrics/metrics_test.gointernal/metrics/syncer_metrics_test.gointernal/ratelimit/ratelimit.goOnLimitedFunccallback, instrumentedAllow()internal/server/server.goWithBuildInfooption, wired config_info + rate limiter callbackcmd/redirector/main.gocmd/redirector-sync/main.go/metricsendpointTest plan
go test ./internal/metrics/ -v)go test ./...— 15 packages, 0 failures)go vet ./...cleango build ./...compiles without errorscurl localhost:8081/metricsshows new metricscurl localhost:9090/metricsshows syncer metrics🤖 Generated with Claude Code