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

Fix missing startTimestamp for processes scraper. #3461

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

jsuereth
Copy link
Contributor

Description:
The processes scraper in hostmetricsreceiver did not use boot startTime, unlike the rest of the scrapers.

While I'd consider this a bug, could be considered a minor feature request. Specifically, the OTLP spec strongly recommends start timestamps for points with Aggregation Temporarily. This is not required due to compatibility with non-OTel metric format, but we should have a really good reason not to provide a valid timestamp.

I just found this yesterday, can open a bug for this PR if needed.

Here's what I did:

  • Wire boot timestamp through to processes scraper (matches all other host metrics receivers).
  • Add a more verbose output on timestmap failure for easier diagnostics when making failing changes to these tests.
  • Update tests to ensure starttime is set in resulting metrics.

Testing:
Added unit tests and ran locally.

- Wire boot timestamp through to processes scraper (matches all other host metrics receivers).
- Add a more verbose output on timestmap failure for easier diagnostics when making failing changes to these tests.
- Update tests to ensure starttime is set in resulting metrics.
@jsuereth jsuereth marked this pull request as ready for review June 18, 2021 16:45
@jsuereth jsuereth requested review from a team and tigrannajaryan June 18, 2021 16:45
@alolita alolita added area:receiver ready-to-merge Code review completed; ready to merge by maintainers labels Jun 18, 2021
@bogdandrutu bogdandrutu merged commit 528e3d7 into open-telemetry:main Jun 21, 2021
@jsuereth jsuereth deleted the wip-processes-start-time branch June 21, 2021 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:receiver ready-to-merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants