-
Notifications
You must be signed in to change notification settings - Fork 405
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 synchronous gauge #3029
base: main
Are you sure you want to change the base?
Add synchronous gauge #3029
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3029 +/- ##
==========================================
+ Coverage 87.12% 87.60% +0.49%
==========================================
Files 200 190 -10
Lines 6109 5870 -239
==========================================
- Hits 5322 5142 -180
+ Misses 787 728 -59
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feature.
This is not a full review yet,
only some preliminary comments.
Please fix:
- declarations of new virtual methods using ABI version 2
- build break issues found in CI
More extensive review to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feature.
The code structure looks good to me overall.
I defer to @lalitb to check the logic around aggregation temporality in particular,
as I am not too familiar with this area.
#if OPENTELEMETRY_ABI_VERSION_NO >= 2 | ||
kGauge, | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be simpler to just declare this enum value all the time, and not conditionally.
The sdk headers can change, and having kGauge declared even in ABI v1 is not disruptive.
It will just be dead code in ABI v1.
Please adjust the switch/cases accordingly, to avoid the ifdef
|
||
INSTANTIATE_TEST_SUITE_P(WritableMetricStorageTestDouble, | ||
WritableMetricStorageTestFixture, | ||
::testing::Values(AggregationTemporality::kCumulative)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the test here to include the delta temporality.
If I understand the relevant section of the spec correctly, Gauges (unlike UpDownCounters and Histograms) don't support a choice of temporality. |
I was thinking the same @punya. It also mentions:
if that's related. @lalitb can you please clarify if delta temporality is actually needed? |
Sorry i was not clear enough. I meant testing for temporality with last value aggregation. The current test is only doing for cumulative. |
@uuzay - Do you think we can modify the PR to restrict configuring the delta temporality for Last Value as of now - Just thrown an error at the startup if this is enabled through View or otherwise. With that, we should be good to go through this PR. Thanks for working on this, and sorry about the long wait on this. |
Fixes #2279
Changes
Added synchronous gauge implementation according to the specification.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes