topic Re: Monitoring an application that uses mainly WebSocket communication in Java (Java Agent, Installation, JVM, and Controller Installation)https://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36265#M1673
<P>No, we never got this resolved. Our conclusion was that AppD's out-of-the-box support for ws:/wss: communication is very limited. It probably would be possible to set it up, but it seems that a lot of manual configuration would be required.</P>
<P>Since our own software (which we were trying to monitor with AppD) itself happens to be a sensor data collection and analysis system (though primarily for geophysical sensors) we ended up implementing our own "self-monitoring" system by introducing synthetic sensors that were implemented via JMX, etc.</P>Tue, 16 Apr 2019 17:28:17 GMTMirko.Raner2019-04-16T17:28:17ZMonitoring an application that uses mainly WebSocket communicationhttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/31010#M994
<P>Our application is a cloud platform that gives users access to embedded systems and IoT devices. Whereas we do have&nbsp;a small HTTP-based web API, the majority of communication and interaction happens via Web Socket communication on three different ports. On some of the ports the higher-level transmission protocol is JSON-RPC 2.0, other ports use a number of custom binary protocols.</P>
<P>We use the&nbsp;<A href="https://netty.io/" target="_blank">Netty 4.1</A>&nbsp;framework to implement WebSocket communication.</P>
<P>Little to no traffic happens over HTTP.</P>
<P>&nbsp;</P>
<P>AppDynamics has been able to identify some basic business transactions, mainly centered around GWT, which is one of the mechanisms we use for front-end communication. However, for device communication AppD has not been able to auto-detect meaningful endpoints.</P>
<P>&nbsp;</P>
<P>So,&nbsp;my detailed questions are:</P>
<OL>
<LI>What is a good way to set-up monitoring for the WebSocket communication that has not been autodetected?</LI>
<LI>How do we set up a health check that, e.g., sends a particular JSON-RPC message on the Web Socket and measures the time until we receive a response?</LI>
</OL>Tue, 13 Mar 2018 00:21:25 GMThttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/31010#M994Mirko.Raner2018-03-13T00:21:25ZRe: Monitoring an application that uses mainly WebSocket communicationhttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36255#M1665
<P>I have the same issue. Did you get any answer for this question?</P>Tue, 16 Apr 2019 04:07:25 GMThttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36255#M1665appd2.appd22019-04-16T04:07:25ZRe: Monitoring an application that uses mainly WebSocket communicationhttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36265#M1673
<P>No, we never got this resolved. Our conclusion was that AppD's out-of-the-box support for ws:/wss: communication is very limited. It probably would be possible to set it up, but it seems that a lot of manual configuration would be required.</P>
<P>Since our own software (which we were trying to monitor with AppD) itself happens to be a sensor data collection and analysis system (though primarily for geophysical sensors) we ended up implementing our own "self-monitoring" system by introducing synthetic sensors that were implemented via JMX, etc.</P>Tue, 16 Apr 2019 17:28:17 GMThttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36265#M1673Mirko.Raner2019-04-16T17:28:17ZRe: Monitoring an application that uses mainly WebSocket communicationhttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36476#M1689
<P>We're evaluating the product for our NodeJS&nbsp; Express/Socket.io app and not seeing anything reporting in the dashboard for websocket events.</P>
<P>&nbsp;</P>
<P>We are also NOT seeing any remote HTTP calls our app makes to external HTTP REST endpoints.</P>
<P>&nbsp;</P>
<P>The only thing we're seeing in the "Remote Services" tab is our connection to Redis.</P>
<P>&nbsp;</P>
<P>Although they advertise HTTP and Socket.io monitoring, it doesn't look like it's working very well.</P>Wed, 08 May 2019 20:19:49 GMThttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36476#M1689Bryan.Hughes2019-05-08T20:19:49ZRe: Monitoring an application that uses mainly WebSocket communicationhttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36482#M1690
<P>Conceptually, the core construct that AppDynamics monitors is event based communication, where the processing of each message is one Business Transaction.</P>
<P>&nbsp;</P>
<P>Being stream based, rather than message based,&nbsp; raw web sockets do not fit well into this model.&nbsp; If your application operates a higher level message-based protocol over websockets where a complete message is sent over the socket and received, processed and replied to on the server, then the server side activity should be modelled as a Business Transaction, and will be tracked as such by AppDynamics.</P>
<P>&nbsp;</P>
<P>Business Transactions must start from an entry point the agent knows about.&nbsp; The agents automatically detect some entry-points by virtue of the transaction logic being placed in a well-known container (e.g. within a servlet for java HTTP).&nbsp; Business Transactions originating at points in code that are not known to the AppDynamics require custom configuration to be recognised (a <A href="https://docs.appdynamics.com/display/PRO45/POJO+Entry+Points" target="_self">POJO entry point</A>, in the case of java, or using <A href="https://docs.appdynamics.com/display/PRO45/Node.js+Agent+API+User+Guide#Node.jsAgentAPIUserGuide-BusinessTransactionDefinition" target="_self">the agent API</A> in the case of the Node.js agent).</P>
<P>&nbsp;</P>
<P>Backend activity (e.g. your external REST calls) will only be tracked if it is in the context of a Business Transaction (and made through a client that is either instrumented out of the box, or via configuration)</P>
<P>&nbsp;</P>
<P>To my knowledge, none of our agents support out of the box instrumentation for socket.io; a quick look suggests to me that is is event based, so if you were to instrument socker.emit() as an exit and socket.on() as a Business Transaction entry, I think you would see what you are expecting.</P>
<P>&nbsp;</P>
<P>If the messages are passing between server-side components and you additionally arrange for the AppDynamics correlation header to be passed in the message payload then AppDynamics would also show you the end to end correlation.</P>
<P>&nbsp;</P>
<P>I hope that explanation helps.</P>
<P>&nbsp;</P>
<P>Warm regards,</P>
<P>Peter</P>
<P>&nbsp;</P>
<P>&nbsp;</P>Thu, 09 May 2019 10:40:14 GMThttps://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/Monitoring-an-application-that-uses-mainly-WebSocket/m-p/36482#M1690Peter.Holditch2019-05-09T10:40:14Z