Documentation
¶
Overview ¶
Package otelmetric provides metric functionalities using OpenTelemetry metric.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustProvider ¶
MustProvider creates and returns a metrics provider. It panics if any error occurs.
func NewProvider ¶
NewProvider creates and returns a metrics provider.
func PrometheusHandler ¶
PrometheusHandler returns the http handler for prometheus metrics exporting.
func StartPrometheusMetricsServer ¶
StartPrometheusMetricsServer starts running a http server for metrics exporting.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies a configuration option value to a MeterProvider.
func WithBuiltInMetrics ¶
func WithBuiltInMetrics() Option
WithBuiltInMetrics enables builtin metrics.
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.
Source Files
¶
- otelmetric.go
- otelmetric_callback.go
- otelmetric_meter_counter_performer.go
- otelmetric_meter_histogram_performer.go
- otelmetric_meter_observable_counter_performer.go
- otelmetric_meter_observable_gauge_performer.go
- otelmetric_meter_observable_updown_counter_performer.go
- otelmetric_meter_performer.go
- otelmetric_meter_updown_counter_performer.go
- otelmetric_metric_callback.go
- otelmetric_option.go
- otelmetric_prometheus.go
- otelmetric_provider.go
- otelmetric_util.go