redis/extra/redisotel
Vladimir Mihailenco 44af3c09a7 chore: add more metrics to redisotel 2022-11-17 16:24:16 +02:00
..
README.md chore: improve instrumentation example 2022-10-12 17:18:55 +03:00
config.go chore: add more metrics to redisotel 2022-11-17 16:24:16 +02:00
go.mod chore: release v9.0.0-rc.1 (release.sh) 2022-10-14 15:19:56 +03:00
go.sum chore: release v9.0.0-rc.1 (release.sh) 2022-10-14 15:19:56 +03:00
metrics.go chore: add more metrics to redisotel 2022-11-17 16:24:16 +02:00
redisotel_test.go feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
tracing.go fix: late binding for dial hook 2022-10-12 15:00:06 +03:00

README.md

OpenTelemetry instrumentation for go-redis

Installation

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

Usage

Tracing is enabled by adding a hook:

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

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

rdb.AddHook(redisotel.NewTracingHook())

See example and Monitoring Go Redis Performance and Errors for details.