Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/platform/knowledge-graph/get-started/label-conventions.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/platform/knowledge-graph/get-started/label-conventions/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Label conventions for entity linking
The knowledge graph discovers entities and builds relationships by matching labels across the metrics that Grafana Cloud products send. When labels are inconsistent or missing, entities can’t be linked, and the topology, RCA workflows, and drill-downs that depend on those links don’t work.
Use this documentation to find the labels that matter for the products you use together. Each section covers a specific relationship type.
For the full list of required metrics and labels per product, refer to Troubleshoot data issues.
Host identity
The host_id label provides a stable machine identifier for hosts. It’s used for host-hours billing and for consistent host identification across products. The Linux Server and Windows Server integrations include host_id automatically. The value comes from OpenTelemetry resource detection, which reads the identifier from the operating system.
host_id requires Grafana Alloy.
Note
If you installed the Linux Server or Windows Server integration before
host_idwas added, update your Alloy configuration snippet to include it.
Note
Activating the knowledge graph using Host Monitoring is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
Host Monitoring also requires the instance label on node_uname_info (Linux/Unix) or windows_os_info (Windows) for entity discovery. Refer to Configure dataset for Host Monitoring for the full list of required metrics and labels.
Service identity (OpenTelemetry)
Application Observability identifies services using OpenTelemetry resource attributes. These attributes map to Prometheus labels as follows:
| OTel resource attribute | Prometheus label | Example value |
|---|---|---|
service.namespace / service.name | job | production/checkout-service |
service.instance.id | instance | Pod name, UUID, or hostname |
deployment.environment.name | deployment_environment_name | production |
The job label concatenates ${service.namespace}/${service.name} when service.namespace is defined, or uses just service.name when it isn’t.
The knowledge graph scopes Service entities by environment using asserts_env, which is derived from deployment.environment.name (or deployment.environment). A mismatch in environment labels between products is a common reason entities don’t link as expected.
For details on configuring these attributes, refer to Set up instrumentation.
Service to Kubernetes workload
The knowledge graph links OpenTelemetry services to their underlying Kubernetes workloads. The link uses Kubernetes resource attributes from target_info or traces_target_info (resource attributes), matched against workload ownership derived from kube_pod_owner (kube-state-metrics).
The link requires the following OTel resource attributes:
| OTel resource attribute | Purpose |
|---|---|
k8s.namespace.name | Matches the workload namespace |
k8s.pod.name | Matches the Pod to its owning workload |
k8s.cluster.name | Identifies the cluster |
The result is a link from the OTel service to the Kubernetes workload Service, not to individual Pods or Nodes.
Use the Kubernetes Attributes Processor to enrich your telemetry with these attributes. For setup guidance, refer to Kubernetes monitoring recommendations.
Service to service
The knowledge graph links services to each other using service graph metrics. These metrics represent the calling relationship between two services and require consistent labels on both sides.
For service-to-service links to appear:
- Both services must have service graph metrics (
traces_service_graph_request_totaland related metrics). - The
serverlabel on the caller’s service graph metrics must match the target service’sservice.name. - The
client_deployment_environment_nameandserver_deployment_environment_nameon service graph metrics must match thedeployment_environment_namethat each service reports intarget_info. A mismatch prevents the knowledge graph from resolving the link.
If you see an un-instrumented placeholder instead of a link to a known service, verify that the server value matches the target service’s name exactly and that both services report the same environment.
For services running on Kubernetes, also ensure the k8s.namespace.name, k8s.pod.name, and k8s.cluster.name resource attributes are present. These attributes enable the knowledge graph to link services to their Kubernetes workloads in addition to other services.
Service to Amazon RDS
The knowledge graph links Application Observability services to Amazon RDS instances by matching *.rds.amazonaws.com hostname patterns in span metric and service graph metric labels.
The following labels are checked for RDS hostname patterns:
| Metric type | Labels checked |
|---|---|
| Service graph metrics | client_server_address, server |
| Span metrics | server_address, net_peer_name |
No additional configuration is required if your application connects to RDS using the standard RDS endpoint hostname. The knowledge graph extracts the RDS instance identifier from the hostname and matches it against the aws_rds_info metric.
For the full list of metrics and labels, refer to Amazon RDS relationships.
Database to cloud provider
The knowledge graph can link Database Observability entities to their cloud provider counterparts (AWS RDS, Google Cloud SQL, Azure Flexible Server). It parses the database connection string to identify the cloud provider and resource, then matches it against cloud provider metrics.
Required labels
Database Observability requires the instance label in hostname:port format. For example, mydb.example.com:5432, not mydb or mydb.example.com.
For the full label requirements, refer to Database Observability labels reference.
The dsn label
Database Observability setup guides include an optional relabeling step that copies the exporter’s original instance value to a dsn label before the instance label is overwritten. The dsn label is used for integration with the knowledge graph.
If you want the knowledge graph to link your database entities to cloud provider entities, include the dsn relabeling step from your database setup guide (for example, Set up PostgreSQL on RDS).
Cloud provider labels
For cloud-hosted databases, configure the cloud_provider block in your Database Observability Alloy configuration to identify the cloud resource. This block adds the following labels to your metrics:
| Label | Purpose |
|---|---|
provider_name | Cloud provider identifier (for example, aws, azure) |
provider_account | Cloud account or subscription identifier |
provider_region | Cloud region where the database runs |
Cloud provider linking
The knowledge graph uses the connection information in the dsn label to match database entities with cloud provider entities:
| Cloud provider | Hostname pattern | Matched against |
|---|---|---|
| AWS RDS | *.rds.amazonaws.com | aws_rds_info metric |
| Google Cloud SQL | Cloud SQL connection name | Cloud SQL metrics |
| Azure Flexible Server | *.database.azure.com | Azure Flexible Server metrics |
Host to AWS EC2
If a host runs on AWS EC2, you can link it to the corresponding EC2 entity in the knowledge graph. This requires an instance_id label on your host metrics.
Use the Alloy discovery.ec2 and prometheus.enrich components to add the instance_id label. For an example configuration, refer to Enrich and link hosts using metadata.
Cloud provider entities
Cloud provider entities discovered through Cloud Provider Observability require provider-specific scoping labels on their metrics. The knowledge graph infers its internal scoping (asserts_env and asserts_site) from these labels.
| Cloud provider | Required scoping labels |
|---|---|
| AWS | account_id, region |
| Azure | subscriptionName, region |
| GCP | project_id, location (or region or zone depending on resource) |
Each cloud provider also uses a different label for entity identification:
| Cloud provider | Identification label | Value |
|---|---|---|
| AWS | name | Amazon Resource Name |
| Azure | resourceName | Azure resource name |
| GCP | instance_name or database_id | Instance name or database identifier |
For the full list of required metrics and labels per cloud provider, refer to the AWS, Azure, and GCP troubleshooting sections.
Known limitations
The following entity linking capabilities are not yet available:
- Host to service linking: The knowledge graph can’t yet link a non-Kubernetes host to the services running on it.
- Bare metal logs correlation: Logs correlation for non-Kubernetes hosts isn’t supported. For Kubernetes and OpenTelemetry services, you can configure logs correlation to map entity properties to Loki labels.
Next steps
- Review Troubleshoot data issues for the full list of required metrics and labels
- Configure telemetry correlation for logs, traces, and profiles drill-downs
- If entities aren’t linking as expected, refer to Connect services across products for troubleshooting steps
Was this page helpful?
Related resources from Grafana Labs


