Skip to content

PMM-7 Add tests for custom queries and enhance query execution metrics #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BupycHuk
Copy link
Member

No description provided.

@BupycHuk BupycHuk requested a review from a team as a code owner June 16, 2025 09:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances custom query support by refactoring DSN parsing and adding metrics for query execution success/failure. It also updates the Go toolchain version and improves server/database identification.

  • Update go.mod file with new Go version and toolchain.
  • Refactor DSN parsing by introducing a dedicated parseDSN function and adding parseDatabaseName.
  • Add a new metric (pg_exporter_user_queries_executed_total) to track custom query execution results.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/go.mod Updated Go version and toolchain details
cmd/postgres_exporter/util.go Refactored DSN parsing and fingerprint extraction
cmd/postgres_exporter/server.go Added database name field and corresponding getter
cmd/postgres_exporter/percona_exporter.go Introduced metric for tracking query execution outcomes
cmd/postgres_exporter/namespace.go Triggered query execution metric creation for custom queries
cmd/postgres_exporter/main.go Defined a new constant for database label identification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants