 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseSQL ¶ added in v3.96.2
func DatabaseSQL(config Config) trace.DatabaseSQL
DatabaseSQL makes trace.DatabaseSQL with measuring `database/sql` events
func WithTraces ¶
func WithTraces(config Config) ydb.Option
Types ¶
type Config ¶
type Config interface {
	Registry
	// Details returns bitmask for customize details of NewScope
	// If zero - use full set of driver NewScope
	Details() trace.Details
	// WithSystem returns new Config with subsystem scope
	// Separator for split scopes of NewScope provided Config implementation
	WithSystem(subsystem string) Config
}
    Config is interface for metrics registry config
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
Example ¶
var registryConfig metrics.Config // registryConfig is an implementation registry.Config
db, err := ydb.Open(
	context.TODO(),
	os.Getenv("YDB_CONNECTION_STRING"),
	metrics.WithTraces(registryConfig),
)
if err != nil {
	panic(err)
}
defer func() {
	_ = db.Close(context.TODO())
}()
// work with db
type CounterVec ¶
CounterVec returns Counter from CounterVec by labels
type Histogram ¶
type Histogram interface {
	Record(value float64)
}
    Histogram tracks distribution of value.
type HistogramVec ¶
HistogramVec stores multiple dynamically created timers
type Registry ¶
type Registry interface {
	// CounterVec returns CounterVec by name, subsystem and labels
	// If counter by args already created - return counter from cache
	// If counter by args nothing - create and return newest counter
	CounterVec(name string, labelNames ...string) CounterVec
	// GaugeVec returns GaugeVec by name, subsystem and labels
	// If gauge by args already created - return gauge from cache
	// If gauge by args nothing - create and return newest gauge
	GaugeVec(name string, labelNames ...string) GaugeVec
	// TimerVec returns TimerVec by name, subsystem and labels
	// If timer by args already created - return timer from cache
	// If timer by args nothing - create and return newest timer
	TimerVec(name string, labelNames ...string) TimerVec
	// HistogramVec returns HistogramVec by name, subsystem and labels
	// If histogram by args already created - return histogram from cache
	// If histogram by args nothing - create and return newest histogram
	HistogramVec(name string, buckets []float64, labelNames ...string) HistogramVec
}
    Registry is interface for metrics registry
Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
 Click to show internal directories. 
   Click to hide internal directories.