-
Notifications
You must be signed in to change notification settings - Fork 202
Exemplar: Refactor to be under metrics.data. #1791
Exemplar: Refactor to be under metrics.data. #1791
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1791 +/- ##
=========================================
Coverage ? 83.81%
Complexity ? 2029
=========================================
Files ? 294
Lines ? 9227
Branches ? 891
=========================================
Hits ? 7734
Misses ? 1177
Partials ? 316
Continue to review full report at Codecov.
|
5418222
to
3b3a435
Compare
Rebased and updated. The reasons for making this change:
Thus I proposed to extract |
3b3a435
to
a88eb58
Compare
I think we are moving to the model where stats is just for recording and not for exporting (currently all our exporters are now using Metric no more ViewData). Probably we should remove the ViewData, hence we will remove the AggregationData. So I think we should work to remove the ViewData and AggregationData, so that will remove the duplicated code. |
But still we need statsRecorder.newMeasureMap().put(m, v).putAttachment(key, attachmentValue).record();
...
metricProducer.getMetrics().get(0)...getDistribution().getExemplars().get(0).getAttachments(); so the only viable option I saw here is still to extract it to a common artifact. |
For the common types that we need during recording as well as exporting I suggest we do what Go does for metrics and add a "data" sub-package. stats, metrics and metrics.exporter can depend on metrics.data. |
OK that makes sense to me. I'll post a separate PR for adding that package first. |
a88eb58
to
4eea6a2
Compare
4eea6a2 moved |
Blocked by #1779.