Grafana Cloud

Introduction to Database Observability

Note

Database Observability is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.

Grafana Cloud Database Observability provides insights into the performance and health of your MySQL and PostgreSQL databases across self-managed and managed services, for example, AWS RDS. You understand how your databases behave, how they’re used, and how to optimize them for your applications.

What you’ll learn

In this article, you:

  • Learn what database observability is and why it matters.
  • Understand how Alloy, exporters, Prometheus, and Loki work together.
  • Identify who benefits from Database Observability.
  • Review collected signals and key terms.
  • Start setup with links to MySQL and PostgreSQL guides.

Who uses Database Observability

Database Observability is for anyone responsible for the performance and reliability of applications that rely on MySQL or PostgreSQL databases:

  • Software engineers: Analyze query performance and schema impact, and assess code change effects.
  • Site reliability engineers (SREs): Investigate latency spikes and error rates, and diagnose bottlenecks with wait events.
  • Database administrators (DBAs): Optimize resource-intensive queries and tune performance using query samples, wait events, and explain plans.

What is Database Observability

Database observability means collecting and correlating database telemetry to understand behavior, performance, and reliability. You collect metrics and logs from your databases and use dashboards to analyze and troubleshoot issues.

Learn how it works

You run Grafana Alloy with database exporters and Database Observability components. Exporters expose metrics that Prometheus scrapes, and components forward logs to Loki. Grafana Cloud stores and visualizes both signals.

Review signals collected

Understand the signals you collect and analyze:

  • Metrics: Query counts, latency, errors, and engine health from exporters.
  • Logs: Structured entries from Database Observability components, including optional query samples and schema information. SQL text is redacted by default.

Understand key terms

Use these terms as you explore features and setup:

  • Query samples: Samples of queries you execute with execution metrics; the system redacts parameters by default. You can disable redaction to see full query texts.
  • Wait events (MySQL): Performance data that shows what operations cause queries to wait during execution when you enable MySQL Performance Schema events_waits_* consumers.
  • Collectors: Component options that turn on data sources, for example, query_samples (MySQL and PostgreSQL) and query_details (PostgreSQL).
  • Relabeling: Rules that align labels across logs and metrics; keep loki.relabel and discovery.relabel consistent.
  • Scrape job: Prometheus job label is integrations/db-o11y.

Get started

Database Observability collects performance data from your databases and sends it to Grafana Cloud for analysis and visualization. Follow these articles to complete setup:

For MySQL setup, refer to Set up MySQL.

For PostgreSQL setup, refer to Set up PostgreSQL.

Next steps

For troubleshooting during setup, refer to Troubleshoot.