github.com/gocql/gocql

Package gocql implements a fast and robust Cassandra client for the Go programming language.

Wrap gocql.NewCluster function call or gocql.ClusterConfig struct literal (pointer)

Join Point
All of
Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	gocql "github.com/gocql/gocql"
	gocqltrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/gocql/gocql"
)
func(cluster *gocql.ClusterConfig) *gocql.ClusterConfig {
	obs := gocqltrace.NewObserver(cluster)
	cluster.QueryObserver = obs
	cluster.BatchObserver = obs
	cluster.ConnectObserver = obs
	return cluster
}({{ . }})

Wrap gocql.ClusterConfig struct literal (value)

Join Point
All of
Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	gocql "github.com/gocql/gocql"
	gocqltrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/gocql/gocql"
)
func(cluster gocql.ClusterConfig) gocql.ClusterConfig {
	obs := gocqltrace.NewObserver(&cluster)
	cluster.QueryObserver = obs
	cluster.BatchObserver = obs
	cluster.ConnectObserver = obs
	return cluster
}({{ . }})