Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scraper helper] improve ease of use of scraper controller settings #7951

Merged

Conversation

MovieStoreGuy
Copy link
Contributor

Description:

Link to tracking Issue:
N/A

Testing:

Added tests for additional options

Documentation:

Documentation to be added to affected components in contrib

@MovieStoreGuy MovieStoreGuy requested review from a team and mx-psi June 21, 2023 10:57
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage: 96.15% and project coverage change: -0.07 ⚠️

Comparison is base (7606f99) 90.96% compared to head (fc5326a) 90.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7951      +/-   ##
==========================================
- Coverage   90.96%   90.89%   -0.07%     
==========================================
  Files         300      301       +1     
  Lines       15090    15126      +36     
==========================================
+ Hits        13726    13749      +23     
- Misses       1091     1105      +14     
+ Partials      273      272       -1     
Impacted Files Coverage Δ
receiver/scraperhelper/scrapercontroller.go 94.21% <91.66%> (-0.66%) ⬇️
receiver/scraperhelper/settings.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MovieStoreGuy
Copy link
Contributor Author

With making a breaking change that impacts contrib, what is the best way to order the PRs?

Should those be raised after this has been merged?
Should it be done beforehand? If so, what is the best way to reference this change to validate it?

@mx-psi
Copy link
Member

mx-psi commented Jun 21, 2023

I think we should follow example 3 from https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#example-3---changing-the-arguments-of-a-function

receiver/scraperhelper/option.go Outdated Show resolved Hide resolved
receiver/scraperhelper/scrapercontroller.go Outdated Show resolved Hide resolved
.chloggen/msg_cleanup-scraper-helper.yaml Outdated Show resolved Hide resolved
@MovieStoreGuy MovieStoreGuy force-pushed the msg/cleanup-scraper-helper branch from 6bfff54 to d373a31 Compare June 21, 2023 16:38
@MovieStoreGuy
Copy link
Contributor Author

Updated PR based on comments in SIG meeting @mx-psi, @astencel-sumo .

I will add Juraci's comment regarding internal metrics to track the scrape duration in the another PR.

@MovieStoreGuy MovieStoreGuy force-pushed the msg/cleanup-scraper-helper branch 2 times, most recently from b2037ee to 86db65d Compare June 25, 2023 04:59
@MovieStoreGuy MovieStoreGuy force-pushed the msg/cleanup-scraper-helper branch from 86db65d to 822463e Compare July 5, 2023 13:00
This timeout field can help ensure that scrapers have a max execution
time.
@MovieStoreGuy MovieStoreGuy force-pushed the msg/cleanup-scraper-helper branch from 822463e to 2dc6d98 Compare July 5, 2023 13:04
@MovieStoreGuy
Copy link
Contributor Author

Hey @djaglowski ,

I've updated the PR to reflect our discussion above, please let me know if there anything else I've missed.

Once this is merged in, I can create a PR in contrib updating the implementing scrapers' docs.

@codeboten codeboten merged commit 38ba4d5 into open-telemetry:main Jul 13, 2023
@github-actions github-actions bot added this to the next release milestone Jul 13, 2023
}

func (set *ScraperControllerSettings) Validate() (errs error) {
if set.CollectionInterval <= 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the PR a breaking change, technically.

jpkrohling added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Jul 27, 2023
jpkrohling pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Jul 28, 2023
**Description:** 

With the most recent changes in
open-telemetry/opentelemetry-collector#7951
caused a bunch of tests to fail on upgrade.

This just adds in the scraper settings where needed.
dmitryax pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Aug 5, 2023
With the upcoming changes in
open-telemetry/opentelemetry-collector#7951
where it includes timeout as an explicit field, chrony receiver is no
longer required to explicitly call it.
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.

6 participants