contrib/aws/aws-sdk-go-v2/aws

contrib/aws/aws-sdk-go-v2/aws

Those integration are enabled by having the following import in the project’s orchestrion.tool.go file:

import (
	_ "github.com/DataDog/orchestrion"

	_ "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws" // integration
	//...
)

The official AWS SDK for Go

Config

Join Point
Struct literal aws.Config
  • Value
Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	aws "github.com/aws/aws-sdk-go-v2/aws"
	awstrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws"
)
func(cfg aws.Config) (aws.Config) {
	awstrace.AppendMiddleware(&cfg)
	return cfg
}({{ . }})

*Config

Join Point
One of
Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	aws "github.com/aws/aws-sdk-go-v2/aws"
	awstrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws"
)
func(cfg *aws.Config) (*aws.Config) {
	awstrace.AppendMiddleware(cfg)
	return cfg
}({{ . }})