-
Notifications
You must be signed in to change notification settings - Fork 837
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
feat(metrics-sdk): bootstrap aggregation support #2634
feat(metrics-sdk): bootstrap aggregation support #2634
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2634 +/- ##
==========================================
+ Coverage 93.10% 93.36% +0.26%
==========================================
Files 123 131 +8
Lines 4757 4932 +175
Branches 1059 1078 +19
==========================================
+ Hits 4429 4605 +176
+ Misses 328 327 -1
|
b87269b
to
5282e9f
Compare
This comment has been minimized.
This comment has been minimized.
5282e9f
to
3f1fd00
Compare
experimental/packages/opentelemetry-api-metrics/src/types/Metric.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/InstrumentDescriptor.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/Histogram.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/LastValue.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/view/Aggregation.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/view/Aggregation.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/view/Aggregation.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/view/Aggregation.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/LastValue.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/LastValue.ts
Outdated
Show resolved
Hide resolved
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 like this, but I have a few questions about the aggregation and temporarily (see comments).
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Histogram.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Histogram.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/LastValue.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/LastValue.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Sum.test.ts
Show resolved
Hide resolved
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 think this is great work! 💯
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/Histogram.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricData.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Histogram.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Histogram.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/test/aggregator/Sum.test.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/aggregator/types.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-sdk-metrics-base/src/export/MetricData.ts
Outdated
Show resolved
Hide resolved
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.
There are a few small nits still open and a conflict. Once they are resolved I think we can merge this and move forward with other PRs
Which problem is this PR solving?
Bootstraps aggregation and aggregator support. Use cases can be reviewed on #2636.
Aggregation
is responsible for selecting concreteAggregator
type for anInstrumentDescriptor
.Aggregator
is stateless, and is responsible for merging, diffing stateful accumulations.Accumulation
is aggregated state for a metric stream in a period of time.Fixes #2599
This is a prototype of the implementation described in https://docs.google.com/document/d/1EluDhj5UanNATS3hR8xx30sv55Se7uYjsGYslvNWHtc/edit#.
Short description of the changes
Type of change
How Has This Been Tested?
Checklist: