Documentation
¶
Index ¶
Constants ¶
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 ¶
func WithCardinalityLimit ¶
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 ¶
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 ¶
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 ¶
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.