Commit Graph

13 Commits

Author SHA1 Message Date
Jay Camp 40d6a556f1
scraperhelper: use common scraping interface (#3487)
* 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
2021-06-28 11:07:24 -07:00
Bogdan Drutu d6a0f9ab76
Fix comments for exported funcs/vars/consts (#2938)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-04-14 14:55:23 -07:00
Bogdan Drutu 7874cd5faa
Remove usage of custom init/stop in scraper and use start/shutdown from component (#2193)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-23 14:00:42 -05:00
Bogdan Drutu e365c9bfbc
Move scraper helpers to its own package scraperhelper (#2185)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-20 05:51:30 -08:00
James Bebbington 5414c55694
Update host metrics receiver to use receiverhelper (#1949) 2020-10-31 17:44:26 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
Bogdan Drutu 9d557beaa7
Add observability report wrapper for scrapers and use it everywhere (#1276)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-07 16:30:58 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Bogdan Drutu a637b41c22
Change entire repo to use the new vanityurl go.opentelemetry.io/collector (#977)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-05-15 12:04:05 -07:00
James Bebbington 66d7acdc5a
Simplify the host metrics ticker logic (#952)
* Optimise the host metrics ticker logic by having one ticker per set of scrapers that use the same collection interval, and update tests

* Removed the ability to configure different collection intervals for different scrapers within the host metrics receiver & added documentation to note that the same effect can be achieved by configuring multiple receivers

* Change the Host Metrics scrapers from "ScrapeAndAppend" to "Scrape" and do the appending in the receiver instead
2020-05-13 21:08:45 -07:00
James Bebbington accaaa8b82
Minor cleanup to host metrics receiver (#920) 2020-05-06 07:17:07 -07:00
James Bebbington 3a51f6090d
Support any OS in host metrics receiver & cpu scraper, and include all relevant cpu states for Linux (#902) 2020-05-02 18:39:28 -07:00
James Bebbington 81b1f535f6
Initial commit of host metrics cpu scraper using gopsutil to collect cpu times metric (#862) 2020-04-29 18:09:48 -07:00