1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-25 08:21:55 +03:00
Files
go-redis/extra/redisotel
2021-08-12 14:35:44 +03:00
..
2021-08-12 14:35:44 +03:00
2021-08-12 14:35:44 +03:00
2021-04-16 15:00:10 +03:00

OpenTelemetry instrumentation for go-redis

Installation

go get github.com/go-redis/redis/extra/redisotel/v8

Usage

Tracing is enabled by adding a hook:

import (
    "github.com/go-redis/redis/v8"
    "github.com/go-redis/redis/extra/redisotel"
)

rdb := rdb.NewClient(&rdb.Options{...})

rdb.AddHook(redisotel.NewTracingHook())

See example and documentation for more details.