gomemcache

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: 8 Imported by: 0

README

Gomemcache instrumentation example

PkgGoDev

Quickstart

Install otelmemcache:

go get go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache

Then use NewClientWithTracing to wrap a client:

mc := otelmemcache.NewClientWithTracing(
    memcache.New("localhost:11211"),
)

And use mc.WithContext to propagate the active span.

Example

To run this example you need a memcached server. You can start one with Docker:

make up

Then run the 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