cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JMX Counter Metric : TransactionCommitedTotalCount not monotonically increasing

abhijeet-allu
Visitor

Hello Community,

I am trying to calculate Transactions/second from the custom JMX Metric: TransactionCommitedTotalCount . My plan is to apply the delta and rate transformations to the metric to derive Transactions/second. But when I graph the metric with just the max aggregation , I see it is not monotonically increasing as expected. To derive the rate accurately, I would need the metric to be always increasing.  What am I missing here ? 

abhijeetallu_0-1703786333241.png

 

4 REPLIES 4

JamesKitson
Dynatrace Guru
Dynatrace Guru

This is from a custom EF 2.0 JMX extension or a 1.0 extension? I can't tell because the key suggests it may have been a converted one.

In either case, what you're seeing is likely the 'delta' already, so if you plan on using the delta transformation anyway you could just use this and skip that extra step. Typically, for counters we want the delta reported rather than rely on transformations being applied to a number that constantly increases.

 

For EF1 you want to make sure the 'calculateDelta' attribute in the plugin.json is set to false: https://docs.dynatrace.com/docs/shortlink/extensions-jmx-customize#source. Notice there is also an attribute if you want the rate calculated for you as well.

For EF2 you need to have the metric 'type' set to gauge. You'll also want to append ".gauge" to the end of the metric key as we don't like gauge metrics that end with any form of "count." Count type metrics are counters where the difference between intervals is reported instead of the absolute value.

Thanks for you quick response, I believe this is EF1, here is my configuration JSON :

{
      "timeseries": {
        "key": "metric_TransactionTotalCount_1703000672773",
        "unit": "Count",
        "displayname": "JTATransactionTotalCount",
        "dimensions": [
          "rx_pid",
          "Name"
        ]
      },
      "source": {
        "domain": "com.bea",
        "keyProperties": {
          "JTARuntime": "*",
          "ServerRuntime": "*",
          "Type": "TransactionNameRuntime",
          "Name": "*"
        },
        "attribute": "TransactionTotalCount",
        "allowAdditionalKeys": true,
        "calculateDelta": false,
        "calculateRate": true,
        "aggregation": "SUM",
        "splitting": {
          "name": "Name",
          "type": "keyProperty",
          "keyProperty": "Name"
        }
      }
    }
---
Since I have calculateRate enabled, do I still have to apply the rate transformation, or is the data I see already the rate ? Would a expression like this 
ext:custom.jmx.JTA_TEST.metric_TransactionCommittedTotalCount_1703780092696:filter(and(or(eq(rx_pid,"28885")))):avg:setUnit(PerSecond)
Achieve what I am trying to do ?

This is clearer. It looks like since you have calculateDelta set to false and calculateRate set to true what values you are having reported is the absolute value but already calculated as a rate metric so it's the absolute value at that point transformed into a rate which would be an unusual value.

 

Additionally, I see you have a Name dimension and you'd want to split by that in your tests as different 'Names' with different values would also skew what you're trying to test. For what you're trying to do I would have calculateDelta and calculateRate to true. If you think you may want to use different rate 'bases' and have control over that I would set calculateRate to false first otherwise you'd be doing the rate of a rate.

I totally get it now, thanks for the insight !

Featured Posts