https://github.com/eiiches/java-method-stats-agent
Java agent for collecting and exposing method statistics via JMX
https://github.com/eiiches/java-method-stats-agent
java java-agent jmx monitoring
Last synced: 2 months ago
JSON representation
Java agent for collecting and exposing method statistics via JMX
- Host: GitHub
- URL: https://github.com/eiiches/java-method-stats-agent
- Owner: eiiches
- License: apache-2.0
- Created: 2017-07-02T15:04:22.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2022-06-14T11:42:03.000Z (over 3 years ago)
- Last Synced: 2025-05-29T09:14:18.510Z (7 months ago)
- Topics: java, java-agent, jmx, monitoring
- Language: Java
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
java-method-stats-agent
=======================
Java agent for collecting and exposing method statistics via JMX.
**WARNING** (2017-07-01) I just started this project and should not be considered production-ready yet.
Usage
-----
```sh
java -javaagent:/path/to/java-method-stats-agent-$VERSION.jar=@/path/to/config.yaml ...
```
### Examples
#### Apache Flume
This instruments `append` and `appendBatch` RPC handler on Avro Source and collect their response time statistics which are not provided by Apache Flume out-of-the-box.
```yaml
instruments:
- method: org.apache.flume.source.AvroSource.append(org.apache.flume.source.avro.AvroFlumeEvent)
jmx:
domain: org.apache.flume.source
keys:
type: ${$jmx.sanitize($0.getName())}
method: append
event: ON_RETURN
type: TIMER
- method: org.apache.flume.source.AvroSource.appendBatch(java.util.List)
jmx:
domain: org.apache.flume.source
keys:
type: ${$jmx.sanitize($0.getName())}
method: appendBatch
event: ON_RETURN
type: TIMER
```
See [/examples](/examples) for more configuration examples.
License
-------
[The Apache License, Version 2.0](LICENSE)