Skip to content

A fork of go-redis/extra/redisotel/v9 that follows newer version of Semantic Conventions.

License

Notifications You must be signed in to change notification settings

wzy9607/goredisotel

Repository files navigation

goredisotel

ci codecov

A fork of go-redis/extra/redisotel/v9 that follows Semantic Conventions v1.27.

Installation

go get github.com/wzy9607/goredisotel

Usage

Tracing is enabled by adding a hook:

import (
"github.com/redis/go-redis/v9"
"github.com/wzy9607/goredisotel"
)

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

// Enable tracing and metrics instrumentation.
if err := goredisotel.InstrumentClientWithHooks(rdb); err != nil {
panic(err)
}

// Enable tracing instrumentation only.
if err := goredisotel.InstrumentClientWithHooks(rdb, goredisotel.DisableMetrics()); err != nil {
panic(err)
}

// Enable pool statistics metrics instrumentation.
if err := goredisotel.InstrumentPoolStatsMetrics(rdb); err != nil {
panic(err)
}

See example for details.

About

A fork of go-redis/extra/redisotel/v9 that follows newer version of Semantic Conventions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages