{"id":13485961,"url":"https://github.com/stevensouza/automon","last_synced_at":"2026-02-14T12:38:22.756Z","repository":{"id":27923606,"uuid":"31415856","full_name":"stevensouza/automon","owner":"stevensouza","description":"Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively trace and monitor your Java code, the JDK, and 3rd party libraries.","archived":false,"fork":false,"pushed_at":"2024-10-18T20:20:31.000Z","size":12834,"stargazers_count":572,"open_issues_count":1,"forks_count":138,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-07-07T16:44:46.391Z","etag":null,"topics":["aop","aspectj","java","log4j2","logging","monitoring","observability","performance","performance-monitoring","slf4j","tracing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevensouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-27T11:11:45.000Z","updated_at":"2025-06-11T23:09:10.000Z","dependencies_parsed_at":"2024-01-03T01:22:03.245Z","dependency_job_id":"0daab853-d7c2-44cc-afd6-e22ae4d7cb82","html_url":"https://github.com/stevensouza/automon","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/stevensouza/automon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevensouza%2Fautomon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevensouza%2Fautomon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevensouza%2Fautomon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevensouza%2Fautomon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevensouza","download_url":"https://codeload.github.com/stevensouza/automon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevensouza%2Fautomon/sbom","scorecard":{"id":852681,"data":{"date":"2025-08-11","repo":{"name":"github.com/stevensouza/automon","commit":"815e9d0ea1360d8a93e6f241ada1f76c4fb9dfb6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":2,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1","Warn: binary detected: examples/libs/aopalliance-1.0.jar:1","Warn: binary detected: examples/libs/aspectjrt-1.9.22.1.jar:1","Warn: binary detected: examples/libs/aspectjweaver-1.9.22.1.jar:1","Warn: binary detected: examples/libs/java-statsd-client-3.1.0.jar:1","Warn: binary detected: examples/libs/metrics-core-3.1.0.jar:1","Warn: binary detected: examples/libs/newrelic-api-3.29.0.jar:1","Warn: binary detected: examples/libs/playground-1.0.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xh6m-7cr7-xx66","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T22:56:14.211Z","repository_id":27923606,"created_at":"2025-08-23T22:56:14.211Z","updated_at":"2025-08-23T22:56:14.211Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aop","aspectj","java","log4j2","logging","monitoring","observability","performance","performance-monitoring","slf4j","tracing"],"created_at":"2024-07-31T18:00:35.116Z","updated_at":"2026-02-14T12:38:22.738Z","avatar_url":"https://github.com/stevensouza.png","language":"Java","funding_links":[],"categories":["Projects","项目"],"sub_categories":["Monitoring","监测"],"readme":"# Automon\n\n1. [What is Automon?](#what-is-automon)\n2. [Why Automon?](#why-automon)\n3. [Key Features](#key-features)\n4. [What are Automon's dependencies?](#what-are-automons-dependencies)\n    - AspectJ\n    - SLF4J\n    - Monitoring tools\n5. [Tutorials](#tutorials)\n6. [How does Automon work?](#how-does-automon-work)\n7. [What are some examples of what Automon can do?](#what-are-some-examples-of-what-automon-can-do)\n    - Monitoring\n    - Tracing\n8. [Automon Source Code](#automon-source-code)\n9. [Glossary](#glossary)\n    - [Aspect-Oriented Programming (AOP) and AspectJ Concepts](#aspect-oriented-programming-aop-and-aspectj-concepts)\n    - [Monitoring/Observability/Logging/Tracing](#monitoringobservabilityloggingtracing)\n    - [Software Development](#software-development)\n10. [Support](#support)\n\n# What is Automon?\n\nAutomon is a powerful Java library that combines the power of AOP (AspectJ) with monitoring or logging tools you already \nuse to declaratively monitor and/or trace your Java code, the JDK, and any jars used by your application. It streamlines the process \nof monitoring and tracing, enabling you to gain valuable insights into your code's behavior without invasive modifications.\n\nVersion 1.0 of Automon only performed monitoring and version 2.0 added tracing.\n\nHere is a visual depiction of how Automon and AspectJ work together to monitor and trace your code.\nThe  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 \nits subpackages (..) using your monitoring or tracing tool of choice. \n![Automon](https://github.com/stevensouza/automon/blob/master/docs/automon_bridge.png)\n(Note: see the [AspectJ tutorial](https://github.com/stevensouza/automon/blob/master/docs/aspectj-tutorial.md) for more information\non how AspectJ pointcuts work)\n\n## Why Automon?\n\n- **Non-invasive monitoring and tracing**: No need to modify your existing code\n- **Flexibility**: Works with various monitoring and logging tools you already use\n- **Comprehensive coverage**: Monitor and trace your code, JDK, and third-party libraries/jars\n- **Performance insights**: Easily identify bottlenecks and optimize your application\n- **Exception tracking**: Catch and analyze exceptions for improved reliability\n\n## Key Features\n\n- **Performance Monitoring**: Track method execution times and identify performance bottlenecks.\n- **Tracing**: Capture detailed logs of method calls, parameters, return values, and exceptions.\n- **Exception Tracking**: Monitor and log exceptions, providing insights into error rates and potential issues.\n- **Flexibility**: Works with various monitoring tools like Micrometer, JAMon, Yammer Metrics, StatsD, and Micrometer.\n- **JDK and Third-Party Library Monitoring**: Monitor not just your code, but also JDK classes and third-party libraries/jars.\n- **Spring Integration**: Seamlessly integrate with Spring applications.\n- **Dynamic Enable/Disable**: Can be dynamically enabled or disabled via JMX.\n\n# What are Automon's dependencies?\nThe Automon dependency will look something like this\n```xml\n      \u003cdependency\u003e\n          \u003cgroupId\u003eorg.automon\u003c/groupId\u003e\n          \u003cartifactId\u003eautomon\u003c/artifactId\u003e\n          \u003cversion\u003e2.0.0\u003c/version\u003e\n      \u003c/dependency\u003e\n```\nThe following are other possible dependencies depending on whether you are using Automon monitoring or tracing.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eAspectJ (used for both Tracing and Monitoring)\u003c/strong\u003e\u003c/summary\u003e\n\n- **Aspect-Oriented Programming (AOP)** is a programming paradigm that addresses cross-cutting concerns, which are functionalities that span multiple parts of your application (e.g., logging, performance monitoring, security).\n- **AspectJ** is a popular AOP framework for Java that provides a rich set of tools for defining and weaving aspects into your code.\n\nAutomon leverages AspectJ's capabilities to enable developers and administrators to not only define what parts of their \ncode to observe (pointcuts), but also to seamlessly inject custom monitoring or tracing logic at those precise points (advice).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSLF4J (used for Tracing only)\u003c/strong\u003e\u003c/summary\u003e\n\nSLF4J (Simple Logging Facade for Java) acts as a bridge between your application and the actual logging framework you \nchoose to use. It allows you to switch logging implementations (like Log4j, Logback, etc.) without changing your code. \nThis provides flexibility and makes your application independent of a specific logging library\n\n'Tracing' is defined as the process of capturing detailed information about the execution flow of an application.\nAutomon utilizes SLF4J's flexibility to provide comprehensive tracing capabilities, capturing method entry and exit \nevents along with crucial metadata such as method names, execution times, and parameter values, to name just a few.\n\u003c/details\u003e\n \n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eMonitoring tools (used for Monitoring only)\u003c/strong\u003e\u003c/summary\u003e\n\n'Monitoring' is defined as the practice of collecting and analyzing metrics to understand the behavior and health of an application.\n\nSome monitoring tools Automon currently works with are: Micrometer, JAMon, Yammer Metrics, StatsD. Here are the current [implementations](https://github.com/stevensouza/automon/tree/master/automon/src/main/java/org/automon/implementations).\nIf automon doesn't support your tool of interest it can usually be supported by adding a simple class.\n\nNote: [Micrometer](https://micrometer.io/docs) 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.\n\n\u003c/details\u003e\n\n# Tutorials\n* [Automon tutorial](https://github.com/stevensouza/automon/blob/master/docs/automon-tutorial.md): A guide explaining how to use Automon.\n* [Automon Aspects and class diagrams](https://github.com/stevensouza/automon/blob/master/docs/automon_class_diagrams.md): Class diagrams and other information on the Automon aspects for tracing and how users can inherit from them and leverage their capabilities.\n* [AspectJ tutorial](https://github.com/stevensouza/automon/blob/master/docs/aspectj-tutorial.md): An introduction to AspectJ, covering its core concepts and usage for implementing aspect-oriented programming in Java applications.\n* [SLF4J and Log4j2 tutorial](https://github.com/stevensouza/automon/blob/master/docs/slf4j-log4j2-tutorial.md):  A tutorial demonstrating how to use SLF4J (Simple Logging Facade for Java) with Log4j2, focusing on logging implementation in Java projects.\n\n# How does Automon work?\n\nAutomon uses AspectJ weaving to inject monitoring and tracing code into your application. This weaving can be done at:\n- Runtime with Load Time Weaving (LTW)\n- Build time with Build Time Weaving (BTW)\n\nLTW offers greater flexibility, allowing you to dynamically define pointcuts and trace or monitor even third-party libraries and JDK classes.\nSee the [Automon Tutorial](https://github.com/stevensouza/automon/blob/master/docs/automon-tutorial.md) for more detailed examples on how Automon works.\n\n**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.**\nIt 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').\nYou can also easily provide your own monitoring tool by implementing the simple [OpenMon](https://github.com/stevensouza/automon/blob/master/automon/src/main/java/org/automon/implementations/OpenMon.java)\ninterface.\n\nAnd finally, Automon can be dynamically enabled/disabled via the Automon MXBean (JMX) (see the A[Automon Tutorial](https://github.com/stevensouza/automon/blob/master/docs/automon-tutorial.md) for information on \nAutomon and JMX).\n\n# What are some examples of what Automon can do?\n- **Monitoring:** Automon monitoring is typically used to track method invocation time, and exception counts. It is very easy to set-up. You should\nbe able to start monitoring your code within minutes.  The data will be stored and displayed using the monitoring tool of your choice. \nThe following image shows the type of data Automon collects (The example below displays the data in JAMon, however the data can be displayed in whatever monitoring tool/api you choose.  For example here is same data displayed in [grahphite/StatsD](https://github.com/stevensouza/automon/blob/master/docs/automon_statsd.png)).\n\n![Automon method and exception metrics displayed in JAMon](https://github.com/stevensouza/automon/blob/master/docs/automon_jamon.png)\n\n* **Tracing:** Here is an example of the output sent to an application log file when the `BasicContextTracingAspect` is used (note there are other tracing aspects such as 'FullContextTracingAspect'). Note that the following trace tracks method execution but it can also track many other join points such as instance variable get/set.\n\n    * **Example:**\n      * Automon automatically logged method entry (BEFORE) and exit (AFTER) for the `getFirstName()` method.\n      * It also kept as metadata the calls that led to `getFirstName()` being called (`main(..)` called `run(..)` which called `getFirstName()`).\n      * The method exit (AFTER) tracks how long the method invocation took. \n      * In this example the [RequestIdAspect](https://github.com/stevensouza/automon/blob/master/automon/src/main/java/org/automon/aspects/tracing/spring/RequestIdAspect.java) was also used to create\n      a unique request UUID that lasts the duration of the request. \n      * You can see how this trace output was generated by looking at\n      [examples/hello-world-tracebasiccontext-ltw.sh](https://github.com/stevensouza/automon/tree/master/examples/hello-world-tracebasiccontext-ltw.sh)\n      * Sample output:\n          ```\n          c.m.MyTracingBasicContextAspect INFO 08:51:56.273 - BEFORE MDC: {NDC0=HelloWorld.main(..), NDC1=HelloWorld.run(..), NDC2=HelloWorld.getFirstName(), kind=method-execution, requestId=5f7c836b-0283-42b7-b52c-1819e0ef855c} \n          c.m.MyTracingBasicContextAspect INFO 08:51:56.274 - AFTER MDC: {NDC0=HelloWorld.main(..), NDC1=HelloWorld.run(..), NDC2=HelloWorld.getFirstName(), executionTimeMs=0, kind=method-execution, requestId=5f7c836b-0283-42b7-b52c-1819e0ef855c}\n          ```\n\n# Automon Source Code\n\nThe code that generates the automon-{version}.jar file is contained in [this directory](https://github.com/stevensouza/automon/tree/master/automon). All other modules are\nexamples how to use Automon.\n\n# Glossary\n## Aspect-Oriented Programming (AOP) and AspectJ Concepts\n* **AOP (Aspect-Oriented Programming)**: A programming paradigm that enables modularization of cross-cutting concerns.\n* **Aspect**: A modular unit that encapsulates a cross-cutting concern, consisting of pointcuts and advice.\n* **Advice**: The code that is executed at join points selected by a pointcut.\n* **Join point**: A well-defined point in the execution of your program, such as a method call, field access, or exception handling.\n* **Pointcut**: An expression that selects join points in your code where advice should be applied.\n* **Weaving**: The process of combining aspects with your target code to perform some action such as monitoring or tracing.\n* **AspectJ**: An AOP framework for Java.\n* **BTW (Build-Time Weaving)**: Weaving aspects into your code during compilation.\n* **LTW (Load-Time Weaving)**: Weaving aspects into your code at runtime.\n\n## Monitoring/Observability/Logging/Tracing\n* **Monitoring/Observability**: The practice of collecting and analyzing metrics and logs to understand the behavior and health of an application.\n* **Monitoring tools**: Tools used to collect and visualize metrics about an application's performance and health.\n* **Tracing**: The process of capturing detailed information about the execution flow of an application.\n* **Log4j**: A popular logging framework for Java.\n* **SLF4J**: A logging facade that provides a common interface for various logging frameworks.\n\n## Software Development\n* **Maven**: A build automation tool for Java projects.\n* **Spring**: A popular framework for building enterprise Java applications.\n* **Shaded jar**: An \"uber-jar\" that bundles all dependencies into a single JAR file.\n\n\n# Support\n-----------------------------------\nAnd finally, if you need support contact us at [Issues](https://github.com/stevensouza/automon/issues) or email us\nat admin@automon.org.\n\nThanks, and happy tracing and monitoring!\n\nSteve\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevensouza%2Fautomon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevensouza%2Fautomon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevensouza%2Fautomon/lists"}