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

Operation on metric obtained in EF2 extensions

AntonioSousa
DynaMight Guru
DynaMight Guru

In EF2, typically I have seen that when there is a need to convert the value of a metric, it is done with a "key: func" definition.

Is it safe to do the calculation with the metric. And if so, how is it done, as I have found no example?

 

Antonio Sousa
6 REPLIES 6

Mike_L
Dynatrace Guru
Dynatrace Guru

Hi Antonio,

Which data source are you using? They do not all have the same functionality.

In general, using a metric selector in the dashboard/alert/UA section is always possible.

Mike

AntonioSousa
DynaMight Guru
DynaMight Guru

@Mike_L,

It's WMI. Value is a multiple of 100, so I would like to ingest the real value, dividing it by 100 first...

Antonio Sousa

For that data source you can't do anything in the data source (with SQL you can handle it by adjusting your query). You'd have to handle it in the metric metadata section, such as this:

metrics:
  - key: my_old_metric
    metadata:
      displayName: My Old Metric
      description: My Old metric, it is large
      unit: Count
  - key: func:my_new_metric
    metadata:
      displayName: My New Metric
      description: My Old metric, but divided by 100
      unit: Count
    query:
      metricSelector: (my_old_metric)/(100)

 

Mike

Thanks @Mike_L ,

It was the "key: func" I was referring to...

I believe it consumes 0.002 DDUs, because it's two data points, right? Because I'll be ingesting a lot of them, I'll maybe have to go with the value and then do calculations in the UI...

Antonio Sousa

Key function metrics only provide an easy way to do metric selectors. They don’t actually store any data, so they don’t consume DDUs.

Mike

That's very good to know. Didn't know. Thanks @Mike_L !

Antonio Sousa

Featured Posts