Smartscape on Grail is a Grail-based storage and analytics platform for topological data in Dynatrace. It records monitored entities (nodes) and their relationships (edges), enabling you to query, traverse, and analyze your environment with unprecedented flexibility and depth. At the heart of Smartscape on Grail is the Service Entity.
A Service Entity in Smartscape on Grail represents a logical service, such as a web service, API, or backend component. Services are connected to each other through call relationships, such as calls or called_by. Services are linked to the infrastructure they run on (such as a process, container, or a host) or belong to (such as a Kubernetes cluster or a namespace). This entity-centric view enables you to analyze dependencies, performance, and health in a holistic way.
This guide is designed for developers, site reliability engineers, DevOps, and anyone interested in advanced service-centric observability and troubleshooting.
This page introduces the Service Entity in Smartscape on Grail, explains its relationships, and provides practical and advanced use case examples for analyzing services and their metrics in context.
As a user of Dynatrace Smartscape on Grail, you'll learn how to:
We recommend running the DQL queries presented on this page in
Notebooks or
Dashboards.
To follow the use cases and examples in this documentation, you need:
Basic familiarity with DQL is helpful but not required, as examples are provided throughout the documentation.
Understanding how a service interacts with other entities is crucial for troubleshooting and optimization. Smartscape enables you to:
smartscapeNodes "SERVICE"| filter name == "astroshop-payment"
smartscapeNodes "SERVICE"| filter id == toSmartscapeId("SERVICE-55A331C06F22D134")| traverse {"calls"}, {"SERVICE"}, direction:"forward"
smartscapeEdges "*"| filter source_type == "SERVICE"| fields type, source_id, source_type, target_id, target_type, dt.system.edge_kind| summarize count = count(), by:{type}| sort count desc
The vertical topology shows how a service is deployed and what infrastructure supports it. This helps you answer the following questions:
smartscapeEdges "runs_on", "belongs_to"| filter source_type == "SERVICE"
Goal: Retrieve response time for a service from a service node.
smartscapeNodes "SERVICE"| filter id == toSmartscapeId("SERVICE-55A331C06F22D134")| join [timeseries responseTime_p95_timeseries = percentile(dt.service.request.response_time, 95), by:{dt.smartscape.service}, bins: 60], on: { left[id] == right[dt.smartscape.service]}
Goal: Retrieve deployment details, such as version, namespace, and cluster, for a service to correlate performance or incidents with recent changes.
smartscapeEdges "belongs_to"| filter source_type == "SERVICE"| fields type, source_id, source_type, target_id, target_type| fieldsAdd service_name = getNodeName(source_id)| filter contains(service_name, "astroshop-currency")| filter target_type == "K8S_DEPLOYMENT"| fieldsAdd result = lookup([smartscapeNodes "K8S_DEPLOYMENT"| fieldsAdd version = tags[`app.kubernetes.io/version`]| fields id, version, k8s.cluster.name, name],sourceField: target_id, lookupField:id )| fieldsAdd version = result[version]| fieldsAdd cluster = result[k8s.cluster.name]| fieldsAdd deployment_name = result[name]| fieldsRemove result, target_type, target_id, source_type, source_id, type
Goal: Analyze how issues in downstream services affect the performance of your service. Downstream services are the ones called by your service.
Show the 95th percentile of response times for the service:
timeseries responseTime_p95_timeseries = percentile(dt.service.request.response_time, 95), by:{dt.smartscape.service}, bins: 60, filter: dt.smartscape.service == "SERVICE-55A331C06F22D134"
Join with downstream service response times:
smartscapeEdges "calls"| filter source_type == "SERVICE"| filter source_id == toSmartscapeId("SERVICE-55A331C06F22D134")| fieldsAdd service_name = getNodeName(source_id)| join [timeseries responseTime_p95_timeseries = percentile(dt.service.request.response_time, 95), by:{dt.smartscape.service}, bins: 60], on: { left[target_id] == right[dt.smartscape.service]}
Use the traverse command for multi-hop analysis:
timeseries responseTime_p95_timeseries = percentile(dt.service.request.response_time, 95),filter:dt.smartscape.service in [smartscapeNodes "SERVICE"| filter name == "astroshop-currency"| traverse {"calls"}, {"SERVICE"}, direction:"forward"| fields id], by:{dt.smartscape.service}, nonempty: true| fieldsAdd metricName = "Response time p95"
Goal: Analyze how issues in upstream services affect the performance of your service. Upstream services are those that call your service.
smartscapeEdges "calls"| filter source_type == "SERVICE"| filter target_id == toSmartscapeId("SERVICE-55A331C06F22D134")| fieldsAdd service_name = getNodeName(source_id)| join [timeseries responseTime_p95_timeseries = percentile(dt.service.request.response_time, 95), by:{dt.smartscape.service}, bins: 60], on: { left[source_id] == right[dt.smartscape.service]}
Goal: Analyze request volumes between services to identify hotspots or unexpected spikes.
smartscapeEdges "calls"| filter source_type == "SERVICE"| filter source_id == toSmartscapeId("SERVICE-55A331C06F22D134")| fieldsAdd source_name = getNodeName(source_id)| fieldsAdd target_name = getNodeName(target_id)| join [timeseries request_counts_sum = sum(dt.service.request.count), by:{dt.smartscape.service}| summarize request_counts_avg = avg(arrayAvg(request_counts_sum)), by:dt.smartscape.service], on: { left[target_id] == right[dt.smartscape.service]}| sort right.request_counts_avg desc
Smartscape on Grail empowers you to move beyond static infrastructure views and embrace a dynamic, entity-centric approach to observability. By leveraging the Service Entity and the power of DQL, you can seamlessly explore, analyze, and correlate service behavior with infrastructure, dependencies, and telemetry data. This guide has shown how you can use Smartscape on Grail to answer critical questions about service health, performance, and relationships—–enabling faster troubleshooting, deeper insights, and more proactive operations.
As your environment evolves, continue to experiment with DQL queries and Smartscape features to unlock even more value from your data.
Your experience and insights are important to us! If you have suggestions, questions, or feedback about Services in Smartscape on Grail, share them in the Dynatrace Community.