How transform logs to metrics in Flow mode of Grafana Agent?

Hi,
how to transform collected logs from k8s pods to metrics which is pushed to Prometheus? It’s possible to do it in Flow mode of Grafana Agent? Do I have to use Promtail with metrics

I didn’t find any examples how to do it but i think that has to be common issue.