Home

Awesome

Automon

  1. What is Automon?
  2. Why Automon?
  3. Key Features
  4. What are Automon's dependencies?
    • AspectJ
    • SLF4J
    • Monitoring tools
  5. Tutorials
  6. How does Automon work?
  7. What are some examples of what Automon can do?
    • Monitoring
    • Tracing
  8. Automon Source Code
  9. Glossary
  10. Support

What is Automon?

Automon is a powerful Java library that combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor and/or trace your Java code, the JDK, and any jars used by your application. It streamlines the process of monitoring and tracing, enabling you to gain valuable insights into your code's behavior without invasive modifications.

Version 1.0 of Automon only performed monitoring and version 2.0 added tracing.

Here is a visual depiction of how Automon and AspectJ work together to monitor and trace your code. The diagram shows an AspectJ pointcut that will monitor or trace all methods (any return type, any number of arguments) in the 'com.mycompany' package as well as its subpackages (..) using your monitoring or tracing tool of choice. Automon (Note: see the AspectJ tutorial for more information on how AspectJ pointcuts work)

Why Automon?

Key Features

What are Automon's dependencies?

The Automon dependency will look something like this

      <dependency>
          <groupId>org.automon</groupId>
          <artifactId>automon</artifactId>
          <version>2.0.0</version>
      </dependency>

The following are other possible dependencies depending on whether you are using Automon monitoring or tracing.

<details> <summary><strong>AspectJ (used for both Tracing and Monitoring)</strong></summary>

Automon leverages AspectJ's capabilities to enable developers and administrators to not only define what parts of their code to observe (pointcuts), but also to seamlessly inject custom monitoring or tracing logic at those precise points (advice).

</details> <details> <summary><strong>SLF4J (used for Tracing only)</strong></summary>

SLF4J (Simple Logging Facade for Java) acts as a bridge between your application and the actual logging framework you choose to use. It allows you to switch logging implementations (like Log4j, Logback, etc.) without changing your code. This provides flexibility and makes your application independent of a specific logging library

'Tracing' is defined as the process of capturing detailed information about the execution flow of an application. Automon utilizes SLF4J's flexibility to provide comprehensive tracing capabilities, capturing method entry and exit events along with crucial metadata such as method names, execution times, and parameter values, to name just a few.

</details> <details> <summary><strong>Monitoring tools (used for Monitoring only)</strong></summary>

'Monitoring' is defined as the practice of collecting and analyzing metrics to understand the behavior and health of an application.

Some monitoring tools Automon currently works with are: Micrometer, JAMon, Yammer Metrics, StatsD. Here are the current implementations. If automon doesn't support your tool of interest it can usually be supported by adding a simple class.

Note: Micrometer serves as a proxy for other monitoring/metering APIs and so through it automon does too. As of 5/2019 the list of tools Micrometer can proxy includes: AppOptics, Atlas, Datadog, Dynatrace, Elastic, Ganglia, Graphite, Humio, Influx, JMX, KairosDB, New Relic, Prometheus, SignalFx, StatsD, Wavefront.

</details>

Tutorials

How does Automon work?

Automon uses AspectJ weaving to inject monitoring and tracing code into your application. This weaving can be done at:

LTW offers greater flexibility, allowing you to dynamically define pointcuts and trace or monitor even third-party libraries and JDK classes. See the Automon Tutorial for more detailed examples on how Automon works.

It is important to note that Automon is complimentary to monitoring and logging tools. Automon performs no monitoring on its own and leverages slf4j for tracing. It serves as a bridge between AspectJ (AspectJ defines 'what to trace or monitor') and monitoring and logging tools (which define 'how to trace or monitor'). You can also easily provide your own monitoring tool by implementing the simple OpenMon interface.

And finally, Automon can be dynamically enabled/disabled via the Automon MXBean (JMX) (see the AAutomon Tutorial for information on Automon and JMX).

What are some examples of what Automon can do?

Automon method and exception metrics displayed in JAMon

Automon Source Code

The code that generates the automon-{version}.jar file is contained in this directory. All other modules are examples how to use Automon.

Glossary

Aspect-Oriented Programming (AOP) and AspectJ Concepts

Monitoring/Observability/Logging/Tracing

Software Development

Support


And finally, if you need support contact us at Issues or email us at admin@automon.org.

Thanks, and happy tracing and monitoring!

Steve