contrib/gocql/gocql

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/gocql/gocql" // integration
	//...
)

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

ClusterConfig

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
}({{ . }})

*ClusterConfig

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
}({{ . }})