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

2/2 Extend receiverhelper scraper functions to simplify the scrape function interface #1890

Conversation

james-bebbington
Copy link
Member

@james-bebbington james-bebbington commented Oct 2, 2020

Allow users of this API to provide a scrape function that returns:

  • A metrics slice; OR
  • A resource metrics slice

(instead of having to return a fully constructed pdata.Metrics object)

Depends on: #1886

rm := rms.At(0)
ilms := rm.InstrumentationLibraryMetrics()
ilms.Resize(1)
ilm := ilms.At(0)
Copy link
Member Author

Choose a reason for hiding this comment

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

For metrics that we "scrape", would we want to fill in Instrumentation Library data btw?

Copy link
Contributor

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #1890 into master will increase coverage by 0.01%.
The diff coverage is 96.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1890      +/-   ##
==========================================
+ Coverage   91.39%   91.40%   +0.01%     
==========================================
  Files         284      284              
  Lines       16740    16784      +44     
==========================================
+ Hits        15299    15341      +42     
- Misses       1009     1010       +1     
- Partials      432      433       +1     
Impacted Files Coverage Δ
receiver/receiverhelper/receiver.go 96.39% <95.12%> (-0.94%) ⬇️
receiver/receiverhelper/scraper.go 94.44% <100.00%> (+4.44%) ⬆️

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 9aa0c5e...785218e. Read the comment docs.

…rape metrics slice or resource metrics slice instead of having to return a metrics data object)
@bogdandrutu bogdandrutu merged commit 031521d into open-telemetry:master Oct 9, 2020
tigrannajaryan pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Oct 30, 2020
…#1211)

Adds skeleton for Windows Performance Counters Receiver with very basic initial functionality that can read simple counters that do not include any instance into a Gauge metric - see the added README.md for more details.

**Link to tracking Issue:** #1088

Note the scaffolding code makes use of the new `receiverhelper` & `scraperhelper` functions added in the Core PRs referenced below.

**Depends on:** #1175, open-telemetry/opentelemetry-collector#1886, open-telemetry/opentelemetry-collector#1890
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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.

3 participants