Versions in this module Expand all Collapse all v1 v1.1.0 Aug 28, 2026 v1.0.0 Aug 25, 2026 Changes in this version + var ErrAlreadyInitialized = errors.New("telemetry runtime already initialized") + func BuildResource(ctx context.Context, config Config) (*resource.Resource, error) + type BatchConfig struct + BatchTimeout time.Duration + ExportTimeout time.Duration + MaxExportBatchSize int + MaxQueueSize int + type Compression string + const CompressionGZIP + const CompressionNone + type Config struct + Environment string + Metrics MetricConfig + Propagation telemetrypropagation.Config + RegisterGlobal bool + Resource map[string]string + Service ServiceConfig + ShutdownTimeout time.Duration + Traces TraceConfig + func DefaultConfig(serviceName, serviceVersion string) Config + func (c Config) Validate() error + type ExporterConfig struct + Compression Compression + Endpoint string + Headers map[string]string + Protocol Protocol + Retry RetryConfig + TLS TLSConfig + Timeout time.Duration + URLPath string + type MetricConfig struct + CardinalityLimit int + Enabled bool + ExportInterval time.Duration + ExportTimeout time.Duration + Exporter ExporterConfig + Views []telemetrymetric.ViewConfig + type Option interface + func WithMetricExporter(exporter metricexport.Exporter) Option + func WithTraceExporter(exporter trace.SpanExporter) Option + type Protocol string + const ProtocolGRPC + const ProtocolHTTPProtobuf + type RetryConfig struct + Enabled bool + InitialInterval time.Duration + MaxElapsedTime time.Duration + MaxInterval time.Duration + type Runtime struct + func Init(ctx context.Context, config Config, opts ...Option) (*Runtime, error) + func (r *Runtime) ForceFlush(ctx context.Context) error + func (r *Runtime) Meter(name string, options ...metric.MeterOption) metric.Meter + func (r *Runtime) MeterProvider() metric.MeterProvider + func (r *Runtime) Propagator() otelpropagation.TextMapPropagator + func (r *Runtime) Shutdown(ctx context.Context) error + func (r *Runtime) Tracer(name string, options ...traceapi.TracerOption) traceapi.Tracer + func (r *Runtime) TracerProvider() traceapi.TracerProvider + type SamplerConfig struct + Mode telemetrytrace.Mode + ParentBased bool + Ratio float64 + type ServiceConfig struct + Instance string + Name string + Namespace string + Version string + type TLSConfig struct + CAFile string + CertificateFile string + Insecure bool + InsecureSkipVerify bool + PrivateKeyFile string + ServerName string + type TraceConfig struct + Batch BatchConfig + Enabled bool + Exporter ExporterConfig + Sampler SamplerConfig