redisotel

package module
v8.0.0-...-754a3eb Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: BSD-2-Clause Imports: 7 Imported by: 1

README

OpenTelemetry instrumentation for go-redis

Installation

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

Usage

Tracing is enabled by adding a hook:

import (
    "github.com/devinsburke/redis/v8"
    "github.com/devinsburke/redis/extra/redisotel"
)

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

rdb.AddHook(redisotel.NewTracingHook())

See example and documentation for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TracingHook

type TracingHook struct{}

func NewTracingHook

func NewTracingHook() *TracingHook

func (TracingHook) AfterProcess

func (TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error

func (TracingHook) AfterProcessPipeline

func (TracingHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error

func (TracingHook) BeforeProcess

func (TracingHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)

func (TracingHook) BeforeProcessPipeline

func (TracingHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)

Jump to

Keyboard shortcuts

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