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.
Component(s)
scraper/scraperhelper
Describe the issue you're reporting
While investigating
scraperhelper, I noticed that the documented behavior forcollection_intervaldoes not appear to match the current implementation.The documentation generated from
metadata.yamlstates thatcollection_intervalis used as the scrape context timeout.However, in the controller implementation, a context deadline is only created when
Timeout > 0.The existing test
TestScrapeFuncNoTimeoutalso verifies that whenTimeoutis left at its default value, the scrape context has no deadline.References
Documentation:
scraperhelper/internal/controller/metadata.yamlscraperhelper/config.schema.yamlImplementation:
scraperhelper/internal/controller/controller.goTestScrapeFuncNoTimeoutExpected
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.