provider

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstrumentationName = "go.microcore.dev/framework/telemetry/metric"
)

Variables

This section is empty.

Functions

func New

func New(opts ...Option) *metric.MeterProvider

Types

type Option

type Option func(*[]metric.Option)

func WithCardinalityLimit

func WithCardinalityLimit(limit int) Option

WithCardinalityLimit sets the cardinality limit for the MeterProvider.

The cardinality limit is the hard limit on the number of metric datapoints that can be collected for a single instrument in a single collect cycle.

Setting this to a zero or negative value means no limit is applied.

func WithExemplarFilter

func WithExemplarFilter(filter exemplar.Filter) Option

WithExemplarFilter configures the exemplar filter.

The exemplar filter determines which measurements are offered to the exemplar reservoir, but the exemplar reservoir makes the final decision of whether to store an exemplar.

By default, the exemplar.SampledFilter is used. Exemplars can be entirely disabled by providing the exemplar.AlwaysOffFilter.

func WithReader

func WithReader(r metric.Reader) Option

WithReader associates Reader r with a MeterProvider.

By default, if this option is not used, the MeterProvider will perform no operations; no data will be exported without a Reader.

func WithResource

func WithResource(res *resource.Resource) Option

WithResource associates a Resource with a MeterProvider. This Resource represents the entity producing telemetry and is associated with all Meters the MeterProvider will create.

By default, if this Option is not used, the default Resource from the go.opentelemetry.io/otel/sdk/resource package will be used.

func WithView

func WithView(views ...metric.View) Option

WithView associates views with a MeterProvider.

Views are appended to existing ones in a MeterProvider if this option is used multiple times.

By default, if this option is not used, the MeterProvider will use the default view.

Jump to

Keyboard shortcuts

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