apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
13.94k stars 3.53k forks source link

[feat][broker] PIP-264: Add transaction metrics #22970

Closed dragosvictor closed 6 days ago

dragosvictor commented 1 week ago

PIP-264

Motivation

Adds the transaction metrics as described by https://pulsar.apache.org/docs/next/reference-metrics/#pulsar-transaction to the OpenTelemetry pipeline.

Modifications

Verifying this change

This change updated tests and can be verified as follows:

Does this pull request potentially affect one of the following parts:

Documentation

Matching PR in forked repository

PR in forked repository: https://github.com/dragosvictor/pulsar/pull/37

codecov-commenter commented 6 days ago

Codecov Report

Attention: Patch coverage is 92.45283% with 20 lines in your changes missing coverage. Please review.

Project coverage is 73.37%. Comparing base (bbc6224) to head (34aae58). Report is 424 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/22970/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #22970 +/- ## ============================================ - Coverage 73.57% 73.37% -0.21% - Complexity 32624 33236 +612 ============================================ Files 1877 1905 +28 Lines 139502 142763 +3261 Branches 15299 15579 +280 ============================================ + Hits 102638 104751 +2113 - Misses 28908 29993 +1085 - Partials 7956 8019 +63 ``` | [Flag](https://app.codecov.io/gh/apache/pulsar/pull/22970/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [inttests](https://app.codecov.io/gh/apache/pulsar/pull/22970/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.42% <47.16%> (+2.84%)` | :arrow_up: | | [systests](https://app.codecov.io/gh/apache/pulsar/pull/22970/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.66% <6.41%> (+0.33%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pulsar/pull/22970/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.41% <92.45%> (-0.43%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/apache/pulsar/pull/22970?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...lsar/broker/service/PersistentTopicAttributes.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fservice%2FPersistentTopicAttributes.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1BlcnNpc3RlbnRUb3BpY0F0dHJpYnV0ZXMuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [...ker/service/persistent/PersistentSubscription.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fservice%2Fpersistent%2FPersistentSubscription.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvUGVyc2lzdGVudFN1YnNjcmlwdGlvbi5qYXZh) | `76.90% <100.00%> (+0.21%)` | :arrow_up: | | [...ker/service/persistent/PersistentTopicMetrics.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fservice%2Fpersistent%2FPersistentTopicMetrics.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvUGVyc2lzdGVudFRvcGljTWV0cmljcy5qYXZh) | `100.00% <100.00%> (ø)` | | | [...e/pulsar/broker/stats/OpenTelemetryTopicStats.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fstats%2FOpenTelemetryTopicStats.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zdGF0cy9PcGVuVGVsZW1ldHJ5VG9waWNTdGF0cy5qYXZh) | `99.56% <100.00%> (ø)` | | | [...ansaction/buffer/TransactionBufferClientStats.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fbuffer%2FTransactionBufferClientStats.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9idWZmZXIvVHJhbnNhY3Rpb25CdWZmZXJDbGllbnRTdGF0cy5qYXZh) | `25.00% <100.00%> (ø)` | | | [...ction/buffer/impl/TransactionBufferClientImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fbuffer%2Fimpl%2FTransactionBufferClientImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9idWZmZXIvaW1wbC9UcmFuc2FjdGlvbkJ1ZmZlckNsaWVudEltcGwuamF2YQ==) | `83.72% <100.00%> (ø)` | | | [...saction/pendingack/PendingAckHandleAttributes.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fpendingack%2FPendingAckHandleAttributes.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9wZW5kaW5nYWNrL1BlbmRpbmdBY2tIYW5kbGVBdHRyaWJ1dGVzLmphdmE=) | `100.00% <100.00%> (ø)` | | | [.../transaction/pendingack/PendingAckHandleStats.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fpendingack%2FPendingAckHandleStats.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9wZW5kaW5nYWNrL1BlbmRpbmdBY2tIYW5kbGVTdGF0cy5qYXZh) | `100.00% <ø> (ø)` | | | [...tion/pendingack/impl/PendingAckHandleDisabled.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fpendingack%2Fimpl%2FPendingAckHandleDisabled.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9wZW5kaW5nYWNrL2ltcGwvUGVuZGluZ0Fja0hhbmRsZURpc2FibGVkLmphdmE=) | `33.33% <100.00%> (+3.92%)` | :arrow_up: | | [...nsaction/pendingack/impl/PendingAckHandleImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Ftransaction%2Fpendingack%2Fimpl%2FPendingAckHandleImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90cmFuc2FjdGlvbi9wZW5kaW5nYWNrL2ltcGwvUGVuZGluZ0Fja0hhbmRsZUltcGwuamF2YQ==) | `72.63% <100.00%> (+1.78%)` | :arrow_up: | | ... and [10 more](https://app.codecov.io/gh/apache/pulsar/pull/22970?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | ... and [456 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/22970/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)