bunrelic

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(h *QueryHook)

func WithDBName

func WithDBName(name string) Option

WithDBName sets the database name to report in recorded segments

func WithHost

func WithHost(host string) Option

WithHost sets the host to report in recorded segments

func WithPortPathOrId

func WithPortPathOrId(portPathOrId string) Option

WithPortPathOrId sets the Port/Path/ID to report in recorded segments

func WithProduct

func WithProduct(product newrelic.DatastoreProduct) Option

WithProduct sets the product to report in recorded segments

type QueryHook

type QueryHook struct {
	// contains filtered or unexported fields
}

func NewQueryHook

func NewQueryHook(options ...Option) *QueryHook

NewQueryHook creates a new bun.QueryHook which reports database usage information to new relic.

func (*QueryHook) AfterQuery

func (q *QueryHook) AfterQuery(ctx context.Context, qe *bun.QueryEvent)

func (*QueryHook) BeforeQuery

func (q *QueryHook) BeforeQuery(ctx context.Context, qe *bun.QueryEvent) context.Context

Jump to

Keyboard shortcuts

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