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

Add stale fixture data point #645

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

damemi
Copy link
Member

@damemi damemi commented Jun 22, 2023

Adding a test to show that we drop data points with NO_RECORDED_VALUE_MASK set

@damemi damemi requested a review from a team as a code owner June 22, 2023 15:25
@@ -51,6 +51,19 @@
]
}
},
{
"name":"scrape_series_added",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit could you give rename this one to indicate what it's testing

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted this to show that it worked for an existing metric that has valid data points, so I moved this to its own test that explains it better

OTLPInputFixturePath: "testdata/fixtures/metrics/basic_prometheus_metrics_stale.json",
ExpectFixturePath: "testdata/fixtures/metrics/basic_prometheus_metrics_stale_expect.json",
CompareFixturePath: "testdata/fixtures/metrics/basic_prometheus_metrics_expect.json",
SkipForSDK: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

@dashpole should our sdk exporter drop stale points too? This failed for sdk and I didn't see anything handling stale points there

Copy link
Contributor

Choose a reason for hiding this comment

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

The SDK shouldn't have a notion of stale points. I.e. it shouldn't be possible to get those when coming from the SDK.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah because it's just a prometheus thing right? So it's only possible from the prom receiver, that makes sense

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #645 (86a3d13) into main (2050f26) will increase coverage by 1.84%.
The diff coverage is 65.28%.

@@            Coverage Diff             @@
##             main     #645      +/-   ##
==========================================
+ Coverage   66.47%   68.31%   +1.84%     
==========================================
  Files          36       36              
  Lines        4301     4539     +238     
==========================================
+ Hits         2859     3101     +242     
+ Misses       1314     1285      -29     
- Partials      128      153      +25     
Impacted Files Coverage Δ
exporter/collector/config.go 45.04% <ø> (ø)
exporter/collector/metrics.go 72.14% <59.29%> (+4.84%) ⬆️
...er/collector/integrationtest/testcases/testcase.go 81.51% <100.00%> (ø)
...tor/integrationtest/testcases/testcases_metrics.go 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@damemi damemi merged commit e7cc2b2 into GoogleCloudPlatform:main Jun 26, 2023
24 of 25 checks passed
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