otelpostgres

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package otelpostgres adapts go-postgres observations to standard OpenTelemetry metrics without recording SQL, arguments, DSNs, or raw errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MeterProvider metric.MeterProvider
}

Config selects the standard OpenTelemetry meter provider.

type Observer

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

Observer records bounded lifecycle and transaction metrics.

func New

func New(config Config) (*Observer, error)

New constructs an OpenTelemetry observer with standard database metric names and a no-op provider when none is supplied.

func (*Observer) Observe

func (o *Observer) Observe(ctx context.Context, observation postgres.Observation)

Observe implements postgres.Observer.

Jump to

Keyboard shortcuts

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