telemetry

package
v2.340.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package telemetry exposes selected otelsql helpers through the go-service SQL import tree.

This package keeps repository SQL instrumentation on a go-service import path while preserving otelsql behavior for driver wrapping and DB stats metrics registration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDBStatsMetrics added in v2.340.0

func RegisterDBStatsMetrics(db *sql.DB, opts ...Option) (metric.Registration, error)

RegisterDBStatsMetrics registers OpenTelemetry DB stats metrics for db.

This is a thin wrapper around otelsql.RegisterDBStatsMetrics.

func WrapDriver added in v2.340.0

func WrapDriver(driver driver.Driver, opts ...Option) driver.Driver

WrapDriver wraps a `database/sql/driver.Driver` with OpenTelemetry instrumentation.

This is a thin wrapper around otelsql.WrapDriver.

Types

type Option added in v2.340.0

type Option = otelsql.Option

Option is an alias of otelsql.Option.

It configures SQL OpenTelemetry instrumentation behavior such as emitted attributes and metric/tracing options.

func WithAttributes added in v2.340.0

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

WithAttributes adds static attributes to SQL telemetry spans and metrics.

This is a thin wrapper around otelsql.WithAttributes.

Jump to

Keyboard shortcuts

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