fix: drop admin metric toggle handler#1209
Merged
Merged
Conversation
55572f1 to
55d048a
Compare
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
55d048a to
ab005ae
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the admin API surface for toggling OpenTelemetry metrics at runtime (which only worked per instance and was incomplete), keeping metrics enablement controlled via environment configuration instead.
Changes:
- Removed the
/metrics/configadmin routes and associated wiring in the admin app. - Dropped the
getMetricsConfig()registry accessor and updated metrics registry comments to no longer imply an admin API. - Updated acceptance coverage and admin acceptance tests to no longer validate the removed metrics config endpoints.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/internal/monitoring/metrics.ts | Removes the admin-oriented metrics config accessor and adjusts comments around the registry. |
| src/http/routes/admin/metrics.ts | Deletes the admin metrics config route handler (GET/PUT /config). |
| src/http/routes/admin/index.ts | Stops exporting the removed admin metrics route module. |
| src/admin-app.ts | Removes Swagger tag and route registration for the deleted admin metrics config endpoints. |
| acceptance/specs/admin.test.ts | Removes admin acceptance coverage for /metrics/config read/update. |
| acceptance/API_COVERAGE.md | Updates documented admin capability coverage to reflect removal of metrics config endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
itslenny
approved these changes
Jul 6, 2026
Coverage Report for CI Build 28811075695Coverage increased (+0.01%) to 79.124%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
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.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
There is an admin endpoint to toggle metrics but it works only per instance. It doesn't work for all. Additionally, some counter metrics don't have the knob to toggle.
What is the new behavior?
That's why it's mostly useless, dropping the handler but it's still controlled via env.
Additional context
Related to #1208