Perceptor: The "Performance Metrics Gathering Interceptor For Java EE" Released

perceptor v0.0.1 released. Perceptor is "Performance Metrics Gathering Interceptor" for Java EE 7. It comes as a 9kB, zero dependencies, Thin JAR with "plug and play" installation and two flavors:

  1. perceptor (metrics available via injection only):
        
    <dependency>
        <groupId>com.airhacks</groupId>
        <artifactId>perceptor</artifactId>
        <version>0.0.1</version>
    </dependency>
        
    
  2. perceptor-spy (metrics are exposed via: /monitoring/methods endpoint):
        
    <dependency>
        <groupId>com.airhacks</groupId>
        <artifactId>perceptor-spy</artifactId>
        <version>0.0.1</version>
    </dependency>
                
    Metrics are accessbile under:  curl [YOUR_THIN_WAR]/resources/monitoring/methods/[exceptional|recent|slowest|unstable]
    

Usage:


import com.airhacks.interceptor.monitoring.boundary.PerformanceSensor;

@Interceptors(PerformanceSensor.class)
public class Invoker {
    public String slow() {}
    public String fast() {}

}

Checkout https://github.com/AdamBien/perceptor for more information. You may also like https://github.com/AdamBien/porcupine

See you at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE Performance, Monitoring and Troubleshooting. Is Munich's airport too far? Learn from home: airhacks.io.


NEW online workshop: WebStandards Igniter (online)

Airport MUC workshops: Java EE 8, Java 9: Bootstrap, Effective, Architectures, Single Page Apps, Progressive Web Apps, HTML 5, ES 6, CSS 3 and Microservices

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Hi Adam, is it me or is the response only returned in XML and there is no way to get it as JSON?

Regards,
Daniel

Posted by Daniel W. on April 10, 2017 at 03:03 PM CEST #

Hi Adam,

How often do you reset the
ConcurrentHashMap statistics in your projects?

I think that it will be useful to have a timer to run everyday or week in order to reset the map and save the current statistics to some file or db.
And when to call the rest service to collect statistics get the save data and the current statistics. What do you think?

What is the best approach in order to run such a mechanism in production environment?

Vaggelis

Posted by Vaggelis Spathas on July 03, 2017 at 08:49 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License