Skip to content

feat: add machine log ingestion byte-rate metric#3106

Merged
talos-bot merged 1 commit into
siderolabs:mainfrom
oguzkilcan:feat/machine-log-ingestion-metrics
Jul 10, 2026
Merged

feat: add machine log ingestion byte-rate metric#3106
talos-bot merged 1 commit into
siderolabs:mainfrom
oguzkilcan:feat/machine-log-ingestion-metrics

Conversation

@oguzkilcan

Copy link
Copy Markdown
Member

Adds omni_machine_logs_ingested_bytes_total, a Prometheus counter on LogHandler that tracks the size of every machine log message accepted for ingestion.

Resolves: #3095

Copilot AI left a comment

Copy link
Copy Markdown

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 adds a Prometheus metric to track the byte volume of machine logs accepted for ingestion, enabling dashboards/alerting to calculate an effective ingestion Bps rate for the existing rate-limiting behavior (resolves #3095).

Changes:

  • Add omni_machine_logs_ingested_bytes_total counter to LogHandler and expose it via Prometheus collector registration.
  • Add unit tests validating the metric increments only for messages that pass the rate limiter.
  • Extend the Grafana “omni-details” dashboard with panels for log ingestion Bps and dropped-bytes Bps.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
internal/pkg/siderolink/loghandler.go Adds ingested-bytes counter, implements Prometheus collector on LogHandler, and increments metric during message handling.
internal/pkg/siderolink/loghandler_test.go Adds tests for the new ingested-bytes metric behavior with/without the limiter.
hack/compose/grafana/dashboards/omni-details.json Adds a new “Machine Logs” dashboard row with ingestion and dropped-bytes time series panels.
cmd/omni/pkg/app/app.go Registers the LogHandler collector with Prometheus at app startup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/pkg/siderolink/loghandler.go Outdated
Comment thread internal/pkg/siderolink/loghandler.go Outdated
Adds `omni_machine_logs_ingested_bytes_total`, a Prometheus counter on LogHandler that tracks the size of every machine log messages successfully written to storage.

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
@github-project-automation github-project-automation Bot moved this from In Review to Approved in Planning Jul 10, 2026
@oguzkilcan

Copy link
Copy Markdown
Member Author

/m

@talos-bot talos-bot merged commit a47e712 into siderolabs:main Jul 10, 2026
53 of 58 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in Planning Jul 10, 2026
@oguzkilcan oguzkilcan deleted the feat/machine-log-ingestion-metrics branch July 10, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

machine log ingestion metric

4 participants