Hi Team,
I have a use case where I want to have different units allocated to a metric while trying to create a Monitor in DataDog.
I have created two panels based on the same metric,
• The first one measures the event count for a consumer
• The second one measures the latency in consuming the events.
By default, the monitor takes the unit described in the metadata section from the Metrics Summary page for the metric.
Now, when I assign a time unit to the metric, I can create a monitor for latency with correct thresholds but then the count of events monitor would be created with an incorrect threshold (the metric needs to be unitless in this case).
Note: At the moment*,* We do not have control to publish a new individual metric for each use case.
Is there a workaround for this?
From what I understand, composite monitors need individual monitors to work.
And currently I am either able to create a monitor for latency or for the event count with the correct unit set for the alert thresholds , but not both.
I have created two panels based on the same metric,
what is a panel here?
- The first one measures the event count for a consumer
- The second one measures the latency in consuming the events.```
Ah, so this is a single metric.... Might be able to do this with the `as_count()` function then.
Example here using the APM `trace.http.request` metric which is a distribution in seconds, using `as_count()` will count the actual amount of metrics, so you can leave the unit on it.
So, I already created two widgets, based on the as_count() function you suggested above.
The problem is not while creating a widget but while creating a corresponding monitor. The graph for the monitor in this case still has timeas the unit for the y-axis.
If you look closely at the graph for the metric egsp_action_processingtime_delay , when I tried to create a monitor with as_countfunction, the y-axis has a time unit.
In this case, I’m not sure how should I specify the thresholds for the monitor.