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 5 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.27%. Comparing base (e1a9093) to head (c06c27c).
Report is 1 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.27%   91.27%   -0.01%     
==========================================
  Files         510      510              
  Lines       28758    28858     +100     
==========================================
+ Hits        26250    26341      +91     
- Misses       1993     2001       +8     
- Partials      515      516       +1     

☔ 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!

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