Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM Status missing? #31

Closed
phaus opened this issue Apr 9, 2015 · 2 comments
Closed

JVM Status missing? #31

phaus opened this issue Apr 9, 2015 · 2 comments

Comments

@phaus
Copy link

phaus commented Apr 9, 2015

Is there a reason why the default Matrics are not present?
Like from here https://github.com/dropwizard/metrics/tree/master/metrics-jvm/src/main/java/com/codahale/metrics/jvm ?

Within Dropwizard Applications, i am getting something like this:

{
    "jvm": {
        "vm": {
            "name": "JavaHotSpot(TM)64-BitServerVM",
            "version": "1.8.0_40-b25"
        },
        "memory": {
            "totalInit": 270991360,
            "totalUsed": 86478064,
            "totalMax": 3817865215,
            "totalCommitted": 168427520,
            "heapInit": 268435456,
            "heapUsed": 50204640,
            "heapMax": 3817865216,
            "heapCommitted": 131072000,
            "heap_usage": 0.01314992467245863,
            "non_heap_usage": -36273424,
            "memory_pool_usages": {
                "CodeCache": 0.042722320556640624,
                "CompressedClassSpace": 0.0026135221123695374,
                "Metaspace": 0.9681979557655377,
                "PSEdenSpace": 0.029426374601005494,
                "PSOldGen": 0.0027989848809816687,
                "PSSurvivorSpace": 0.08125
            }
        },
        "buffers": {
            "direct": {
                "count": 4,
                "memoryUsed": 77824,
                "totalCapacity": 77824
            },
            "mapped": {
                "count": 0,
                "memoryUsed": 0,
                "totalCapacity": 0
            }
        },
        "daemon_thread_count": 9,
        "thread_count": 26,
        "current_time": 1428581292747,
        "uptime": 105,
        "fd_usage": 0.00361328125,
        "thread-states": {
            "waiting": 0.2692307692307692,
            "blocked": 0,
            "runnable": 0.2692307692307692,
            "terminated": 0,
            "new": 0,
            "timed_waiting": 0.46153846153846156
        },
        "garbage-collectors": {
            "PSMarkSweep": {
                "runs": 1,
                "time": 21
            },
            "PSScavenge": {
                "runs": 20,
                "time": 50
            }
        }
    },
    ...
}

That is missing in the current output. Also the encapsulation within a "metrics" key is somehow specific to the Plugin. I am trying to setup a global Monitoring for Play and Dropwizard Applications. So having a Matching Metrics Layout would be nice. Just curious about the reason for doing it different here.

@liorhar
Copy link
Contributor

liorhar commented Apr 16, 2015

I think you're referring to dropwizard 0.6.x which had metrics 2.x. The format has changed in dropwizard 0.7.x as well.
It's something like this in the latest dropwizard releases:

{
version: "3.0.0",
gauges: {
jvm.buffers.direct.capacity: {
value: 1095110
},
jvm.buffers.direct.count: {
value: 171
},
jvm.buffers.direct.used: {
value: 1095110
},
jvm.buffers.mapped.capacity: {
value: 0
},
jvm.buffers.mapped.count: {
value: 0
}

But you're right this plugin doesn't add the jvm.memory/buffers/threads prefixes to the gauges as dropwizard does, I agree it would be nice, though it means breaking changes for everyone using these metrics

@phaus
Copy link
Author

phaus commented Apr 16, 2015

though it means breaking changes for everyone using these metrics

can't we just add these metrics in parrallel to the metrics { } object? That won't break anything.
I will have a look into the latest dropwizard version. If you like i will offer you a pull request then.

liorhar added a commit that referenced this issue Apr 22, 2015
standardize jvm metric names with dropwizard fixes #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants