Documentation
¶
Index ¶
- func InitLog(ctx context.Context, c *config) *sdklog.LoggerProvider
- func InitMetric(ctx context.Context, c *config) func(context.Context) error
- func InitTrace(ctx context.Context, c *config) func(context.Context) error
- func NewConfig(opts ...Option) *config
- func NewLogger(ctx context.Context, c *config) *slog.Logger
- func SetOtel(ctx context.Context, c commonConfig.OtelConfig) func(ctx context.Context)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetric ¶ added in v0.1.0
InitTrace initializes the OpenTelemetry trace exporter with the given config. It returns a function to shut down the exporter when done.
func InitTrace ¶
InitTrace initializes the OpenTelemetry trace exporter with the given config. It returns a function to shut down the exporter when done.
func NewConfig ¶ added in v0.1.0
func NewConfig(opts ...Option) *config
NewConfig creates a new config with default values, and applies any provided options to customize it.
func SetOtel ¶ added in v0.1.1
func SetOtel(ctx context.Context, c commonConfig.OtelConfig) func(ctx context.Context)
Types ¶
type Option ¶ added in v0.1.0
type Option func(*config)
Option is a function that modifies the config.
func WithClientType ¶ added in v0.1.0
WithClientType sets the client type for the OpenTelemetry exporter.
func WithEndpoint ¶ added in v0.1.0
WithEndpoint sets the endpoint for the OpenTelemetry exporter.
func WithHeaders ¶ added in v0.1.0
WithHeaders sets the headers for the OpenTelemetry exporter.
Click to show internal directories.
Click to hide internal directories.