It would be nice if the charm supported this as well. The charm may also need to be adapted to allow integration with the
receive-remote-write | prometheus_remote_write integration, as the metrics generated are written to Prometheus using the remote-write endpoint.
Enhancement Proposal
Providing alert rules via the logging | loki_push_api integration is possible, but it does not seem to be possible to pass recording rules (although cos-lib seems to support it https://github.com/canonical/cos-lib/blob/main/src/cosl/rules.py#L396).
It would be nice if the charm supported this as well. The charm may also need to be adapted to allow integration with the receive-remote-write | prometheus_remote_write integration, as the metrics generated are written to Prometheus using the remote-write endpoint.