prometheus-community / prometheus-community/stackdriver_exporter

CloudSQL metrics' average value does not match : Per query execution times

Open
#227 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
295
Forks
117
Avg merge
9d 14h
Merged PRs (30d)
7

Description

Hello. I using Stackdriver Exporter version v0.13.0

  • Prometheus scrape_interval: 1m
  • Stack driver metrics interval: 1m
  • stackdriver metrics: cloudsql.googleapis.com/database/postgresql/insights/perquery/execution_time
  • Grafana unit for value: microsecond

In grafana, I used this query to get average time per query:

avg_over_time(stackdriver_cloudsql_instance_database_cloudsql_googleapis_com_database_postgresql_insights_perquery_execution_time{resource_id="$resource_id", database="$database", user="$user", client_addr="$client_addr"}[1h])

image

But the result on GCP Query Insight is different from the value from the above query. Anyone have solution for this?

image

Thanks all !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the PromQL avg_over_time query for the CloudSQL execution_time metric with the corresponding Google Cloud Query Insights value, including their units and aggregation windows. Done means explaining the discrepancy or identifying the exporter or metric behavior that needs correction; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, google-cloud, postgresql, prometheus
Domain
cloud, databases, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.