Skip to content

scraperhelper: use common scraping interface#3487

Merged
bogdandrutu merged 3 commits intoopen-telemetry:mainfrom
jrcamp:scraper
Jun 28, 2021
Merged

scraperhelper: use common scraping interface#3487
bogdandrutu merged 3 commits intoopen-telemetry:mainfrom
jrcamp:scraper

Conversation

@jrcamp
Copy link
Copy Markdown
Contributor

@jrcamp jrcamp commented Jun 24, 2021

This removes the MetricsScraper and ResourceMetricsScraper interfaces in favor
of a single Scraper interface that scrapes and returns pdata.Metrics. There
were already helper wrappers that allow users to return MetricSlices and
ResourceMetricSlices. These helpers package those results into pdata.Metrics
for the base interface.

Resolves #3085: This also removes the multiMetricScraper which wrapped multiple
scrapers to appear as a single scraper but then functions like scraper.ID()
would be empty. This was evident when trying to log errors and you couldn't
figure out what scraper made the error because it was wrapped in the
multiscraper.

This removes the MetricsScraper and ResourceMetricsScraper interfaces in favor
of a single Scraper interface that scrapes and returns pdata.Metrics. There
were already helper wrappers that allow users to return MetricSlices and
ResourceMetricSlices. These helpers package those results into pdata.Metrics
for the base interface.

Resolves #3085: This also removes the multiMetricScraper which wrapped multiple
scrapers to appear as a single scraper but then functions like scraper.ID()
would be empty. This was evident when trying to log errors and you couldn't
figure out what scraper made the error because it was wrapped in the
multiscraper.
@jrcamp jrcamp marked this pull request as ready for review June 24, 2021 22:24
@jrcamp jrcamp requested review from a team, bogdandrutu and owais June 24, 2021 22:24
Copy link
Copy Markdown
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Please add CHANGELOG entry

@jrcamp jrcamp requested a review from bogdandrutu June 28, 2021 15:12
@bogdandrutu bogdandrutu merged commit 40d6a55 into open-telemetry:main Jun 28, 2021
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.

Scraper log messages should specify what scraper the message is from

3 participants