go-redis-cluster

command module
v0.0.0-...-316a413 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

README

go-redis cluster instrumentation example

PkgGoDev

Quickstart

Install redisotel instrumentation:

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

Then add OpenTelemetry hook:

rdb := redis.NewClient(&redis.Options{
    Addr: "redis-server:6379",
})
rdb.AddHook(redisotel.NewTracingHook())

Example

To run this example you need a Redis cluster. You can start one with Docker:

make up

To run this example:

UPTRACE_DSN="https://<token>@api.uptrace.dev/<project_id>" go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL