Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CreateAttributesFrom ¶
func CreateAttributesFrom(appCfg commoncfg.Application, attrs ...attribute.KeyValue) []attribute.KeyValue
CreateAttributesFrom builds a slice of OTEL attributes from the application config and optional extra attributes.
func Init ¶
func Init(ctx context.Context, appCfg *commoncfg.Application, telCfg *commoncfg.Telemetry, logCfg *commoncfg.Logger, options ...Option, ) error
Init creates a registry, applies all options and startss the initialization.
func NewClientHandler ¶
NewClientHandler returns a gRPC stats.Handler configured for client-side telemetry.
func NewServerHandler ¶
NewServerHandler returns a gRPC stats.Handler configured for server-side telemetry.
Types ¶
type Option ¶
type Option func(*registry)
func WithLogger ¶
WithLogger accepts a custom logger to be used for logging telemetry events.
func WithShutdownComplete ¶
func WithShutdownComplete(shutdownComplete chan struct{}) Option
WithShutdownComplete accepts a channel to signal when the shutdown is complete.
Click to show internal directories.
Click to hide internal directories.