In Dynatrace Classic, every database a service calls becomes a database service entity—a standalone object with its own metrics, management zone membership, and alert configuration. In Latest Dynatrace, every database call is a span stored in Grail and attached directly to the calling service as a dependency.
This guide covers application-side database monitoring, which is the data that Dynatrace captures through traces and database queries. It does not cover database monitoring through extensions.
During the upgrade, both classic and latest monitoring approaches run side by side. Classic database service entities continue to work while you migrate, and distributed trace data remains accessible as before, so you can upgrade at your own pace.
In Latest Dynatrace, every database call is a span. Database spans are queryable with DQL, stored in Grail, and carry the full context of the service that made the call. This model brings the following benefits:
Classic database service entities are not represented in Grail and are not queryable with DQL. They generate database-level alerts that are often noisy and non-actionable.
The following table maps each classic database capability to its replacement in Latest Dynatrace.
| In Dynatrace Classic | In Latest Dynatrace |
|---|---|
| Database service entity page, with response time, failure rate, and throughput | In Services, the Database queries views provide richer query-level detail and are queryable with DQL. You get a per-service view and a cross-service view that shows all queries executed across your services. |
Classic built-in database metrics (builtin:database.*) | Span attributes and database metrics, which are stored in Grail and queryable with DQL over the full retention period |
| Database service entity in Smartscape and topology views | Database nodes in Service Map with edges to calling services and infrastructure context |
| Management zone-based database visibility (tag database entity, add to a management zone) | Segments (no database tagging required; spans inherit the calling service's context automatically) |
| Backtrace view on the database entity | Backtrace view per query (accessible via Services) |
| Response time and failure rate on the database entity | Metric-based DQL query and span-based DQL query (average duration and error rate grouped by db.namespace and db.system) |
| Service flow and distributed traces through a database service | Database nodes and edges in Service Map and Distributed Tracing |
The new model eliminates several classic maintenance tasks.
db.namespace and db.system dimensions, which allow filtering and grouping by those directly.You'll confirm that database spans are collected, set up a segment for team-scoped visibility, explore database queries and backtraces in
Services, and rebuild any performance dashboard tiles using DQL.
This guide assumes the following background knowledge.
These concepts are new in Latest Dynatrace and appear throughout this guide.
Scoping mechanism in Latest Dynatrace. Because database spans inherit the calling service's context, a segment over your services automatically scopes the Database queries view and Service Map in
Services to show only the databases your services call. No database-level tagging is needed.
Database metrics are emitted automatically alongside span ingestion. They are stored in Grail and queryable with DQL over the full retention period. For details, see Database metrics.
Databases visible from span data, but for which no entity exists (because no database extension or cloud monitoring is activated). Unmonitored database nodes appear in the Service Map with a guided hint to activate deep monitoring.
Database spans are visible environment-wide by default, which allows for end-to-end trace analysis across service boundaries. Restricting access to spans by team boundary through permissions fragments transaction flows and prevents callers from seeing the full trace. Segments scope what you see without restricting access, so use them to scope views in
Services.
Complete these steps to upgrade from classic database services to database query monitoring.
First, you need to confirm that Dynatrace collects database spans for your services.
Go to
Services > Explorer.
Select a monitored service, and go to the Database queries tab in the service details panel.
Verify that the Database queries tab shows the required data.
If any queries appear, database client spans are collected, and you can proceed to the next step.
In the Service Map, you can check which databases are monitored through a database extension or cloud integration and which appear based on span data only.
To identify monitored and unmonitored databases in the Service Map
Go to
Services > Explorer (Early Access).
Select Map in the view toggle located in the upper-right corner above the service list.
In the filter panel in the upper-left corner of the service map, select Nodes > Databases.
Select a database node to highlight it on the service map.
Databases or
Clouds. For details, see Drill down to traces, logs, and more.In Latest Dynatrace, you don't tag database entities or add them to management zones. Because database spans automatically inherit the primary fields of the calling service, a segment over your team's services gives that team a fully scoped view of their database query data with no database-level configuration.
Create or update a segment that covers the calling services your team owns. The Database queries view and the Service Map in
Services automatically reflect the segment, showing only the databases that the segment's services call.
For detailed instructions, see Segments and Use segments to scope Services and Smartscape apps.
The Database queries view in
Services shows every database a service calls, with query count, average duration, and error rate per statement. You can filter by db.system and db.namespace for a cross-service view of a specific database.
To identify which services and entry points drive a specific query, go to the Backtrace view, which breaks down throughput, error count, and average duration by caller and provides direct navigation to the related traces. For details, see Discover upstream callers with Backtrace.
Span data and database metrics give you full DQL access to database performance across any time range, service, or database technology. Pin the required DQL queries to a dashboard or a notebook to replace classic database entity chart tiles.
For example DQL queries, see Query database data with DQL.
To query relationships directly, for example, to find all services calling an AWS RDS instance without relying on span or metric data, use Smartscape traversal queries. See Explore the service entity in Smartscape on Grail for examples.
Confirm that your classic database service entities are no longer needed before switching them off.
Services > Explorer, select the required service, and confirm the Database queries tab shows the expected databases with non-zero call counts. Do that for each service that called a classic database service.When you're confident in coverage, remove the references to classic database service entities from management zones and alerting rules.
Check the answers to common questions about the differences between classic and latest database query monitoring.
Classic database service metrics are derived from distributed traces and only count calls that appear in a complete, instrumented trace. In environments where not every service is instrumented, the reported count is lower than the actual number of database calls.
In Latest Dynatrace, span-based queries and the database metrics are collected per service independently of trace completeness. The result is a more accurate picture of actual database load, including calls from services that were not fully instrumented in Dynatrace Classic.
To go deeper on database monitoring in Latest Dynatrace, see the following pages:
Services.
Services