neosyncotel

package
v0.4.73 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBenthosMetricTemporalityOption added in v0.4.71

func GetBenthosMetricTemporalityOption() otlpmetricgrpc.Option

This will be used to test sending benthos metrics with cumulative temporality instead of delta for better prometheus compatibility

func NewDefaultPropagator added in v0.4.71

func NewDefaultPropagator() propagation.TextMapPropagator

func NewMeterProvider

func NewMeterProvider(ctx context.Context, config *MeterProviderConfig) (*metricsdk.MeterProvider, error)

func NewTraceProvider

func NewTraceProvider(ctx context.Context, config *TraceProviderConfig) (*tracesdk.TracerProvider, error)

func SetupOtelSdk

func SetupOtelSdk(config *SetupConfig) func(context.Context) error

func WithDefaultDeltaTemporalitySelector

func WithDefaultDeltaTemporalitySelector() otlpmetricgrpc.Option

Types

type MeterExporterOpts

type MeterExporterOpts struct {
	Otlp    []otlpmetricgrpc.Option
	Console []stdoutmetric.Option
}

type MeterProvider

type MeterProvider interface {
	metric.MeterProvider

	Shutdown(context.Context) error
}

type MeterProviderConfig

type MeterProviderConfig struct {
	Exporter   string
	Opts       MeterExporterOpts
	AppVersion string
}

type OtelEnvConfig

type OtelEnvConfig struct {
	IsEnabled      bool
	ServiceVersion string

	TraceExporter string
	MeterExporter string
}

func GetOtelConfigFromViperEnv

func GetOtelConfigFromViperEnv() OtelEnvConfig

type SetupConfig

type SetupConfig struct {
	TraceProviders []TracerProvider
	MeterProviders []MeterProvider
	// If provided, configures the global text map propagator
	TextMapPropagator propagation.TextMapPropagator
	// Configures the global otel logger
	Logger logr.Logger
}

type TraceExporterOpts

type TraceExporterOpts struct {
	Otlp    []otlptracegrpc.Option
	Console []stdouttrace.Option
}

type TraceProviderConfig

type TraceProviderConfig struct {
	Exporter string
	Opts     TraceExporterOpts
}

type TracerProvider

type TracerProvider interface {
	trace.TracerProvider

	Shutdown(context.Context) error
}

Jump to

Keyboard shortcuts

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