JMS instrumentation with APM


we are using java apm agent version 1.30.0 with JMS Artemis ActiveMQ Server. Config is

CREATE_ARGUMENTS="${CREATE_ARGUMENTS} -javaagent /var/lib/artemis-instance/elastic-apm-agent-${ELASTIC_APM_AGEN_VERSION}.jar"
CREATE_ARGUMENTS="${CREATE_ARGUMENTS} -Delastic.apm.verify_server_cert false"
CREATE_ARGUMENTS="${CREATE_ARGUMENTS} -Delastic.apm.service_name activemq-service"
CREATE_ARGUMENTS="${CREATE_ARGUMENTS} -Delastic.apm.application_packages "

But MQ doesn't connects with APM. Any idea? Is packages need to be changed
Is there any docs?
Logs of MQ server

CREATE_ARGUMENTS=--user admin --password admin --silent --allow-anonymous --http-host --relax-jolokia -Delastic.apm.server_url https://ip:8200 -Delastic.apm.verify_server_cert false -Delastic.apm.service_name activemq-service -Delastic.apm.application_packages
Creating ActiveMQ Artemis instance at: /var/lib/artemis-instance

Auto tuning journal ...
done! Your system can make 8.62 writes per millisecond, your journal-buffer-timeout will be 115999

You can now start the broker by executing:  

   "/var/lib/artemis-instance/bin/artemis" run

Or you can run the broker in the background using:

   "/var/lib/artemis-instance/bin/artemis-service" start

     _        _               _
    / \  ____| |_  ___ __  __(_) _____
   / _ \|  _ \ __|/ _ \  \/  | |/  __/
  / ___ \ | \/ |_/  __/ |\/| | |\___ \
 /_/   \_\|   \__\____|_|  |_|_|/___ /
 Apache ActiveMQ Artemis 2.17.0

Apr 25, 2022 10:07:48 AM java.lang.System$LoggerFinder lambda$accessProvider$0
WARNING: Failed to instantiate LoggerFinder provider; Using default.
2022-04-25 10:07:48,137 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2022-04-25 10:07:48,211 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)

Hi !

The APM agent instruments JMS clients, not JMS servers, which explains why it's not supported.
Unless the ActiveMQ Artemis server is implemented on top of a supported technology, then it won't be supported by the agent with automatic instrumentation.

However, you might be able to use manual tracing with using one Tracing API and then use server-specific hooks to create transactions and spans for APM.

Also, there is usually little value to instrument the JMS/Messaging server itself as capturing detailed tracing is only relevant if you have knowledge of its internal architecture and have the ability to change its behavior through configuration or code changes.

Could you elaborate a bit on your context and what information do you expect to get from deploying the APM agent on this server ?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.