# Redis metrics to Elastic APM using Open telemetry Collector

**URL:** <https://discuss.elastic.co/t/redis-metrics-to-elastic-apm-using-open-telemetry-collector/379293>\
**Category:** APM\
**Tags:** docker, open-telemetry\
**Created:** [June 18, 2025, 1:20pm UTC](https://discuss.elastic.co/t/redis-metrics-to-elastic-apm-using-open-telemetry-collector/379293 "2025-06-18T13:20:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpanand24](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rpanand24/32/132713_2.png) [@rpanand24](https://discuss.elastic.co/u/rpanand24)\
**Post date:** [June 18, 2025, 1:20pm UTC](https://discuss.elastic.co/t/redis-metrics-to-elastic-apm-using-open-telemetry-collector/379293/1 "2025-06-18T13:20:06Z")

</div>

**Kibana + Elastic Search + APM Server version** : 9.0.1

**Original install method** : Docker

**OTEL Contrib Version** : 0.128.0

**Redis Version** : 8.0.2-alpine3.21

**Steps to reproduce** :

1. deploy the services in docker
2. run open telemetry collector with below configuration
3. check the services in APM Service section

```auto

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
  redis:
    endpoint: "redis:6379"
    collection_interval: 2s
    tls:
      insecure_skip_verify: true
      insecure: true

...

service:
    metrics:
      receivers:
        - otlp
        - redis
      processors: [batch]
      exporters:
        - otlp/elastic
        - debug

```

**Errors in APM UI** :

All the metrics will be received with service name as unknown.

Is there any default dashboards to view redis metrics? possibly inside APM UI ?

What is the best practice

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9b065fdde557f3770db116a95bf44454e16b1c3.png)

**Provide logs and/or server output (if relevant)**:

```auto
{
  "_index": ".ds-metrics-apm.app.unknown-default-2025.06.18-000001",
  "_id": "FAwKg5cBonjAsBhFCit6",
  "_version": 1,
  "_source": {
    "observer": {
      "hostname": "6d2236ca0a04",
      "type": "apm-server",
      "version": "9.0.1"
    },
    "agent": {
      "name": "otlp",
      "version": "unknown"
    },
    "@timestamp": "2025-06-18T12:36:01.775Z",
    "data_stream": {
      "namespace": "default",
      "type": "metrics",
      "dataset": "apm.app.unknown"
    },
    "service": {
      "framework": {
        "name": "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver",
        "version": "0.128.0"
      },
      "name": "unknown",
      "language": {
        "name": "unknown"
      }
    },
    "redis.db.avg_ttl": 0,
    "metricset": {
      "name": "app"
    },
    "event": {},
    "redis.db.expires": 0,
    "redis.db.keys": 2,
    "labels": {
      "redis_version": "8.0.2",
      "db": "0"
    }
  },
  "fields": {
    "service.framework.version": [
      "0.128.0"
    ],
    "redis.db.expires": [
      0
    ],
    "redis.db.keys": [
      2
    ],
    "service.language.name": [
      "unknown"
    ],
    "agent.name.text": [
      "otlp"
    ],
    "processor.event": [
      "metric"
    ],
    "agent.name": [
      "otlp"
    ],
    "metricset.name.text": [
      "app"
    ],
    "labels.db": [
      "0"
    ],
    "service.name": [
      "unknown"
    ],
    "service.framework.name": [
      "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver"
    ],
    "data_stream.namespace": [
      "default"
    ],
    "service.language.name.text": [
      "unknown"
    ],
    "labels.redis_version": [
      "8.0.2"
    ],
    "data_stream.type": [
      "metrics"
    ],
    "observer.hostname": [
      "6d2236ca0a04"
    ],
    "service.framework.name.text": [
      "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver"
    ],
    "metricset.name": [
      "app"
    ],
    "@timestamp": [
      "2025-06-18T12:36:01.775Z"
    ],
    "observer.type": [
      "apm-server"
    ],
    "observer.version": [
      "9.0.1"
    ],
    "redis.db.avg_ttl": [
      0
    ],
    "service.name.text": [
      "unknown"
    ],
    "data_stream.dataset": [
      "apm.app.unknown"
    ],
    "agent.version": [
      "unknown"
    ]
  }
}

```

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [June 19, 2025, 3:56pm UTC](https://discuss.elastic.co/t/redis-metrics-to-elastic-apm-using-open-telemetry-collector/379293/2 "2025-06-19T15:56:39Z")

</div>

Hi @rpanand24,

Welcome back! Can you confirm if the `service.name` attribute is on the spans coming from the receiver (perhaps by outputting to the console)? I see you are using the OTel Collector Redis Receiver, which is still in beta. So I want to rule that out.

Let us know!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 19, 2025, 6:15pm UTC](https://discuss.elastic.co/t/redis-metrics-to-elastic-apm-using-open-telemetry-collector/379293/3 "2025-06-19T18:15:31Z")

</div>

Hi @rpanand24

I am perhaps a bit confused...

So those look operational Redis metrics so they will show up in the `metrics-*` data view...

A) What is the Exact Flow?  
and  
B) can you share the Exporter Configuration

Redis \> OTEL Collector \> Elastic search Exporter \> Elasticsearch

It is unclear to me (and yes it is confusing right now) Why you are sending Redis Metrics with the APM Server path... yes it works but not really needed...

> **[opentelemetry-collector-contrib/exporter/elasticsearchexporter at main ·...](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter)**
>
> Contrib repository for the OpenTelemetry Collector - open-telemetry/opentelemetry-collector-contrib

With Respect to the `unknown` services... that is usually set by the SDK / Agent for App Traces etc... so I am no surprised it is not set.  
You can set the field in the collector or add it in an ingest pipeline
