Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
Open is a wrapper over sql.Open that instruments the sql.DB to record executed queries using OpenTelemetry API.
func OpenDB ¶
OpenDB is a wrapper over sql.OpenDB that instruments the sql.DB to record executed queries using OpenTelemetry API.
func ReportDBStatsMetrics ¶ added in v1.0.4
ReportDBStatsMetrics reports DBStats metrics using OpenTelemetry Metrics API.
Types ¶
type Option ¶
type Option func(c *config)
func WithAttributes ¶
WithAttributes configures attributes that are used to create a span.
func WithDBSystem ¶
WithDBSystem configures a db.system attribute. You should prefer using WithAttributes and semconv, for example, `otelsql.WithAttributes(semconv.DBSystemSqlite)`.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider configures a tracer provider that is used to create a tracer.
Click to show internal directories.
Click to hide internal directories.