dd-trace-go.v1: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws Index | Examples | Files

package aws

import "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws"

Package aws provides functions to trace aws/aws-sdk-go (https://github.com/aws/aws-sdk-go).

To start tracing requests, wrap the AWS session.Session by invoking awstrace.WrapSession.


cfg := aws.NewConfig().WithRegion("us-west-2")
sess := session.Must(session.NewSession(cfg))
sess = awstrace.WrapSession(sess)

s3api := s3.New(sess)
    Bucket: aws.String("some-bucket-name"),



Package Files

aws.go option.go

func WrapSession Uses

func WrapSession(s *session.Session, opts ...Option) *session.Session

WrapSession wraps a session.Session, causing requests and responses to be traced.

type Option Uses

type Option func(*config)

Option represents an option that can be passed to Dial.

func WithAnalytics Uses

func WithAnalytics(on bool) Option

WithAnalytics enables Trace Analytics for all started spans.

func WithAnalyticsRate Uses

func WithAnalyticsRate(rate float64) Option

WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.

func WithServiceName Uses

func WithServiceName(name string) Option

WithServiceName sets the given service name for the dialled connection. When the service name is not explicitly set it will be inferred based on the request to AWS.

Package aws imports 8 packages (graph). Updated 2020-08-06. Refresh now. Tools for package owners.