-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Set spanmetricsprocessor call metric IsMonotonic to true #2837
Conversation
Signed-off-by: yeya24 <yb532204897@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2837 +/- ##
==========================================
- Coverage 91.59% 91.58% -0.02%
==========================================
Files 450 450
Lines 22189 22190 +1
==========================================
- Hits 20325 20322 -3
- Misses 1394 1396 +2
- Partials 470 472 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: yeya24 <yb532204897@gmail.com>
@@ -246,7 +246,8 @@ func (p *processorImp) collectCallMetrics(ilm *pdata.InstrumentationLibraryMetri | |||
|
|||
mCalls := pdata.NewMetric() | |||
mCalls.SetDataType(pdata.MetricDataTypeIntSum) | |||
mCalls.SetName("calls") | |||
mCalls.SetName("calls_total") |
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.
You may need to update the tests to reflect the new name.
@@ -246,7 +246,8 @@ func (p *processorImp) collectCallMetrics(ilm *pdata.InstrumentationLibraryMetri | |||
|
|||
mCalls := pdata.NewMetric() | |||
mCalls.SetDataType(pdata.MetricDataTypeIntSum) | |||
mCalls.SetName("calls") | |||
mCalls.SetName("calls_total") | |||
mCalls.IntSum().SetIsMonotonic(true) |
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.
Please add a test for this. I think it should be in verifyConsumeMetricsInput
.
Signed-off-by: yeya24 <yb532204897@gmail.com>
|
||
data := m.At(mi).IntSum() | ||
assert.Equal(t, pdata.AggregationTemporalityCumulative, data.AggregationTemporality()) | ||
assert.Equal(t, true, data.IsMonotonic()) |
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.
I would use assert.True
.
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.
Updated.
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.
LGTM, thanks @yeya24! Not sure why the load tests are failing as these changes seem quite minimal. Is anyone able to re-run it? or maybe a commit to address my last comment will trigger another run.
…try#2837) Signed-off-by: yeya24 <yb532204897@gmail.com> As mentioned in the issue, set `IsMonotonic` to true. **Link to tracking Issue:** open-telemetry#2829 **Testing:** Tested manually with prometheusremotewrite exporter and it works well. ![Screenshot from 2021-03-23 20-34-10](https://user-images.githubusercontent.com/25150124/112236561-281c1e80-8c17-11eb-8b6c-52a1c0c4a4ab.png)
* Add comment linter For now I am excluding - Internal packages - Testbed packages - Constant blocks (since the type docs is usually enough) * Document consumer folder * Document processor folder * Document component folder * Document config folder * Document service folder * Add nosec directive for testbed * Document testutil folder * Document receiver folder * Document exporter folder * Document cmd/schemagen folder * Document translator folder * Document cmd/mdatagen * Document obsreport folder * Remove outdated package config comment * Update .golangci.yml * Update .golangci.yml Co-authored-by: Bogdan Drutu <lazy@splunk.com>
Signed-off-by: yeya24 yb532204897@gmail.com
Description:
As mentioned in the issue, set
IsMonotonic
to true.Link to tracking Issue: #2829
Testing: Tested manually with prometheusremotewrite exporter and it works well.
Documentation: