OpenTracing support for AWS SDK in Go
Clone or download
malafeev rename go-aws to go-aws-sdk
Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
Latest commit 2b482f8 Jan 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial implementation Jan 3, 2019
LICENSE Initial commit Jan 3, 2019
README.md rename go-aws to go-aws-sdk Jan 8, 2019
handler.go initial implementation Jan 3, 2019
handler_test.go initial implementation Jan 3, 2019
options.go initial implementation Jan 3, 2019
package.go initial implementation Jan 3, 2019

README.md

Apache-2.0 license

OpenTracing support for AWS SDK in Go

The otaws package makes it easy to add OpenTracing support for AWS SDK in Go.

Installation

go get github.com/opentracing-contrib/go-aws-sdk

Documentation

See the basic usage examples below and the package documentation on godoc.org.

Usage

// You must have some sort of OpenTracing Tracer instance on hand
var tracer opentracing.Tracer = ...

// Optionally set Tracer as global 
opentracing.SetGlobalTracer(tracer)

// Create AWS Session
sess := session.NewSession(...)

// Create AWS service client e.g. DynamoDB client
dbCient := dynamodb.New(sess)

// Add OpenTracing handlers using global tracer
AddOTHandlers(dbClient.Client)

// Or specify tracer explicitly
AddOTHandlers(dbClient.Client, WithTracer(tracer))

// Call AWS client
result, err := dbClient.ListTables(&dynamodb.ListTablesInput{})

License

Apache 2.0 License.