redis/extra/redisotel
Nelz 3ecadf5f87
chore: instrumentation name and version (#2012)
2022-02-02 09:26:14 +02:00
..
README.md extra/redisotel: add readme and example 2021-04-18 14:49:28 +03:00
go.mod feat(redisotel): ability to override TracerProvider (#1998) 2022-01-18 08:44:05 +02:00
go.sum feat(redisotel): ability to override TracerProvider (#1998) 2022-01-18 08:44:05 +02:00
redisotel.go chore: instrumentation name and version (#2012) 2022-02-02 09:26:14 +02:00
redisotel_test.go feat(redisotel): ability to override TracerProvider (#1998) 2022-01-18 08:44:05 +02: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.