redis/extra/redisotel
Vladimir Mihailenco 9b6ee9c3cc chore: gofmt all code 2021-09-08 16:52:29 +03:00
..
README.md extra/redisotel: add readme and example 2021-04-18 14:49:28 +03:00
go.mod Release v8.11.3 (release.sh) 2021-08-12 14:35:44 +03:00
go.sum Release v8.11.3 (release.sh) 2021-08-12 14:35:44 +03:00
redisotel.go chore: gofmt all code 2021-09-08 16:52:29 +03:00

README.md

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.