-
Notifications
You must be signed in to change notification settings - Fork 825
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 - aggregator, batcher, controller #738
Conversation
Codecov Report
@@ Coverage Diff @@
## master #738 +/- ##
===========================================
- Coverage 92.55% 80.42% -12.13%
===========================================
Files 240 99 -141
Lines 10819 3776 -7043
Branches 990 333 -657
===========================================
- Hits 10013 3037 -6976
+ Misses 806 739 -67
|
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.
This is really an awesome start, thanks for this. It looks like a pretty big improvement on the old version.
monotonic: boolean, | ||
valueType: types.ValueType, | ||
logger: types.Logger, | ||
aggregator: Aggregator |
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.
Shouldn't the counter always use the sum aggregator?
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 know we talked about this in the SIG meeting a couple weeks ago, but I don't remember the resolution.
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.
As discussed offline, hardcoding will certainly simplify the things and will be less buggy (and easy to read). Also, you're right (99.9%) that counter
should always have CounterSumAggregator
. But I haven't seen any hardcoded stuff in specs or Go/Python implementations. Aggregators are always coming from Batcher(aggregatorFor
- function). I was thinking to keep it as it is and open an issue to consider doing it in the future, once specs is completely flushed out.
e92e774
to
cf49191
Compare
@open-telemetry/javascript-approvers We need reviews for this one, please take a look when you get a chance. |
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.
Overall this looks good, just have a few unresolved questions from before.
monotonic: boolean, | ||
valueType: types.ValueType, | ||
logger: types.Logger, | ||
aggregator: Aggregator |
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 know we talked about this in the SIG meeting a couple weeks ago, but I don't remember the resolution.
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.
Think I'm happy with this as a good place we can iterate off of. Thanks for doing this :)
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
I think this is ready to merge if you're happy with it @mayurkale22 |
guys changes here caused the example for Prometheus is not working anymore |
Thanks for reporting this, will try to fix it today. |
…en-telemetry#738) * chore: calc propagation fields count before inject * chore(aws-sdk): lint:fix * chore(aws-sdk): cover MessageAttributes with tests Co-authored-by: Amir Blum <[email protected]>
Short description of the changes
CounterSumAggregator
,GaugeAggregator
andMeasureExactAggregator
), batcher (UngroupedBatcher
) and controller (PushController
).TODO:
JSDoc commentsMeasure record(https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-metrics/src/Meter.ts#L69) - will do it in follow-up PR.Original PR: skeleton(metrics): createMeasure #563
Note: