telemetry

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMeterProvider

func NewMeterProvider(service string, metricExporter metricSdk.Reader) *metricSdk.MeterProvider

func NewMetricExporterPeriodicOtlpGrpc

func NewMetricExporterPeriodicOtlpGrpc(interval, timeout time.Duration, ctx context.Context, options ...otlpmetricgrpc.Option) (metricSdk.Reader, error)

func NewMetricExporterPeriodicStdout

func NewMetricExporterPeriodicStdout(interval, timeout time.Duration, options ...stdoutmetric.Option) (metricSdk.Reader, error)

func NewMetricExporterPrometheus

func NewMetricExporterPrometheus() (metricSdk.Reader, error)

func NewTraceExporterOtlpGrpc

func NewTraceExporterOtlpGrpc(ctx context.Context, options ...otlptracegrpc.Option) (traceSdk.SpanExporter, error)

func NewTraceExporterStdout

func NewTraceExporterStdout(options ...stdouttrace.Option) (traceSdk.SpanExporter, error)

func NewTraceProvider

func NewTraceProvider(service string, traceExporter traceSdk.SpanExporter) *traceSdk.TracerProvider

Types

type Telemetry

type Telemetry interface {
	TraceProvider() *traceSdk.TracerProvider
	MeterProvider() *metricSdk.MeterProvider

	Tracer() trace.Tracer
	Meter() metric.Meter

	NewMetricInt64Counter(name string, register bool, options ...metric.Int64CounterOption) (metric.Int64Counter, error)
	NewMetricInt64UpDownCounter(name string, register bool, options ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)
	NewMetricInt64Histogram(name string, register bool, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error)
	NewMetricInt64Gauge(name string, register bool, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error)
	NewMetricFloat64Counter(name string, register bool, options ...metric.Float64CounterOption) (metric.Float64Counter, error)
	NewMetricFloat64UpDownCounter(name string, register bool, options ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)
	NewMetricFloat64Histogram(name string, register bool, options ...metric.Float64HistogramOption) (metric.Float64Histogram, error)
	NewMetricFloat64Gauge(name string, register bool, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error)

	GetMetricInt64Counter(name string) metric.Int64Counter
	GetMetricInt64UpDownCounter(name string) metric.Int64UpDownCounter
	GetMetricInt64Histogram(name string) metric.Int64Histogram
	GetMetricInt64Gauge(name string) metric.Int64Gauge
	GetMetricFloat64Counter(name string) metric.Float64Counter
	GetMetricFloat64UpDownCounter(name string) metric.Float64UpDownCounter
	GetMetricFloat64Histogram(name string) metric.Float64Histogram
	GetMetricFloat64Gauge(name string) metric.Float64Gauge

	CollectGoRuntimeMetrics(timeout time.Duration) Telemetry
	GetMetricsHttpHandler() http.Handler
}

func New

func New(service string, traceExporter traceSdk.SpanExporter, metricExporter metricSdk.Reader) Telemetry

Jump to

Keyboard shortcuts

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