# Bringing Application-Level Observability to CockroachDB: Query Tagging

DevFeed: [Bringing Application-Level Observability to CockroachDB: Query Tagging](<https://devfeed.tech/articles/bringing-application-level-observability-to-cockroachdb-query-tagging-23804.md>)

Original publisher: [Read original article](<https://cockroachlabs.com/blog/query-tagging-database-observability>)

Author: Kevin Ngo

Published: 2026-02-06T00:00:00Z

Content type: article

Language: en

Sources: [Cockroach Labs](<https://devfeed.tech/sources/cockroach-labs.md>)

Topics: [CockroachDB](<https://devfeed.tech/topics/cockroachdb.md>), [observability](<https://devfeed.tech/topics/observability.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [OpenTelemetry](<https://devfeed.tech/topics/opentelemetry.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [cockroachdb](<https://devfeed.tech/tags/cockroachdb.md>), [database](<https://devfeed.tech/tags/database.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [latency](<https://devfeed.tech/tags/latency.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [observability](<https://devfeed.tech/tags/observability.md>), [opentelemetry](<https://devfeed.tech/tags/opentelemetry.md>), [sql](<https://devfeed.tech/tags/sql.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

## AI overview

This article explains how CockroachDB query tagging uses SQL comments and the open-source SQLcommenter specification to add application context to database queries. The tags help correlate database performance issues and errors with specific microservices, routes, features, and other application metadata, improving observability and troubleshooting in distributed systems.

## Source excerpt

Building mission-critical applications on CockroachDB demands robust observability. In complex, microservices-oriented architectures, it can be especially hard to correlate activity and pinpoint problems between different application services and the database layer.