Documentation ¶
Index ¶
- func IsInsecure() bool
- func IsMetricEnabled() bool
- func IsTraceEnabled() bool
- func NewGPRCMeterExporter(ctx context.Context, options *Options) (sdkmetric.Exporter, error)
- func NewGRPCTracerExporter(ctx context.Context, options *Options) (*otlptrace.Exporter, error)
- func NewHTTPMeterExporter(ctx context.Context, options *Options) (sdkmetric.Exporter, error)
- func NewHTTPTracerExporter(ctx context.Context, options *Options) (*otlptrace.Exporter, error)
- func NewMeter(name string, options ...metric.MeterOption) metric.Meter
- func NewMeterExporter(ctx context.Context, options *Options) (sdkmetric.Exporter, error)
- func NewReader(options *Options, exporter sdkmetric.Exporter) *sdkmetric.PeriodicReader
- func NewResource(ctx context.Context, options *Options) (*resource.Resource, error)
- func NewTracer(name string, options ...trace.TracerOption) trace.Tracer
- func NewTracerExporter(ctx context.Context, options *Options) (*otlptrace.Exporter, error)
- func Service() string
- func StartMeterProvider(ctx context.Context, startOptions ...sdkmetric.Option)
- func StartMetricProviderWithOptions(ctx context.Context, options *Options, startOptions ...sdkmetric.Option)
- func StartTracerProvider(ctx context.Context, startOptions ...sdktrace.TracerProviderOption)
- func StartTracerProviderWithOptions(ctx context.Context, options *Options, ...)
- type Logger
- func (l Logger) Enabled(level int) bool
- func (l Logger) Error(err error, msg string, keysAndValues ...any)
- func (l Logger) Info(level int, msg string, keysAndValues ...any)
- func (l Logger) Init(info logr.RuntimeInfo)
- func (l Logger) WithName(name string) logr.LogSink
- func (l Logger) WithValues(keysAndValues ...any) logr.LogSink
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInsecure ¶
func IsInsecure() bool
func IsMetricEnabled ¶
func IsMetricEnabled() bool
IsMetricEnabled returns config value from key boost.factory.otel.enabled where default is true.
func IsTraceEnabled ¶
func IsTraceEnabled() bool
IsTraceEnabled returns config value from key boost.factory.otel.enabled where default is true.
func NewGPRCMeterExporter ¶
func NewGRPCTracerExporter ¶
func NewHTTPMeterExporter ¶
func NewHTTPTracerExporter ¶
func NewMeter ¶
func NewMeter(name string, options ...metric.MeterOption) metric.Meter
NewMeter creates a Metric with the provided name and options. A Meter allows for the custom instrumentation.
StartMeterProvider should be called before to setup the meter provider, otherwise a Noop tracer provider will be used.
func NewMeterExporter ¶
func NewReader ¶
func NewReader(options *Options, exporter sdkmetric.Exporter) *sdkmetric.PeriodicReader
func NewResource ¶
func NewTracer ¶
func NewTracer(name string, options ...trace.TracerOption) trace.Tracer
NewTracer creates a Tracer with the provided name and options. A Tracer allows the creation of spans for custom instrumentation.
StartTracerProvider should be called before to setup the tracer provider, otherwise a Noop tracer provider will be used.
func NewTracerExporter ¶
func Service ¶
func Service() string
Service returns config value from key boost.factory.otel.service where default is empty.
func StartMeterProvider ¶
StartMeterProvider starts the tracer provider like StartMetricProviderWithOptions but with default Options.
func StartMetricProviderWithOptions ¶
func StartMetricProviderWithOptions(ctx context.Context, options *Options, startOptions ...sdkmetric.Option)
StartMetricProviderWithOptions starts the tracer provider with the given set of options. Calling it multiple times will have no effect. If an error occours during tracer initialization, a Noop trace provider will be used instead.
func StartTracerProvider ¶
func StartTracerProvider(ctx context.Context, startOptions ...sdktrace.TracerProviderOption)
StartTracerProvider starts the tracer provider like StartMetricProviderWithOptions but with default Options.
func StartTracerProviderWithOptions ¶
func StartTracerProviderWithOptions(ctx context.Context, options *Options, startOptions ...sdktrace.TracerProviderOption)
StartTracerProviderWithOptions starts the tracer provider with the given set of options. Calling it multiple times will have no effect. If an error occours during tracer initialization, a Noop trace provider will be used instead.
Types ¶
type Logger ¶
type Logger struct { }
func (Logger) Init ¶
func (l Logger) Init(info logr.RuntimeInfo)
type Options ¶
type Options struct { Enabled bool Service string Env string Version string Export struct { Interval time.Duration Timeout time.Duration } Protocol string Endpoint string Insecure bool Tags map[string]string TLS struct { Cert string } }
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals options based on a given key path.