Documentation ¶
Overview ¶
Package aws provides functions to trace aws/aws-sdk-go (https://github.com/aws/aws-sdk-go).
Example ¶
To start tracing requests, wrap the AWS session.Session by invoking awstrace.WrapSession.
package main import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" awstrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws" ) func main() { cfg := aws.NewConfig().WithRegion("us-west-2") sess := session.Must(session.NewSession(cfg)) sess = awstrace.WrapSession(sess) s3api := s3.New(sess) s3api.CreateBucket(&s3.CreateBucketInput{ Bucket: aws.String("some-bucket-name"), }) }
Output:
Index ¶
Examples ¶
Constants ¶
View Source
const ( // SendHandlerName is the name of the Datadog NamedHandler for the Send phase of an awsv1 request SendHandlerName = "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws/handlers.Send" // CompleteHandlerName is the name of the Datadog NamedHandler for the Complete phase of an awsv1 request CompleteHandlerName = "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws/handlers.Complete" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*config)
Option represents an option that can be passed to Dial.
func WithAnalytics ¶ added in v1.11.0
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶ added in v1.11.0
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.
func WithServiceName ¶
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.
Click to show internal directories.
Click to hide internal directories.