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

Initial commit of host metrics network scraper #930

Merged

Conversation

james-bebbington
Copy link
Member

Link to tracking Issue:
#847

Description:
Added network scraper to the hostmetricsreceiver which uses gopsutil to collect metrics related to network usage & the number of active tcp connections

Exported Metrics:

image

@codecov-io
Copy link

codecov-io commented May 8, 2020

Codecov Report

Merging #930 into master will decrease coverage by 0.00%.
The diff coverage is 86.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #930      +/-   ##
==========================================
- Coverage   85.52%   85.51%   -0.01%     
==========================================
  Files         184      187       +3     
  Lines       13545    13688     +143     
==========================================
+ Hits        11584    11705     +121     
- Misses       1498     1511      +13     
- Partials      463      472       +9     
Impacted Files Coverage Δ
...eceiver/internal/scraper/networkscraper/factory.go 60.00% <60.00%> (ø)
...internal/scraper/networkscraper/network_scraper.go 81.44% <81.44%> (ø)
receiver/hostmetricsreceiver/factory.go 74.07% <100.00%> (+0.48%) ⬆️
...ternal/scraper/networkscraper/network_constants.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 73.52% <0.00%> (-2.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80ee563...97bd139. Read the comment docs.

@james-bebbington james-bebbington force-pushed the hostmetrics-network branch 3 times, most recently from 26dddb8 to cb27f29 Compare May 8, 2020 22:56
@bogdandrutu
Copy link
Member

Also something bad in the example screenshot the last metric network_tcp_connections should be a gauge not a counter. Problem looks to be somewhere in the translation, looks like you do use gauge, did you change that and took a different snapshot?

@james-bebbington
Copy link
Member Author

james-bebbington commented May 10, 2020

Also something bad in the example screenshot the last metric network_tcp_connections should be a gauge not a counter. Problem looks to be somewhere in the translation, looks like you do use gauge, did you change that and took a different snapshot?

Nice spotting. It looks like that's a general bug in the OC prometheus exporter (unrelated to this PR): https://github.com/orijtech/prometheus-go-metrics-exporter/blob/master/prometheus.go#L315 (also L318) - should be derivedPrometheusType instead of prometheus.CounterValue

Track the fix here: orijtech/prometheus-go-metrics-exporter#8

@bogdandrutu bogdandrutu merged commit bd63d99 into open-telemetry:master May 11, 2020
wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this pull request Jul 13, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
open-telemetry#930)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
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.

None yet

3 participants