Documentation ¶
Overview ¶
Example ¶
package main import ( "context" "log" awscfg "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/sqs" awstrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws" ) func main() { awsCfg, err := awscfg.LoadDefaultConfig(context.Background()) if err != nil { log.Fatalf(err.Error()) } awstrace.AppendMiddleware(&awsCfg) sqsClient := sqs.NewFromConfig(awsCfg) sqsClient.ListQueues(context.Background(), &sqs.ListQueuesInput{}) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendMiddleware ¶
AppendMiddleware takes the aws.Config and adds the Datadog tracing middleware into the APIOptions middleware stack. See https://aws.github.io/aws-sdk-go-v2/docs/middleware for more information.
Types ¶
type Option ¶
type Option func(*config)
Option represents an option that can be passed to Dial.
func WithAnalytics ¶
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶
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.