Needed help converting MQL to PromQL for Google Cloud SQL Latency Monitoring?

0

I am currently working on setting up alerting for Google Cloud SQL using Google Cloud Monitoring, and I have a query written in Monitoring Query Language (MQL) that I would like to convert to Prometheus Query Language (PromQL). Here is the MQL query I am using:

    fetch cloudsql_instance_database
    | metric 'cloudsql.googleapis.com/database/postgresql/insights/aggregate/latencies'
    | filter resource.project_id == 'xxxxxx'
        && (resource.database == 'xxxxxx'
        && resource.location == 'xxxxxx'
        && resource.resource_id == 'xxxxxxx:xxxxxxxxxxxxt')
    | align delta(10m)
    | every 10m
    | group_by [resource.database], [value_latencies_mean: mean(value.latencies)]
    | condition val() > 100 'ms'

This query checks the latency of a specific Cloud SQL database and sets a threshold to trigger an alert if the mean latency exceeds 100 milliseconds over a 10-minute period.

Could someone help me with the equivalent PromQL query for this MQL? I want to ensure that I can monitor the same metrics and set up alerts effectively in a Prometheus environment.