Skip to content

ticketmaster/opentracing-go-redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opentracing go-redis

OpenTracing instrumentation for go-redis.

Install

go get -u github.com/smacker/opentracing-go-redis

Usage

Clone redis client c := otredis.WrapRedisClient(ctx, c) with a span.

Example:

var client *redis.Client

func Handler(ctx context.Context) {
    span, ctx := opentracing.StartSpanFromContext(ctx, "handler")
    defer span.Finish()

    // clone redis with proper context
    client := otredis.WrapRedisClient(ctx, client)

    // make requests to redis
    client.Get("foo")
}

Call to the Handler function would create redis span as a child of handler span.

License

MIT

About

OpenTracing instrumentation for go-redis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%