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

Use obsreport.StartMetricsReceiveOp/EndMetricsReceiveOp in host scrapers #918

Closed
bogdandrutu opened this issue May 5, 2020 · 2 comments · Fixed by #1949
Closed

Use obsreport.StartMetricsReceiveOp/EndMetricsReceiveOp in host scrapers #918

bogdandrutu opened this issue May 5, 2020 · 2 comments · Fixed by #1949
Assignees
Milestone

Comments

@bogdandrutu
Copy link
Member

From @james-bebbington:

Had a bit of a deeper look at this. From what I understand, obsreport is a helper package for generating standard traces & metrics for collector components, and currently uses the OpenCensus libraries for this.

A couple of questions if I want to use this here:

I'm not sure what to provide for the "transport" attribute value (third parameter of StartMetricsReceiveOp). These metrics are scraped from the host rather than being "received" as such so it doesn't seem applicable - is it okay to pass an empty string?
obsreport.CountMetricPoints is only implemented for the OC proto format. It probably needs a second implementation for the in-memory data structure rather than doing a transformation manually before calling that function (should be relatively straightforward to add this, but probably better done in a separate PR)

@james-bebbington
Copy link
Member

To clarify:

  1. opsreport.StartMetricsReceiveOp, and other opsreport metric functions, require passing a "transport" parameter that's used to set a corresponding attribute value. Consider making this optional
  2. obsreport.CountMetricPoints takes a consumerdata.MetricsData parameter. Consider adding an alternative function that takes data.MetricsData

@james-bebbington
Copy link
Member

james-bebbington commented May 10, 2020

Note no. 2 is not necessary as pdatautil.MetricAndDataPointCount already exists which does exactly the same thing and should be used instead

@bogdandrutu bogdandrutu added this to the Backlog milestone Aug 4, 2020
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
…emetry#918)

Bumps golang from 1.17.2-stretch to 1.17.3-stretch.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this issue 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 a pull request may close this issue.

2 participants