Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.


EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.

otel.connector.host_info accepts span data from other otelcol components and generates usage metrics.


otelcol.connector.host_info "LABEL" {
  output {
    metrics = [...]


otelcol.connector.host_info supports the following arguments:

host_identifierslist(string)Ordered list of resource attributes used to identify unique hosts.[""]no
metrics_flush_intervaldurationHow often to flush generated metrics."60s"no


The following blocks are supported inside the definition of otelcol.connector.host_info:

outputoutputConfigures where to send received telemetry data.yes

output block

The output block configures a set of components to forward resulting telemetry data to.

The following arguments are supported:

metricslist(otelcol.Consumer)List of consumers to send metrics to.[]no

You must specify the output block, but all its arguments are optional. By default, telemetry data is dropped. Configure the metrics argument accordingly to send telemetry data to other components.

Exported fields

The following fields are exported and can be referenced by other components:

inputotelcol.ConsumerA value that other components can use to send telemetry data to.

input accepts otelcol.Consumer traces telemetry data. It does not accept metrics and logs.


The example below accepts traces, adds the resource attribute via the otelcol.processor.resourcedetection component, creates usage metrics from these traces, and writes the metrics to Mimir.

otelcol.receiver.otlp "otlp" {
  http {}
  grpc {}

  output {
    traces = [otelcol.processor.resourcedetection.otlp_resources.input]

otelcol.processor.resourcedetection "otlp_resources" {
  detectors = ["system"]
  system {
    hostname_sources = [ "os" ]
    resource_attributes { {
        enabled = true
  output {
    traces = [otelcol.connector.host_info.default.input]

otelcol.connector.host_info "default" {
  output {
    metrics = [otelcol.exporter.prometheus.otlp_metrics.input]

otelcol.exporter.prometheus "otlp_metrics" {
  forward_to = [prometheus.remote_write.default.receiver]

prometheus.remote_write "default" {
  endpoint {
    url = ""
    basic_auth {
      username = env("PROMETHEUS_USERNAME")
      password = env("GRAFANA_CLOUD_API_KEY")

Compatible components

otelcol.connector.host_info can accept arguments from the following components:

otelcol.connector.host_info has exports that can be consumed by the following components:


Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.