Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Servicename string `json:"service_name"` Endpoint string `json:"endpoint"` Insecure bool `json:"insecure"` }
Config holds the typed values of configuration read from the environment. It is public mainly to make testing easier and most users should never use it directly.
type OtelShutdown ¶
OtelShutdown is a function that should be called with context when you want to shut down OpenTelemetry, usually as a defer in main.
func InitOpenTelemetry ¶
InitOpenTelemetry sets up the OpenTelemetry plumbing so it's ready to use. It requires a context.Context and service name string that is the name of your service or application. TODO: should even this be overrideable via envvars? Returns context and a func() that encapuslates clean shutdown.
Click to show internal directories.
Click to hide internal directories.