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 log messages should specify what scraper the message is from #3085

Closed
jrcamp opened this issue May 4, 2021 · 0 comments · Fixed by #3487
Closed

Scraper log messages should specify what scraper the message is from #3085

jrcamp opened this issue May 4, 2021 · 0 comments · Fixed by #3487
Assignees

Comments

@jrcamp
Copy link
Contributor

jrcamp commented May 4, 2021

Currently log messages from scrapers do not give any indication what scraper the message is about. Take for instance this from the cpu (I think, can't tell) scraper:

2021-05-03T20:37:15.732-0400 error scraperhelper/scrapercontroller.go:204 Error scraping metrics {"kind": "receiver", "name": "hostmetrics", "error": "not implemented yet"}

There's two places this can happen:

  1. Log messages made inside the scraper implementation
  2. At the point where errors returned by the scraper are logged
@jrcamp jrcamp self-assigned this May 4, 2021
jrcamp added a commit to jrcamp/opentelemetry-collector that referenced this issue 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 open-telemetry#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 added a commit to jrcamp/opentelemetry-collector that referenced this issue 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 open-telemetry#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 added a commit to jrcamp/opentelemetry-collector that referenced this issue 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 open-telemetry#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.
bogdandrutu pushed a commit that referenced this issue Jun 28, 2021
* scraperhelper: use common scraping interface

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.

* review updates
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 a pull request may close this issue.

1 participant