Skip to content

fix: drop admin metric toggle handler#1209

Merged
ferhatelmas merged 1 commit into
masterfrom
ferhat/drop-metric-toggle
Jul 6, 2026
Merged

fix: drop admin metric toggle handler#1209
ferhatelmas merged 1 commit into
masterfrom
ferhat/drop-metric-toggle

Conversation

@ferhatelmas

Copy link
Copy Markdown
Member

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

Copilot AI review requested due to automatic review settings July 6, 2026 17:36
@ferhatelmas ferhatelmas requested a review from a team as a code owner July 6, 2026 17:36
@ferhatelmas ferhatelmas force-pushed the ferhat/drop-metric-toggle branch from 55572f1 to 55d048a Compare July 6, 2026 17:37
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas force-pushed the ferhat/drop-metric-toggle branch from 55d048a to ab005ae Compare July 6, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/config admin 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.

@ferhatelmas ferhatelmas changed the title fix: drop admin metric handler fix: drop admin metric toggle handler Jul 6, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28811075695

Coverage increased (+0.01%) to 79.124%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12358
Covered Lines: 10217
Line Coverage: 82.68%
Relevant Branches: 7143
Covered Branches: 5213
Branch Coverage: 72.98%
Branches in Coverage %: Yes
Coverage Strength: 418.29 hits per line

💛 - Coveralls

@ferhatelmas ferhatelmas merged commit a0a8d5f into master Jul 6, 2026
26 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/drop-metric-toggle branch July 6, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants