otelsync

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter provides a sync adapter over async metric instruments.

func NewAdapter

func NewAdapter(m metric.Meter) *Adapter

func (*Adapter) GaugeInt64

func (a *Adapter) GaugeInt64(name string, options ...metric.Int64ObservableGaugeOption) (metric.Int64Observer, error)

GaugeInt64 returns a new sync int64 gauge. Register must be called after creating all gauges.

func (*Adapter) Register

func (a *Adapter) Register() (metric.Registration, error)

Register registers callback.

type GaugeInt64

type GaugeInt64 struct {
	metric.Int64ObservableGauge
	embedded.Int64Observer
	// contains filtered or unexported fields
}

GaugeInt64 is a wrapper around metric.Int64ObservableGauge that stores last value for each attribute set, providing a sync adapter over async gauge.

func (*GaugeInt64) Observe

func (g *GaugeInt64) Observe(v int64, options ...metric.ObserveOption)

Observe records a last value for attribute set.

Jump to

Keyboard shortcuts

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