uotel

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitOtel

func InitOtel(ctx context.Context, opts ...Option) (context.Context, func(context.Context) error, error)

InitOtel initializes OpenTelemetry with the given configuration. It returns a function that can be called to shutdown OpenTelemetry.

Types

type Option added in v0.2.90

type Option func(*otelConfig)

Option is a function that configures an otelConfig.

func WithInitialLogFields added in v0.2.90

func WithInitialLogFields(ilf map[string]interface{}) Option

WithInitialLogFields sets the log fields that will be added to all log messages.

func WithInsecureOtelEndpoint added in v0.2.90

func WithInsecureOtelEndpoint(endpoint string) Option

WithInsecureOtelEndpoint sets the endpoint for both tracing and logging with insecure connection.

func WithLoggingDisabled added in v0.2.90

func WithLoggingDisabled() Option

WithLoggingDisabled disables logging.

func WithOtelEndpoint added in v0.2.90

func WithOtelEndpoint(endpoint string, tlsCertPath string, tlsCert string) Option

WithOtelEndpoint sets the endpoint and TLS certificate for both tracing and logging.

func WithServiceName added in v0.2.90

func WithServiceName(serviceName string) Option

WithServiceName sets the service name for the OpenTelemetry configuration.

func WithTracingDisabled added in v0.2.90

func WithTracingDisabled() Option

WithTracingDisabled disables tracing.

Jump to

Keyboard shortcuts

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