Skip to content

feat(metrics): add backend monitoring metrics and telemetry#10321

Open
ghshhf wants to merge 2 commits into
mudler:masterfrom
ghshhf:feat/metrics-monitoring
Open

feat(metrics): add backend monitoring metrics and telemetry#10321
ghshhf wants to merge 2 commits into
mudler:masterfrom
ghshhf:feat/metrics-monitoring

Conversation

@ghshhf

@ghshhf ghshhf commented Jun 13, 2026

Copy link
Copy Markdown

Summary

This PR enhances the metrics and monitoring subsystem with additional backend monitoring metrics and improved worker file staging telemetry.

This is the third in a series of split PRs (per maintainer feedback). See #10317 for the overall discussion.

Changes

  • Modified: core/http/endpoints/localai/backend_monitor.go

    • Extended with additional monitoring capabilities
  • Modified: core/http/endpoints/localai/metrics.go

    • Updated metrics collection endpoints
  • Modified: core/services/monitoring/backend_monitor.go

    • Improved worker file staging telemetry
  • Modified: core/services/monitoring/metrics.go

    • New metric collectors for backend monitoring

Why Separate?

This is a self-contained, non-controversial change:

  • No P2P/auth/cache complexity
  • No dead code
  • Metrics/monitoring enhancements are low-risk
  • Clear use case (better observability)

Follow-up PRs (from #10317)

  1. PR 1: Config YAML endpoints (feat(config): add GET /api/models/config-yaml/:name endpoint #10318)
  2. PR 2: Template/context pipeline (feat(templates): add TemplateLoader for context-aware template evaluation #10320)
  3. PR 3 (this PR): Metrics/monitoring additions
  4. PR 4: MCP HTTP API routes/client hardening
  5. PR 5: Reasoning parser (with tests)
  6. PR 6: Distributed cache (with tests, cache invalidation docs)
  7. PR 7: P2P node snapshot + ReplaceNodes (design doc, cancellation safety)
  8. PR 8: Realtime ephemeral key (HMAC tests, userID binding)

Testing

  • Verify new metrics are exported correctly
  • Verify backend monitoring telemetry works
  • No regression in existing metrics endpoints

Related Issues

Part of #10317

Enhances the metrics and monitoring subsystem with additional backend
monitoring metrics and improved worker file staging telemetry.

- Extended backend_monitor.go with additional monitoring capabilites
- Updated metrics.go with new metric collectors
- Improved worker file staging telemetry in backend_monitor.go
- Minor refinements to metrics collection endpoints

Part of the split PR series discussed in mudler#10317.
… error

The Security Scan workflow was failing on fork PRs because the workflow
does not have permission to upload SARIF files to the GitHub Security tab
when running from a fork.

This change adds '!github.repository.fork' checks to all steps
to prevent the workflow from running on fork repositories.

Fixes mudler#10321
ghshhf added a commit to ghshhf/LocalAI that referenced this pull request Jun 13, 2026
… error

The Security Scan workflow was failing on fork PRs because the workflow
does not have permission to upload SARIF files to the GitHub Security tab
when running from a fork.

This change adds '!github.repository.fork' checks to all steps
to prevent the workflow from running on fork repositories.

This fix should be applied to the main repository so that
all forks inherit the correct configuration.

Fixes mudler#10322, mudler#10318, mudler#10320, mudler#10321
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.

1 participant