Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionFunc ¶
type OptionFunc func() error
OptionFunc is a function that sets some option on the OpenTelemetry SDK.
type Sdk ¶
func Setup ¶
func Setup(opts ...OptionFunc) (*Sdk, error)
Setup initializes the OpenTelemetry SDK. Calling Shutdown is not necessary, as it is called automatically when the RootContext is done, i.e. when the application is terminated.
Example usage:
sdk, err := gotel.Setup() if err != nil { return fmt.Errorf("failed to set up OpenTelemetry: %w", err) }
Click to show internal directories.
Click to hide internal directories.