-
Notifications
You must be signed in to change notification settings - Fork 609
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
Support tracking the message listener of spring jms #706
Conversation
I recommited the code and successfully passed the github action job |
test/plugin/scenarios/spring-jms-5.x-scenario/support-version.list
Outdated
Show resolved
Hide resolved
.../java/org/apache/skywalking/apm/plugin/spring/jms/define/MessageListenerInstrumentation.java
Outdated
Show resolved
Hide resolved
Your test scenarios failed. Please test them locally, make sure they are passed and stable. |
Why did you remove 5.0? |
5.0 spring version too low lead to test scenarios failed |
My question is about why. We should be clear about supported versions. Could you check the codes and explain why? |
The plugin can support 5.0, but I'm still figuring out how to make it pass the test scenario |
Take your time. We should cover all 5.x versions. |
Any update? I am planning to cut the 9.3.0 release |
# Conflicts: # CHANGES.md # docs/en/setup/service-agent/java-agent/Plugin-list.md
Please resolve the conflicts. |
...in/src/main/java/org/apache/skywalking/apm/plugin/spring/jms/MessageListenerInterceptor.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/org/apache/skywalking/apm/plugin/spring/jms/MessageListenerInterceptor.java
Outdated
Show resolved
Hide resolved
test/plugin/scenarios/spring-jms-5.x-scenario/config/expectedData.yaml
Outdated
Show resolved
Hide resolved
...o/src/main/java/org/apache/skywalking/apm/testcase/spring/jms/controller/CaseController.java
Show resolved
Hide resolved
test/plugin/scenarios/spring-jms-5.x-scenario/config/expectedData.yaml
Outdated
Show resolved
Hide resolved
...in/src/main/java/org/apache/skywalking/apm/plugin/spring/jms/MessageListenerInterceptor.java
Outdated
Show resolved
Hide resolved
What happened here? |
I thought you didn't need this plugin. |
I removed the context carrier and replaced it with context snapshot. Is that right? |
I am waiting for your reply about why do header extra when you only create local span. This is rare from my understanding. |
I hope to trace specific execute of the active MQ consumers. |
But it is pointless when you have another header extracring from entry span from the actual entry span. Local span doesn't need reference of the producer. |
Yes, after your reminder, I realized this mistake. I did this before because if I use context snapshot to connect to consumers, I also need to enhance the active MQ message. So, this plugin doesn't need to do anything except create a local span? |
If that could make the trace continues as your expectations, then yes. |
Can only be used by hard coding for now , different approaches to JNDI and connectionFactory need to be considered |
I think active MQ should be updated to put correct tag value in JMS case. |
should create plugin project |
Agree for that. Feel free to update. |
Thank you for your recommend. But i have no idea about this, do you have any plans? |
No, Java agent nowadays is totally relying on volunteers. |
Yes, i know :) I asked @cloudgc |
i write demo project https://github.com/cloudgc/apm-spring-jms already applied to actual company projects If you need it urgently, you can fork from it, I will consider adding this plug-in later. |
Close for now. Discussion could continue. |
Agree, thank you for your guidance. @wu-sheng |
I have viewed your demo, and it cloud work together with the activemq-5.x-plugin to create duplicate consumer entry spans. @cloudgc |
What do you mean duplicate? Does it leverage the nested entry span mechanism? Which make only the first entry span left. |
I don't think that, the demo projcet will create a new entry span link through ActiveMQ producer span, this repeats with ActiveMQ consumer. The process of use spring JMS & third-party MQ would be like: -> create connectionFactory(take ActiveMQ for example) |
the final effect is as follows: activemq-consumer entry was stop when over dequeue method and i fix my demo : apm-spring-jms |
I have discussed with @wu-sheng, and create two entry spans in the consumer part, which will cause the consumer traffic to be counted twice. So far, i think the better way is to update the active MQ plugin, and generate a context snapshot when creating messages, the spring JMS plugin create a local span, if message has a context snapshot, it will be linked. |
should be , not only activemq needs to do this, other mq queues need create context snapshot , looking forward to your code changes |
CHANGES
log.