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

Instrument obsreport.Scraper #15

Closed
wants to merge 6 commits into from
Closed

Conversation

moh-osman3
Copy link

@moh-osman3 moh-osman3 commented Oct 19, 2022

This PR instruments obsreport.Scraper with otel go. This is a followup PR that is based on similar changes made for obsreport.Receiver: open-telemetry#6222

Link to tracking Issue: Part of open-telemetry#816

Testing:
Ran contrib collector with prometheusreceiver and hostmetricsreceiver and confirmed that new metrics show up. Tested both with feature gate disabled and enabled.

curl http://localhost:8888/metrics | tail -n 8 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14245    0 14245    0     0   869k      0 --:--:-- --:--:-- --:--:--  927k
# HELP otelcol_scraper_errored_metric_points Number of metric points that were unable to be scraped.
# TYPE otelcol_scraper_errored_metric_points counter
otelcol_scraper_errored_metric_points{receiver="hostmetrics",scraper="cpu",service_instance_id="020a1f19-6180-4de5-ae54-57cbd4ee9591",service_name="otelcontribcol",service_version="v0.62.0-60-g42049e14b"} 2
otelcol_scraper_errored_metric_points{receiver="hostmetrics",scraper="memory",service_instance_id="020a1f19-6180-4de5-ae54-57cbd4ee9591",service_name="otelcontribcol",service_version="v0.62.0-60-g42049e14b"} 0
# HELP otelcol_scraper_scraped_metric_points Number of metric points successfully scraped.
# TYPE otelcol_scraper_scraped_metric_points counter
otelcol_scraper_scraped_metric_points{receiver="hostmetrics",scraper="cpu",service_instance_id="020a1f19-6180-4de5-ae54-57cbd4ee9591",service_name="otelcontribcol",service_version="v0.62.0-60-g42049e14b"} 0
otelcol_scraper_scraped_metric_points{receiver="hostmetrics",scraper="memory",service_instance_id="020a1f19-6180-4de5-ae54-57cbd4ee9591",service_name="otelcontribcol",service_version="v0.62.0-60-g42049e14b"} 1

@moh-osman3 moh-osman3 marked this pull request as ready for review October 19, 2022 19:19
@moh-osman3 moh-osman3 changed the title Moh/instrument scraper Instrument obsreport.Scraper Oct 19, 2022
@moh-osman3 moh-osman3 closed this Oct 31, 2022
@moh-osman3 moh-osman3 deleted the moh/instrument-scraper branch November 4, 2022 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant