Documentation ¶
Overview ¶
Example ¶
package main import ( "context" "log" awstrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws" awscfg "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/sqs" ) 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 WithErrorCheck ¶ added in v1.53.0
WithErrorCheck specifies a function fn which determines whether the passed error should be marked as an error. The fn is called whenever an aws operation finishes with an error.
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.