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

[Prometheus Receiver] Add test cases to validate honor_timestamp #6705

Merged

Conversation

PaurushGarg
Copy link
Member

Description: Added new Prometheus Receiver test case to validate honor_timestamp functionality.
TestHonorTimeStampsWithTrue validates:

  • For initial scrape, Start_timestamp is same as point_timestamp, read from the explicit timestamp given to the datapoint in the testdata.
  • Start_timestamp should be the explicit timstamp of first-time you see a particular metric
  • Start_timetsamp should get reset if the current scrape has lower value than the previous scrape
  • Currently, Prometheus scrape loop does not emit staleness markers for metrics of failed scrapes, and that's why histogram and summary start_timestamp exhibit no issues in this test.

TestHonorTimeStampsWithFalse validates:

  • With honor_timestamp config set to false, valid testdata provided with explicit timestamps does not get honoured.

Link to tracking Issue:
Issue #6085

cc @alolita @Aneurysm9

@Aneurysm9 Aneurysm9 added the ready to merge Code review completed; ready to merge by maintainers label Dec 11, 2021
@codeboten codeboten merged commit 1ce0b50 into open-telemetry:main Dec 13, 2021
@PaurushGarg PaurushGarg deleted the prom-receiver-test-honor-timestamp branch December 18, 2021 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants