google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

Add support for google.monitoring.prometheus.v1 API to query with PromQL

Open rafal-dudek opened this issue 9 months ago • 0 comments

Determine this is the right repository

  • [x] I determined this is the correct repository in which to report this feature request.

Summary of the feature request

Quering metrics using MQL is depracated and PromQL is recommended: https://github.com/googleapis/google-cloud-python/blob/4da3cf330b4e2b3af2963a89aa73a7f8df4154ec/packages/google-cloud-monitoring/google/cloud/monitoring_v3/services/query_service/client.py#L697

But google-cloud-python libraries do not support API for quering with PromQL: https://cloud.google.com/monitoring/api/ref_v3/rpc/google.monitoring.prometheus.v1#queryrangerequest

Desired code experience

   response = client.query_range(queryRangeRequest)

or

   response = client.query_time_series(promQL=promQLQuery)

Expected results

Response should contain data points for promQL query in convenient format.

API client name and version

No response

Use case

Querying Cloud Monitoring metrics with recommended and not deprecated query language.

Additional context

No response

rafal-dudek avatar Apr 02 '25 12:04 rafal-dudek