Closed jbrooksuk closed 1 year ago
The API needs implementing for creating metric points. This isn't super straightforward as we need to first check whether the last created point was within the metrics threshold and increment a counter instead. You can see the past implementation at https://github.com/cachethq/cachet/blob/f40da226670a92934170c1adcfff3d1c40a6096b/app/Bus/Handlers/Commands/Metric/CreateMetricPointCommandHandler.php#L80-L98
threshold
However, metrics should be considered an "expensive" operation and so, I think we should make use of the cache instead of querying the database each time.
The API needs implementing for creating metric points. This isn't super straightforward as we need to first check whether the last created point was within the metrics
threshold
and increment a counter instead. You can see the past implementation at https://github.com/cachethq/cachet/blob/f40da226670a92934170c1adcfff3d1c40a6096b/app/Bus/Handlers/Commands/Metric/CreateMetricPointCommandHandler.php#L80-L98However, metrics should be considered an "expensive" operation and so, I think we should make use of the cache instead of querying the database each time.