Skip to content
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

[ISSUE #2860] support opentracing for rocketmq client #2861

Merged
merged 1 commit into from
May 10, 2021

Conversation

yuz10
Copy link
Member

@yuz10 yuz10 commented May 8, 2021

Make sure set the target branch to develop

[ISSUE #2860] support opentracing for rocketmq client

support opentracing for rocketmq client

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • [ ✔️] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • [ ✔️] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • [ ✔️] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [ ✔️] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • [ ✔️] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • [ x ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

@coveralls
Copy link

coveralls commented May 8, 2021

Coverage Status

Coverage decreased (-0.07%) to 52.308% when pulling 5f75af4 on yuz10:develop into fb0d019 on apache:develop.

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2021

Codecov Report

Merging #2861 (5bdd759) into develop (fb0d019) will increase coverage by 0.12%.
The diff coverage is 78.21%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2861      +/-   ##
=============================================
+ Coverage      46.34%   46.47%   +0.12%     
- Complexity      4384     4403      +19     
=============================================
  Files            549      552       +3     
  Lines          36399    36500     +101     
  Branches        4819     4828       +9     
=============================================
+ Hits           16868    16962      +94     
+ Misses         17423    17413      -10     
- Partials        2108     2125      +17     
Impacted Files Coverage Δ Complexity Δ
...g/apache/rocketmq/client/trace/TraceConstants.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ent/trace/hook/SendMessageOpenTracingHookImpl.java 72.22% <72.22%> (ø) 4.00 <4.00> (?)
.../trace/hook/ConsumeMessageOpenTracingHookImpl.java 76.92% <76.92%> (ø) 6.00 <6.00> (?)
.../trace/hook/EndTransactionOpenTracingHookImpl.java 88.46% <88.46%> (ø) 3.00 <3.00> (?)
.../broker/subscription/SubscriptionGroupManager.java 54.11% <0.00%> (-16.48%) 8.00% <0.00%> (-3.00%)
...org/apache/rocketmq/common/stats/StatsItemSet.java 43.28% <0.00%> (-8.96%) 17.00% <0.00%> (-3.00%)
...he/rocketmq/client/impl/consumer/ProcessQueue.java 57.67% <0.00%> (-0.94%) 31.00% <0.00%> (ø%)
...a/org/apache/rocketmq/store/StoreStatsService.java 30.16% <0.00%> (-0.66%) 27.00% <0.00%> (-1.00%)
...main/java/org/apache/rocketmq/store/CommitLog.java 66.42% <0.00%> (-0.11%) 79.00% <0.00%> (ø%)
...ava/org/apache/rocketmq/filter/util/BitsArray.java 59.82% <0.00%> (ø) 30.00% <0.00%> (ø%)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb0d019...5bdd759. Read the comment docs.

@vongosling vongosling linked an issue May 10, 2021 that may be closed by this pull request
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
<version>0.33.0</version>
<scope>provided</scope>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-core</artifactId>
<version>1.6.0</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wu-sheng I know we had rocketmq support for skywalking a long time ago, and I would like to see if it would work perfectly if we switched to skywalking. I'm looking forward to seeing more substantial integration between the two communities:-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for reaching me here. SkyWalking supports RocketMQ through our plugin system, so, we don't need to rely on the OpenTracing APIs layer, also don't ask the RocketMQ community to change the source code.

Also, as a member of OpenTracing, I have to say, OpenTracing is no longer active anymore. The members are either quit or join OpenTelemetry. OpenTracing and OpenCensus have been merged. SkyWalking community already doesn't recommend users to choose OpenTracing-SkyWalking bridge.

RocketMQ 3.x and 4.x plugins are available here

  1. https://github.com/apache/skywalking/tree/master/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin
  2. https://github.com/apache/skywalking/tree/master/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful. OpenTelemetry is a very promising direction. Until it's fully integrated, the community will prefer two more open approaches :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If people really ask about OpenTracing + SkyWalking, I am thinking no one will, just tell them use our agent. All things are going to be out of the box.

Copy link
Member

@vongosling vongosling May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the non-intrusive bytebuddy instrument version. rocketMQ-3.x-plugin should be obsolete, we could push forward the 4.x, although it only integrate a older incubator client version :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good thing is, SkyWalking has a version identification feature, so, it only works if your user is still there. And no harm if there isn't.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to implement tracing support for skywalking inside rocketmq, without using interceptors, if you are interested.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuz10 I would recommend you take a look how SkyWalking's OT bridge works, you may change your mind after you read codes :) We are not working like Jaeger.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And OT community is bad of back-compatible, so 0.33 is not working with skywalking OT bridge. It was 0.31 if I recommend it correctly. And the crazy thing is, 0.33 and 0.31 have a big gap. Who knows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice reminder~ nowadays, its dependency is provided scope. I would like to keep a close eye on this field.

@vongosling vongosling added the progress/wip Work in progress. Accept or refused to be continue. label May 10, 2021
@vongosling vongosling added this to the 4.9.0 milestone May 10, 2021
@vongosling vongosling merged commit f2a5a74 into apache:develop May 10, 2021
@duhenglucky duhenglucky modified the milestones: 4.9.0, 4.8.1 May 13, 2021
vongosling added a commit that referenced this pull request May 19, 2021
* [ISSUE #1233] Fix CVE-2011-1473

* fix Multiple instances in the same application share MQClientInstance

* [ISSUE #2748] Fix deleteSubscriptionGroup not remove consumer offset

* [ISSUE #2745] Changed the support time of the request/reply feature to 4.6.0.

Co-authored-by: von gosling <vongosling@apache.org>

* [ISSUE #2729] Replace with Math.min method call

* [ISSUE #2801]Fix NamesrvAddr connot set in Producer

* [ISSUE 2800] optimize: the spelling of topicSynFlag

Co-authored-by: ph3636 <tianxingguang@kanzhun.com>

* [ISSUE #2803] Fix the endpoint cannot get instanceId without http (#2804)

* fix the endpoint cannot get instanceId without http

* fix the endpoint cannot get instanceId without http

* add unit test

* add unit test

* add unit test

Co-authored-by: panzhi33 <wb-pz502261@alibaba-inc.com>

* fix messageArrivingListener NPE

* [ISSUE #2538]Optimize log output when message trace saving fails

* [ISSUE #2811] Fix the wrong topic was consumed in the DefaultMessageStoreTest test program

* [ISSUE #2821] Overriding the ServiceThread#shutdown in HAClient class

* [ISSUE #2805] remove redundant package imports

* [ISSUE #2833] Support trace for TranscationProducer (#2834)

* [ISSUE #2732] Fix message loss problem when rebalance with LitePullConsumer (#2832)

* [ISSUE #2732] Fix message loss problem when rebalance with LitePullConsumer

* Fix message loss problem when rebalance with LitePullConsumer, update 2

* [ISSUE #2846]fix -E might not port to other systems

* fix some nonconformity after checkstyle

* Support OpenTracing(#2861)

* [ISSUE #2872] remove log files created by integration test when mvn clean

* [ISSUE #2872] move log files created by integration test to target dir

* Change log level to debug: "Half offset {} has been committed/rolled back"

* Fix unit test stability

Bump mockito-core to 3.10.0, remove powermock dependency, suppress useless logging

* [ISSUE #2898] Resolve rocketmq-example project failed during checkstyle execution (#2899)

Co-authored-by: SSpirits <shadowyspirits@outlook.com>
Co-authored-by: panzhi33 <wb-pz502261@alibaba-inc.com>
Co-authored-by: panzhi <panzhi33@qq.com>
Co-authored-by: ArronHuang <41609451+ArronHuang@users.noreply.github.com>
Co-authored-by: von gosling <vongosling@apache.org>
Co-authored-by: drgnchan <40224023+drgnchan@users.noreply.github.com>
Co-authored-by: zhangjidi2016 <zhangjidi@cmss.chinamobile.com>
Co-authored-by: ph3636 <38041490+ph3636@users.noreply.github.com>
Co-authored-by: ph3636 <tianxingguang@kanzhun.com>
Co-authored-by: BurningCN <1015773611@qq.com>
Co-authored-by: francis lee <francislee.cn@outlook.com>
Co-authored-by: 灼华 <43363120+BurningCN@users.noreply.github.com>
Co-authored-by: yuz10 <845238369@qq.com>
Co-authored-by: huangli <areyouok@gmail.com>
Co-authored-by: chenrl <raymond2366@outlook.com>
Co-authored-by: ayanamist <ayanamist@gmail.com>
Co-authored-by: zhangjidi2016 <1017543663@qq.com>
@zongtanghu zongtanghu modified the milestones: 4.8.1, 4.9.0 Jun 4, 2021
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this pull request Aug 12, 2022
pulllock pushed a commit to pulllock/rocketmq that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
progress/wip Work in progress. Accept or refused to be continue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support producer and cunsumer opentracing
7 participants