You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by ferdisn <gi...@git.apache.org> on 2018/11/23 03:22:42 UTC

[GitHub] tomee pull request #215: WIP mp-metrics-metered

GitHub user ferdisn opened a pull request:

    https://github.com/apache/tomee/pull/215

    WIP mp-metrics-metered

    Hi @ivanjunckes I've made this module and ran it with `tomee:run`
    
    I then hit the API with Postman, and here is my finding:
    
    Prometheus format
    ```
    # TYPE application:daily_status_seconds_count meter
    application:daily_status_seconds_count 6.0E-8
    # TYPE application:daily_status_rate_per_second meter
    application:daily_status_rate_per_second 0.0
    # TYPE application:daily_status_one_min_rate_per_second meter
    application:daily_status_one_min_rate_per_second 1.9999999999999997E-19
    # TYPE application:daily_status_five_min_rate_per_second meter
    application:daily_status_five_min_rate_per_second 1.9999999999999997E-19
    # TYPE application:daily_status_fifteen_min_rate_per_second meter
    application:daily_status_fifteen_min_rate_per_second 1.9999999999999997E-19
    ```
    
    JSON format
    ```json
    {
        "dailyStatus": {
            "oneMinuteRate": 2.8216057496353807e-12,
            "rate15": {
                "alpha": 0.7134952031398099,
                "initialized": true,
                "interval": 300000000000,
                "updates": {},
                "value": 2.736166620796627e-13
            },
            "rate5": {
                "alpha": 0.34075936979955623,
                "initialized": true,
                "interval": 300000000000,
                "updates": {},
                "value": 1.4486606950235942e-12
            },
            "unit": "minutes",
            "fifteenMinuteRate": 2.736166620796627e-13,
            "rate1": {
                "alpha": 0.07995558537067671,
                "initialized": true,
                "interval": 300000000000,
                "updates": {},
                "value": 2.8216057496353807e-12
            },
            "fiveMinuteRate": 1.4486606950235942e-12,
            "meanRate": 0,
            "lastUpdate": {
                "andDecrement": 5188059248904524,
                "opaque": 5188059248904523,
                "andIncrement": 5188059248904523,
                "plain": 5188059248904524,
                "value": 5188059248904524,
                "acquire": 5188059248904524
            },
            "count": 1,
            "initNs": 5187070527008724
        }
    }
    ```
    
    Both are really different from each other. Another thing, JSON format does not conform with the example in the specification.
    
    What should I do, now? Obviously making Test class wouldn't do it any good.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ferdisn/tomee mp-metrics-metered

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tomee/pull/215.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #215
    
----
commit 4d75a99314ec595e37534fee9cf66d02564ac2d4
Author: Ferdi <gi...@...>
Date:   2018-11-23T03:12:50Z

    Create mp-metrics-metered example pom.xml file

commit b71a312376222f7c50edf81ab3d8413ccd5c5eb3
Author: Ferdi <gi...@...>
Date:   2018-11-23T03:13:17Z

    Create WeatherService class with @Metered annotation

----


---

[GitHub] tomee pull request #215: WIP mp-metrics-metered

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/tomee/pull/215


---

[GitHub] tomee issue #215: WIP mp-metrics-metered

Posted by ivanjunckes <gi...@git.apache.org>.
Github user ivanjunckes commented on the issue:

    https://github.com/apache/tomee/pull/215
  
    @ferdisn good news. @radcortez has fixed the issue.
    
    There was a regression with the jsonb provider that caused the issue.
    https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
    
    Update your tomee master and try again.


---

[GitHub] tomee issue #215: WIP mp-metrics-metered

Posted by ivanjunckes <gi...@git.apache.org>.
Github user ivanjunckes commented on the issue:

    https://github.com/apache/tomee/pull/215
  
    Hi @ferdisn, yes I spot this issue while doing my example.
    
    I started a thread about it on the mailing list: Look for "Metrics Gauge Example and Bug".
    
    Send your PR there and ask questions on how to fix it. This is a great example of bug you can fix.
    
    I checked the TCK yesterday and I was trying to find the solution  for this as well.
    
    It seems to be a problem with the jsob provider. 


---