tracing

package
v1.0.316 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TracePaused = "trace-paused"

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(opts ...Option) gorm.Plugin

Types

type Option

type Option func(p *otelPlugin)

func WithAttributes

func WithAttributes(attrs ...attribute.KeyValue) Option

WithAttributes configures attributes that are used to create a span.

func WithDBName

func WithDBName(name string) Option

WithDBName configures a db.name attribute.

func WithQueryFormatter

func WithQueryFormatter(queryFormatter func(query string) string) Option

WithQueryFormatter configures a query formatter

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider configures a tracer provider that is used to create a tracer.

func WithoutMetrics

func WithoutMetrics() Option

WithoutMetrics prevents DBStats metrics from being reported.

func WithoutQueryVariables

func WithoutQueryVariables() Option

WithoutQueryVariables configures the db.statement attribute to exclude query variables

Jump to

Keyboard shortcuts

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