In correlation with the fast paced technological evolution, software applications have also evolved to become more complex, more distributed and more dynamic. Cloud computing has pushed this evolution a step further. Therefore it is now more difficult to properly monitor application performances and ensure the end user that he will get the high-quality experience he is expecting. Luckily great tools such as InspectIT APM are taking care of the problem efficiently. In this presentation I will introduce you to inspectIt APM and then I will show you how to integrate it to your Spring boot application and how to diagnose, analyse and monitor your application. You will become familiar with the use of inspectIt three main components: the agent, the server and the user interface. You will also learn how to analyse user request from the invocation sequence and detect the root causes of potential problems. You will finally see how easy it is to perform real user monitoring with inspectIt in a production like environment.
Monitor your spring boot application performances using inspectit apm
1. Senacor Technologies AG 07.11.2018 1
Monitoring
your application
performances
using InspectIT APM
Alain Lompo
Senacor Technologies AG
#OSMC alain.lompo@senacor.com @alainlompo
2. Senacor Technologies AG 07.11.2018 2
Software developer
at Senacor
Usually with JEE and Spring/Spring boot
in the backend…
… And depending on the project
Angular or React on the frontend
I have a huge interest in graphics
Programming and I love reading and fishing
10. Senacor Technologies AG
Turn on the light under the hood
Locate the usual suspects
Finger point the problems
Get rid of them
HOW DOES INSPECTIT APM WORK?
07.11.2018 10
11. Senacor Technologies AG
HOW DOES INSPECTIT APM WORK?
07.11.2018 11
Java
agent
Mobile
agent
Browser
agent
.Net agent
InspectIT integration
collectd
Runningonthesystemunderdiagnostic
Datasources
AnalysisagentinterfaceHostagentinterface
Analysis data
storage
Long term
monitoring
database
InspectIT central server
Monitoring data
InspectIT integration
icinga
Monitoring UI
(Web based)
Analysis UI
(Rich client)
Trace Data (RESTful)
Custom tool
12. Senacor Technologies AG
HOW DOES INSPECTIT APM WORK?
07.11.2018 12
CMR
Long term
database
Java agent
Host
integrations
End user
(Browser)
End user
(rich client)
Web based
user
interface
13. Senacor Technologies AG
SETTING UP INSPECTIT APM
07.11.2018 13
Download InspectIT APM from ist official
website (http://www.inspectit.rocks/)
Run the Central Monitoring Repository CMR with
a simple java command:
java –jar inspectit-cmr.jar
Or run it using the startup.sh script to ensure
jvm compatibility
14. Senacor Technologies AG
Start the user interface
• Inject the java agent within your application before running it
SETTING UP INSPECTIT APM
07.11.2018 14
java –javaagent:<path_to_inspectit_agent>/inspectit-agent.jar
„-Dinspectit.repository=localhost:9070“
„-Dinspectit.agent.name=PetClinic“
-jar spring-petclinic-2.1.0.BUILD-SNAPSHOT.jar
15. Senacor Technologies AG
Database sensor
Exception sensor
http sensor
Invocation sequence
Logging sensor
Platform sensors
Remote sensors
Timer sensor
USAGE AND TYPES OF SENSORS
07.11.2018 15
InspectIT offers a great variety of sensors
16. Senacor Technologies AG
USAGE AND TYPES OF SENSORS
07.11.2018 16
method
Class
Method sensor
(ex: Timer
sensor)
Platform
sensor (ex:
CPU sensor)
17. Senacor Technologies AG
Here it’s about monitoring the client side of a web appplication,
things like:
Rendering time in the browser
Loaded resources
Javascript execution time
…
END USER MONITORING: HOW DOES IT WORK?
07.11.2018 17
18. Senacor Technologies AG
The client side informations are complementary
to the server side informations.
Via an extension, the inspectIT agent is able to
inject the required javascript code into the
server’s response
END USER MONITORING: HOW DOES IT WORK?
07.11.2018 18
19. Senacor Technologies AG
The metrics provided by the
performance.timing.api and the resource.api
(available via property values in the browser)
should be included in the instrumentation
Javascript functions and Ajax calls should also be
included
END USER MONITORING: HOW DOES IT WORK?
07.11.2018 19
20. Senacor Technologies AG
The gathered monitoring informations are then
transmitted to the InspectIT agent and combined
with server side traces.
END USER MONITORING: HOW DOES IT WORK?
07.11.2018 20
23. Senacor Technologies AG
INSPECTIT APM AND DIAGNOSEIT: DETECTION OF PROBLEMS
07.11.2018 23
InspectIT APM
Trace Rule
Retrieve informations from
Maintain problem
instance
Information request Insight enrichtment
Instrumentationrefinementrequest
Tag
Traces
Notify on tagging
Problem
Instance
repository
Problem
Instance
Create/update
manage
Result
description
language
Instrumentation
language
24. Senacor Technologies AG
INSPECTIT APM AND DIAGNOSEIT
07.11.2018 24
INSPECTIT 1.8 integrates the diagnosis service
for automatic performance problems detection
25. Senacor Technologies AG
NOTIFICATIONS AND THRESHOLDS
07.11.2018 25
In order to be able to send notifications when
thresholds are violated, the following features
of the CMR should be First enabled (or activated):
Long term data persistence
Alerting
26. Senacor Technologies AG
It is possible to set up a web based UI to use with
InspectIT APM. For example we could use Grafana
in combination with the long term persistence
Database to set up a web based UI.
SETTING UP WEB BASED UI
07.11.2018 26
27. Senacor Technologies AG
HOW DOES INSPECTIT APM WORK?
07.11.2018 27
Java
agent
Mobile
agent
Browser
agent
.Net agent
InspectIT integration
collectd
Runningonthesystemunderdiagnostic
Datasources
AnalysisagentinterfaceHostagentinterface
Analysis data
storage
Long term
monitoring
database
InspectIT central server
Monitoring data
InspectIT integration
icinga
Monitoring UI
(Web based)
Analysis UI
(Rich client)
Trace Data (RESTful)
Custom tool
33. Senacor Technologies AG 07.11.2018 33
Licences
The licence used can be found here: https://www.pexels.com/photo-license/
The Wikimedia Commons Attribution: By ENERGY.GOV (Living Large -- Argonne's First
Computer) [Public domain], via Wikimedia Commons
The licence used by pixabay for photos is Creative Commons CC0 and can be found here:
https://pixabay.com/fr/service/terms/#usage
Editor's Notes
Note: collectd and icinga are third party solutions
All datas gathered by these agents is also persisted into the long term monitoring database. The data can be nicely aggregated and visualized by our web-based monitoring user interface. You can also attach your own analysis tool to monitoring database to execute your own reports and analysis. You can also easily integrate additional information that you need from a monitoring perspective using the Host agent interface. Using this interface, you can integrate system (e.g., CPU, memory and IO) and operating system information, eg over the collectd inspectIT integration
RESTful services
Alert service
Business transaction service
Invocation service
Platform service
Explain here what a java agent is:
https://www.javamex.com/tutorials/memory/instrumentation.shtml
How-to guide to writing an agent: https://zeroturnaround.com/rebellabs/how-to-inspect-classes-in-your-jvm/
It is possible to write your own sensors:
https://dzone.com/articles/how-to-write-your-own-sensor-for-the-open-source-a
https://blog.novatec-gmbh.de/creating-inspectit-sensor-part1-agent/
https://github.com/inspectit-labs/awesome-inspectit
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93019656/Working+with+End+User+Monitoring
EUM is also possible
End-User Experience Monitoring (EUM) deals with monitoring the client side of a Web application like rendering times in the browser, loaded resources, JavaScript execution times and other aspects. The information provided by EUM are complementary to the information monitored on the server side.
The inspectIT agent should be extended to inject the required JavaScript code into a response of the application server. The instrumentation should include the monitoring of metrics provided by the performance.timing.api and the resource.api (both provided by the browser as property values) as well as timing behavior of JavaScript functions and AJAX calls.
The monitored information should be transmitted to the inspectIT agent to be combined with server-side traces.
End-User Experience Monitoring (EUM) deals with monitoring the client side of a Web application like rendering times in the browser, loaded resources, JavaScript execution times and other aspects. The information provided by EUM are complementary to the information monitored on the server side.
The inspectIT agent should be extended to inject the required JavaScript code into a response of the application server. The instrumentation should include the monitoring of metrics provided by the performance.timing.api and the resource.api (both provided by the browser as property values) as well as timing behavior of JavaScript functions and AJAX calls.
The monitored information should be transmitted to the inspectIT agent to be combined with server-side traces.
As s result of the diagnoseIT research project, inspectIT's version line 1.8 offers
an integrated diagnosis service for automatic performance problems detection.
This service can analyze requests lasting longer than a user-defined
baseline and provides insights on where the performance problems can be.
An overview of found problems is provided as a part of the monitoring dashboards.
Visit the official feature documentation to help you started.
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009435/Setup+webbased+user+interface
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009438/Integrate+inspectIT+default+dashboards
https://collectd.org/related.shtml
http://docs.grafana.org/reference/export_import/#importing-a-dashboard
Installation and startup of grafana
Checking installation
Configuration
Connecting to the long term DB
Note: collectd and icinga are third party solutions
All datas gathered by these agents is also persisted into the long term monitoring database. The data can be nicely aggregated and visualized by our web-based monitoring user interface. You can also attach your own analysis tool to monitoring database to execute your own reports and analysis. You can also easily integrate additional information that you need from a monitoring perspective using the Host agent interface. Using this interface, you can integrate system (e.g., CPU, memory and IO) and operating system information, eg over the collectd inspectIT integration
RESTful services
Alert service
Business transaction service
Invocation service
Platform service
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009435/Setup+webbased+user+interface
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009438/Integrate+inspectIT+default+dashboards
https://collectd.org/related.shtml
http://docs.grafana.org/reference/export_import/#importing-a-dashboard
Installation and startup of grafana
Checking installation
Configuration
Connecting to the long term DB
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009435/Setup+webbased+user+interface
https://inspectit-performance.atlassian.net/wiki/spaces/DOC18/pages/93009438/Integrate+inspectIT+default+dashboards
https://collectd.org/related.shtml
http://docs.grafana.org/reference/export_import/#importing-a-dashboard
Installation and startup of grafana
Checking installation
Configuration
Connecting to the long term DB