Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolEnv ¶
BoolEnv returns the parsed boolean value of an environment variable, or def otherwise.
func WrapSession ¶
WrapSession wraps a session.Session, causing requests and responses to be traced.
Example ¶
package main import ( "log" "github.com/aws/aws-sdk-go/aws/session" awsdd "github.com/dharnitski/opentracing-aws-dd" ) func main() { session, err := session.NewSession() if err != nil { log.Fatal(err) } // session is instrumented with global tracer session = awsdd.WrapSession(session) }
Output:
Types ¶
type Option ¶
type Option func(*config)
Option represents an option that can be passed to Dial.
Example ¶
package main import ( "log" "github.com/aws/aws-sdk-go/aws/session" awsdd "github.com/dharnitski/opentracing-aws-dd" ) func main() { session, err := session.NewSession() if err != nil { log.Fatal(err) } session = awsdd.WrapSession(session, awsdd.WithServiceName("myservice")) }
Output:
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.