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

[RIP-18]Add opentracing support for Apache RocketMQ #1525

Closed
wants to merge 8 commits into from

Conversation

wlliqipeng
Copy link
Contributor

What is the purpose of the change

add the support of opentracing

Brief changelog

Add the trace hook to sendMessage and consumeMessage
Add the Constructor to DefaultMQProducer and DefaultMQPushConsumer
Add examples of tracing producer and consumer by jaeger

Verifying this change

https://shimo.im/docs/gDhdTrrHjjQwycXv/

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.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 49.518% when pulling a9b73d0 on wlliqipeng:master into 430c62e on apache:develop.

client/pom.xml Outdated Show resolved Hide resolved

@Override
public void sendMessageBefore(SendMessageContext context) {
span = tracer.buildSpan("sendMessage").asChildOf(rootSpan).start();
Copy link
Member

Choose a reason for hiding this comment

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

Could we extract concrete buildspan parameter to a provider extension while not this constant inject?

Copy link
Member

Choose a reason for hiding this comment

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

Consider withTag method

Comment on lines +43 to 48
<dependency>
<groupId>io.jaegertracing</groupId>
<artifactId>jaeger-client</artifactId>
<version>0.32.0</version>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to write some unit test before writing use case examples. In addition, would you like to analyze your imported dependency and its children dependencies license are compatible with ASL 2.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,I will add some unit tests ,and the dependency of jaeger-client is compatible with ASL 2.0.

@yuz10
Copy link
Member

yuz10 commented Dec 20, 2021

Already done in #2860

@yuz10 yuz10 closed this Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support producer and cunsumer opentracing
4 participants