In this tutorial we will demonstrate how to use MoSKito Javaagent to monitor existing web-application with no changes to the app’s source code. We will show how to add MoSKito Javaagent to the app deployed in Tomcat servlet container, and how to connect to this app using MoSKito Inspect.
We programmers never make mistakes. Or so we think and say. However, from time to time errors manage to sneak to production systems and no one seems to know how. Well MoSKito won’t change this, but it can help you hunting errors. And here is how.
Applications grow. At least successful applications. At some point your growing application will require a loadbalancer. It may be for scaling or availability purpose or something else. The day your application runs behind the loadbalancer first time will make you proud. And it will make you ask, how can I control what the loadbalancer thinks of my application availability? This is how.
Today MoSKito 2.7.3 is released, and it contains the hottest feature since long time. But decide for yourself.
The feature request goes back some years to Dec 02, 2010 to my time at Parship, as Malte once asked, if it would be possible to know where a call to a method actually came from. It was on the list since then, but time was hard to find.
So what are tracers anyway? Tracers have 3 purposes or aspects:
- Tracers allow you to find out which part of your code has been calling some methods in a class of your application you are interested in. They achieve it by guarding the class in question (works with most monitoring points) and triggering and saving a stack trace once something passes by. This is useful if you see strange behavior of some method/class in the MoSKito monitoring, but don’t know who is actually using this class.
- After the execution has passed the tracer, the tracer start to record everything that happens afterwards. This means that a TracedCall (part of MoSKito Journey) is created on the fly and recorded. Every call on the monitored class will be noted, along with parameters and return values.
- To round this up, tracer will gather some amount of traces (code passing by). Depending on how you configured MoSKito, the tracers could collect only calls with largest duration or simply oldest or newest calls. This way you can run a tracer over a long period of time, collect all slow calls and investigate what slows them down.
Today we are going to connect MoSKito-Central to MongoDB database.
In a few words, MoSKito-Central is a service (remote or embedded) that receives your MoSKito statistics and stores it in the place of your choice (Filesystem, Database, …).
Our choice for now is MongoDB and MoSKito-Central in embedded mode.
About 10 years ago log4j was the logging framework for java. Years passed and many logging frameworks emerged. For many people, including myself, logback is the new log4j (and that is not only because of Ceki).
Unfortunately it is not possible to run logback as slf4j implementation OOTB in JBoss like in Tomcat. The following 5 steps explain you how to get it running.
When it comes to choosing an IDE for Java development, people usually face a challenge of having to pick one from the three main players: IntelliJ IDEA, Eclipse or NetBeans.
The point of this topic is not to start another “the best IDE holy war”, but to share our own personal experience. Of course, the best tool is the one that gives you maximal productivity and that choice is always subjective. Period.
Originally, almost all of us here at Anotheria started the journey with Eclipse. It was free and did the job pretty well. Everyone got used to it and switching to another tool did not make sense at the time.
Things changed at the end of 2009, when JetBrains open sourced IntelliJ IDEA and offered a new Community Edition version completely free of charge. Not to try it would have been a crime.
Result exceeded the expectations even of the biggest skeptics. Autocomplete was magical: sometimes it felt like like IDEA knew what statement you wanted to write next. Core editor features, debugger, external tool support – they were all amazing as well. IntelliJ IDEA was definitely the most intelligent tool we had ever used.
During that time we were transitioning our open source project to Maven. Of course, build tool support was of critical importance. We used M2Eclipse for Maven integration but were hardly satisfied with it. After trying IDEA which had great built-in Maven support, there was no going back.
Today IntelliJ IDEA is the number one tool for us. Not only for Java development. Front-end guys use it for their HTML/CSS/JS work as well. And they are happy with it!
Recently, 14-th version was released. It came out with a number of big new features (improved debugger, built-in decompiler, etc). However, one of the most anticipated additions personally for me was the improved Scala support, which was worth waiting. So now if you need an IDE with SBT integration or want to build your next web application with Play Framework – I would definitely recommend you to check out IntelliJ IDEA.
My name is Malte Pickhan and I am a Java Developer at tyntec GmbH, located in Dortmund (Germany). And this is my personal MoSKito-Story 🙂
The first MoSKito Hackathon this year took place in Kiev on June 17th. This is the report.