database

package
v2.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDriverAndOpen

func RegisterDriverAndOpen(driverName string, driver driver.Driver, dsn string, options ...Option) (*sql.DB, error)

RegisterDriverAndOpen registers the selected driver with the datadog-lib, and opens a connection to the database using the dsn.

Types

type Option

type Option func(cfg *config)

Option allows for overriding our default-config.

func WithChildSpansOnly

func WithChildSpansOnly(childSpansOnly bool) Option

WithChildSpansOnly causes spans to be created only when there is an existing parent span in the Context.

func WithCustomTag

func WithCustomTag(key string, value interface{}) Option

WithCustomTag will attach the value to the span tagged by the key.

func WithIgnoreQueryTypes

func WithIgnoreQueryTypes(ignoredQueryTypes ...string) Option

WithIgnoreQueryTypes specifies the query types for which spans should not be created. Will replace any existing ignored query-types, so it must be an exhaustive list. See available QueryTypes here: https://pkg.go.dev/gopkg.in/DataDog/dd-trace-go.v1/contrib/database/sql#pkg-constants

func WithServiceName

func WithServiceName(serviceName string) Option

WithServiceName overrides the service-name set in environment-variable "DD_SERVICE".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL