redis/extra/redisotel
Vladimir Mihailenco 2ec03d9b37 fix: late binding for dial hook 2022-10-12 15:00:06 +03:00
..
README.md chore: v9 2022-06-04 17:42:06 +03:00
config.go feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
go.mod feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
go.sum feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
metrics.go feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03: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 documentation for more details.