Skip to content

[scraperhelper] Allow scraper controller to be configured to run scrapers in parallel #13167

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dehaansa
Copy link

@dehaansa dehaansa commented Jun 6, 2025

Description

When investigating an issue in contrib, it was discovered that the scraperhelper did not have a way to run scrapers in parallel and take advantage of the connection pool in the sqlqueryreceiver. This PR adds the ability to configure the scrapercontroller to run either unbounded goroutines to scrape in parallel or a configurable size worker pool for running scrapers in parallel.

Link to tracking issue

Fixes #13113

Testing

Unit tests updated, but otherwise untested, posting here for initial review while I evaluate in context in contrib.

Documentation

No docs updated, as there's no existing docs for the package.

@dehaansa dehaansa requested a review from a team as a code owner June 6, 2025 04:48
@dehaansa dehaansa requested a review from codeboten June 6, 2025 04:48
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 92.74194% with 9 lines in your changes missing coverage. Please review.

Project coverage is 91.56%. Comparing base (a33fdf3) to head (f41df4d).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
scraper/scraperhelper/controller.go 92.74% 8 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (92.74%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13167      +/-   ##
==========================================
- Coverage   91.57%   91.56%   -0.02%     
==========================================
  Files         522      522              
  Lines       29089    29189     +100     
==========================================
+ Hits        26639    26726      +87     
- Misses       1933     1944      +11     
- Partials      517      519       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josepcorrea
Copy link

Hi! I'm currently working with the sqlqueryreceiver and very interested in testing this new parallel scraping feature — especially the worker pool mode. I can validate behavior and performance improvements when multiple queries are involved and connection pooling is in place.

Let me know if there’s anything specific I should focus on during testing, or if you'd prefer feedback via issue or PR comments. Thanks for the great work!

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 25, 2025
@josepcorrea
Copy link

Hi @dehaansa, just checking in — have there been any updates on this PR? Let me know if there's anything I can do to help move it forward. Happy to assist with testing or feedback if needed!

@dehaansa
Copy link
Author

Hi @dehaansa, just checking in — have there been any updates on this PR? Let me know if there's anything I can do to help move it forward. Happy to assist with testing or feedback if needed!

👋 I've had to juggle some other priorities (and was on PTO for a bit) - any testing or feedback would be welcome, I can't give this my full attention at the moment.

@github-actions github-actions bot removed the Stale label Jun 27, 2025
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.

[scraperhelper] Can't run scrapers in parallel
2 participants