---
title: "Configure Beyla host name resolution | Grafana Beyla documentation"
description: "Configure Beyla service host and peer name resolution"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Configure Beyla service host and peer name resolution

Since Beyla instruments at the protocol level, it doesn’t have access to programming language/framework information about host and peer names. Instead, Beyla has access to the IP addresses used for the communication between the services which are monitored. Therefore Beyla sources this information from metadata services, such as the Kubernetes API, or from information found in protocol headers, for example HTTP’s Host header value.

## Name resolution configuration

YAML section: `name_resolver`

Expand table

| YAML<br /><br />environment variable                      | Description                                                                                | Type            | Default          |
|-----------------------------------------------------------|--------------------------------------------------------------------------------------------|-----------------|------------------|
| `sources`<br /><br />`BEYLA_NAME_RESOLVER_SOURCES`        | A comma separated list of metadata sources to use for name resolution. More details below. | list of strings | \[“k8s”, “rdns”] |
| `cache_len`<br /><br />`BEYLA_NAME_RESOLVER_CACHE_LEN`    | Size of the service name cache. Used to speed up reverse IP lookups.                       | int             | (1024)           |
| `cache_expiry`<br /><br />`BEYLA_NAME_RESOLVER_CACHE_TTL` | Time-to-live value for the service name cache.                                             | string          | “5m”             |

The possible values for the name resolver sources are:

- `k8s`. Use Kubernetes API metadata for reverse IP address lookup.
- `dns`. Use the host DNS for reverse IP address lookup. This option can cause flood of DNS requests in certain situations and should be used only on services that are not exposed to the Internet.
- `rdns`. Beyla tracks DNS requests for instrumentation purposes. This option uses that information to build internal cache of DNS resolved names.
- `ecs`. Resolve ECS task IP addresses through the ECS inventory. Requires detected ECS metadata and AWS credentials with `ecs:ListTasks` and `ecs:DescribeTasks` permissions.
- `route53`. Resolve IP addresses from configured Route53 hosted zones. Requires detected EC2 metadata and `route53:ListResourceRecordSets` permission for those zones.
- `gce`. Resolve Compute Engine VM addresses to managed instance group names. Requires detected GCE metadata and read access to the Compute Engine inventory.
- `azure`. Resolve Azure VM addresses to scale-set names. Requires detected Azure VM metadata outside Kubernetes and read access to VM, scale-set, and network-interface inventories. This source is not activated when Beyla detects Kubernetes.

Setting `sources` replaces the default `["k8s", "rdns"]` list. Include those entries explicitly if you want to keep them alongside cloud sources. ECS names take precedence over Route53 names for the same IP.

## Cloud metadata configuration

YAML section: `cloud_metadata`

Expand table

| YAML option<br /><br />Environment variable                                          | Description                                                                                        | Type            | Default  |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|-----------------|----------|
| `cluster_name`<br /><br />`BEYLA_CLUSTER_NAME`                                       | Override the detected cloud cluster name, used to select the ECS cluster.                          | string          | Detected |
| `region`<br /><br />`BEYLA_CLOUD_REGION`                                             | Override the detected cloud region.                                                                | string          | Detected |
| `refresh_interval`<br /><br />`BEYLA_CLOUD_META_REFRESH_INTERVAL`                    | Cloud inventory refresh interval. Must be greater than `0`.                                        | Duration        | `30s`    |
| `route53.hosted_zone_ids`<br /><br />`BEYLA_NAME_RESOLVER_ROUTE53_HOSTED_ZONE_IDS`   | Hosted zones to query. Required when `route53` is enabled. Environment values are comma-separated. | list of strings | `[]`     |
| `route53.refresh_interval`<br /><br />`BEYLA_NAME_RESOLVER_ROUTE53_REFRESH_INTERVAL` | Independent Route53 polling interval. Must be greater than `0`.                                    | Duration        | `5m`     |

For an ECS deployment:

YAML ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
name_resolver:
  sources: ["k8s", "rdns", "ecs"]
cloud_metadata:
  cluster_name: production
  region: eu-central-1
  refresh_interval: 30s
```

The cluster and region overrides supply missing inventory scope or replace detected values. Cloud sources also require the corresponding cloud environment to be detected; setting an override alone does not activate a source.

For Route53:

YAML ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
name_resolver:
  sources: ["k8s", "rdns", "route53"]
cloud_metadata:
  region: eu-central-1
  route53:
    hosted_zone_ids: ["Z0123456789EXAMPLE"]
    refresh_interval: 5m
```

Beyla reads A and AAAA records containing IP addresses from the specified zones. Names use lowercase and are exported without the trailing dot. Alias records, CNAME records, and wildcard names are skipped. Choose zones that describe the services you want Beyla to resolve.

Route53 polling uses its own refresh interval, with jitter to spread requests and backoff when AWS throttles the client.

## Google Cloud and Azure discovery scopes

Beyla exposes provider scope settings under `name_resolver`. Empty values use the scope detected from cloud metadata.

Expand table

| YAML option<br /><br />Environment variable                                    | Description                                            | Type   | Default            |
|--------------------------------------------------------------------------------|--------------------------------------------------------|--------|--------------------|
| `gce.project_id`<br /><br />`BEYLA_NAME_RESOLVER_GCE_PROJECT_ID`               | Compute Engine project to query.                       | string | Detected           |
| `gce.zone`<br /><br />`BEYLA_NAME_RESOLVER_GCE_ZONE`                           | Zone containing the managed instance groups.           | string | Detected           |
| `gce.endpoint`<br /><br />`BEYLA_NAME_RESOLVER_GCE_ENDPOINT`                   | Compute API base URL override for a proxy or emulator. | URL    | Google Compute API |
| `azure.subscription_id`<br /><br />`BEYLA_NAME_RESOLVER_AZURE_SUBSCRIPTION_ID` | Azure subscription to query.                           | string | Detected           |
| `azure.resource_group`<br /><br />`BEYLA_NAME_RESOLVER_AZURE_RESOURCE_GROUP`   | Resource group containing the scale sets.              | string | Detected           |

For example, resolve GCE managed instance groups:

YAML ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
name_resolver:
  sources: ["k8s", "rdns", "gce"]
  gce:
    project_id: production-project
    zone: europe-west3-a
```

The Google client uses application default credentials. The [Compute Viewer role](https://docs.cloud.google.com/iam/docs/roles-permissions/compute#compute.viewer) provides read access to the inventory. Scope discovery covers managed instance groups in the configured zone.

For Azure scale sets:

YAML ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
name_resolver:
  sources: ["k8s", "rdns", "azure"]
  azure:
    subscription_id: "00000000-0000-0000-0000-000000000000"
    resource_group: production
```

The Azure client uses the default Azure credential chain. The [Reader role](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/general#reader) at the relevant scope provides the required read access. Both Uniform and Flexible scale sets are supported. The cloud inventory refresh interval is controlled by `cloud_metadata.refresh_interval`.
