{
  "schema_version": 2,
  "id": "develop/clients/observability",
  "title": "Observability",
  "url": "https://redis.io/docs/latest/develop/clients/observability/",
  "summary": "Monitor your client's activity for optimization and debugging.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-09T13:53:13+01:00",
  "page_type": "content",
  "content_hash": "d9e2e61e69226a9a7ce101d01cda2d1a03e0b6e2eed8de05609ebe0f77189909",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Some Redis client libraries implement the [OpenTelemetry](https://opentelemetry.io/) (OTel)\nobservability framework to let you gather performance metrics\nfor your application. This can help you optimize performance and pinpoint problems\nquickly. Currently, the following clients support OTel:\n\n- [redis-py](https://redis.io/docs/latest/develop/clients/redis-py/observability)\n- [go-redis](https://redis.io/docs/latest/develop/clients/go/observability)\n- [node-redis](https://redis.io/docs/latest/develop/clients/nodejs/observability)"
    },
    {
      "id": "metrics-overview",
      "title": "Metrics overview",
      "role": "content",
      "text": "Metrics are quantitative measurements of the behavior of your application. They\nprovide information such as how often a certain operation occurs, how long it\ntakes to complete, or how many errors have occurred. By analyzing these metrics,\nyou can identify performance bottlenecks, errors, and other issues that need to\nbe addressed.\n\nRedis clients follow the OTel push model. This uses the\n[OLTP](https://opentelemetry.io/docs/specs/otlp/) \nprotocol to send metrics to a [collector](https://opentelemetry.io/docs/collector/)\n(both [OLTP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) and\n[OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) are supported).\nA storage layer (such as [Prometheus](https://prometheus.io/)) can then pull the\nmetrics from a collector endpoint, making the data available for monitoring tools\n(such as [Grafana](https://grafana.com/)) to query and visualize. The basic\nflow of data is shown below.\n\n[code example]\n\nThe [Redis client observability demonstration](https://github.com/redis-developer/redis-client-observability)\non GitHub contains examples showing how to set up a local Grafana instance, then\nconnect it to a Redis client and visualize the metric data as it arrives."
    },
    {
      "id": "redis-metric-groups",
      "title": "Redis metric groups",
      "role": "content",
      "text": "In Redis clients, the metrics collected by OTel are organized into the following\nmetric groups:\n\n- [`resiliency`](#group-resiliency): data related to the availability and health of the Redis connection.\n- [`connection-basic`](#group-connection-basic): minimal metrics about Redis connections made by the client.\n- [`connection-advanced`](#group-connection-advanced): more detailed metrics about Redis connections.\n- [`command`](#group-command): metrics about Redis commands executed by the client.\n- [`client-side-caching`](#group-client-side-caching): metrics about\n  [client-side caching](https://redis.io/docs/latest/develop/clients/client-side-caching) operations.\n- [`streaming`](#group-streaming): metrics about\n  [stream](https://redis.io/docs/latest/develop/data-types/streams) operations.\n- [`pubsub`](#group-pubsub): metrics about\n  [pub/sub](https://redis.io/docs/latest/develop/pubsub) operations.\n\nWhen you configure the client to activate OTel, you can select which metric groups\nyou are interested in. By default, only the `resiliency` and `connection-basic` groups are enabled.\nThe metrics in each group are described in the\n[Metrics reference](#metrics-reference) below."
    },
    {
      "id": "metrics-reference",
      "title": "Metrics reference",
      "role": "content",
      "text": "The metric groups and the metrics they contain are described below. The\nname in parentheses after each group name is the group's identifier, which you\nuse when you configure the client to select which metrics to collect.\n\nThe metrics contain *attributes* that provide extra information (such as\nthe client library and server details) that you can use to filter and\naggregate the data. The attributes are described in the Attributes\nsection following the metric groups. The badge shown after the attribute\nname can be any of the following:\n\n- `required`: This attribute will always be present in the metrics.\n- `optional`: This attribute may be present in the metrics.\n- `conditionally required`: This attribute will be present in the metrics only if a certain condition is met,\n  such as when a specific error occurs. The condition is described in the attribute description.\n- `recommended`: Specific client libraries may not support this attribute in some situations."
    }
  ],
  "examples": [
    {
      "id": "metrics-overview-ex0",
      "language": "mermaid {width=\"100%\"}",
      "code": "sequenceDiagram\n    participant App as Redis Client\n    participant Collector as OTel Collector\n    participant Storage as Storage Layer<br/>(Prometheus)\n    participant Monitor as Monitoring Tool<br/>(Grafana)\n\n    App->>Collector: Push metrics\n    Note over App,Collector: OTel push model\n\n    Storage->>Collector: Pull metrics from endpoint\n    Collector-->>Storage: Return metrics\n\n    Monitor->>Storage: Query metrics data\n    Storage-->>Monitor: Return metrics\n    Note over Monitor: Visualize",
      "section_id": "metrics-overview"
    }
  ]
}
