Skip to content

fix(vector): fix internal_metrics typo and set sane 30s scrape interval - #3440

Open
saule1508 wants to merge 1 commit into
openshift:masterfrom
saule1508:fix/vector-scrape-interval-secs
Open

fix(vector): fix internal_metrics typo and set sane 30s scrape interval#3440
saule1508 wants to merge 1 commit into
openshift:masterfrom
saule1508:fix/vector-scrape-interval-secs

Conversation

@saule1508

@saule1508 saule1508 commented Aug 28, 2026

Copy link
Copy Markdown

Description

The Vector collector DaemonSet consistently consumes 4–6 GiB of RAM per node (and up to 10 GiB) on our cluster. By looking at the prometheus metrics, the source of the memory consumption is the component internal_metrics which generates upward of 3Mib/s (compared to 0.2 MiB/s forthe application logs).

This is because the generated vector.toml completely omits scrape_interval_secs, forcing Vector to poll its entire registry on its internal 1-second default

This PR corrects the typo in the key name (ScrapeIntervalSeconds instead of ScrapIntervalSeconds) and in the serialization tags (secs instead of seconds) and sets a sane, explicit default of 30 seconds inside the generator.

/cc jcantrill
/assign alanconway

Links

  • Depending on PR(s):
  • GitHub issue:
  • JIRA:
  • Enhancement proposal:

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the internal metrics scrape interval setting name.
    • Internal metrics now scrape every 30 seconds by default across generated configurations.
    • Prometheus output authentication explicitly uses the GET HTTP method.

@openshift-ci

openshift-ci Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saule1508
Once this PR has been reviewed and has the lgtm label, please assign jcantrill for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 666aa0c6-b522-4f7a-aed4-4336672b3d64

📥 Commits

Reviewing files that changed from the base of the PR and between edd266b and 50797f3.

📒 Files selected for processing (5)
  • internal/generator/vector/api/config_test.go
  • internal/generator/vector/api/sources/internal_metrics.go
  • internal/generator/vector/conf/complex.toml
  • internal/generator/vector/conf/complex_http_receiver.toml
  • internal/generator/vector/conf/container.toml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Vector internal metrics API now uses scrape_interval_secs and defaults to 30 seconds. Test fixtures and generated configuration examples use the same field and value.

Changes

Internal metrics scrape interval

Layer / File(s) Summary
Update internal metrics API default
internal/generator/vector/api/sources/internal_metrics.go
The field is renamed to ScrapeIntervalSeconds, its serialization tag becomes scrape_interval_secs, and the constructor sets it to 30.
Align configuration fixtures
internal/generator/vector/api/config_test.go, internal/generator/vector/conf/*.toml
TOML and YAML fixtures, plus Vector configurations, use scrape_interval_secs = 30. The Prometheus authentication verb remains get.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 50797

The PR corrects the internal metrics configuration naming and sets an explicit 30-second scrape interval; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: jcantrill, vparfonov

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the typo correction and the explicit 30-second scrape interval. It accurately summarizes the main changes.
Description check ✅ Passed The description explains the memory issue, identifies the missing configuration and 1-second default, and summarizes the implementation. It includes reviewer and approver assignments and the required …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the memory issue, identifies the missing configuration and 1-second default, and summarizes the implementation. It includes reviewer and approver assignments and the required Links section.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 28, 2026
@openshift-ci

openshift-ci Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Hi @saule1508. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@vparfonov

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 28, 2026
@vparfonov

Copy link
Copy Markdown
Contributor

@jcantrill fixing name of config parameter is totally correct scrape_interval_secs, but not sure about value in 30 seconds

@vparfonov

Copy link
Copy Markdown
Contributor

/retest-required

@openshift-ci

openshift-ci Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@saule1508: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants