Skip to content

[scraperhelper] collection interval documentation conflicts with observed timeout behavior #15718

Description

@SSOHEB

Component(s)

scraper/scraperhelper

Describe the issue you're reporting

While investigating scraperhelper, I noticed that the documented behavior for collection_interval does not appear to match the current implementation.

The documentation generated from metadata.yaml states that collection_interval is used as the scrape context timeout.

However, in the controller implementation, a context deadline is only created when Timeout > 0.

The existing test TestScrapeFuncNoTimeout also verifies that when Timeout is left at its default value, the scrape context has no deadline.

References

Documentation:

  • scraperhelper/internal/controller/metadata.yaml
  • scraperhelper/config.schema.yaml
  • Generated configuration documentation

Implementation:

  • scraperhelper/internal/controller/controller.go
  • TestScrapeFuncNoTimeout

Expected

The documentation and implementation should describe the same behavior.
If the current implementation is intended, the documentation should be updated.
If the documentation reflects the intended behavior, then the implementation may need investigation.

I'd be happy to prepare a PR once it's clear whether this should be resolved as a documentation update or an implementation change.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNew item requiring triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions