providers

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package providers contains telemetry provider implementations and factory logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder builds telemetry providers based on configuration

func NewBuilder

func NewBuilder(config Config) *Builder

NewBuilder creates a new provider builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (*CompositeProvider, error)

Build creates the appropriate providers based on configuration

type CompositeProvider

type CompositeProvider struct {
	// contains filtered or unexported fields
}

CompositeProvider combines telemetry providers

func (*CompositeProvider) MeterProvider

func (p *CompositeProvider) MeterProvider() metric.MeterProvider

MeterProvider returns the primary meter provider

func (*CompositeProvider) PrometheusHandler

func (p *CompositeProvider) PrometheusHandler() http.Handler

PrometheusHandler returns the Prometheus metrics handler if configured

func (*CompositeProvider) Shutdown

func (p *CompositeProvider) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down all providers

func (*CompositeProvider) TracerProvider

func (p *CompositeProvider) TracerProvider() trace.TracerProvider

TracerProvider returns the tracer provider

type Config

type Config struct {
	// Service information
	ServiceName    string
	ServiceVersion string

	// OTLP configuration
	OTLPEndpoint string
	Headers      map[string]string
	Insecure     bool
	SamplingRate float64

	// Prometheus configuration
	EnablePrometheusMetricsPath bool
}

Config holds the telemetry configuration

Directories

Path Synopsis
Package otlp provides OpenTelemetry Protocol (OTLP) provider implementations
Package otlp provides OpenTelemetry Protocol (OTLP) provider implementations
Package prometheus provides Prometheus metric exporter implementation
Package prometheus provides Prometheus metric exporter implementation

Jump to

Keyboard shortcuts

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