observability

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupTracing

func SetupTracing(programContext context.Context, config Config) error

SetupTracing will configure OTEL using the environment using the given configuration Deprecated: use Config#Start() instead. This required using a delay in order to ensure all spans were flushed was shutdown correctly.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

func (*Component) ShutdownGracefully

func (c *Component) ShutdownGracefully(ctx context.Context) error

type Config

type Config struct {
	//Exporter is the name of the OTEL exporter to utilize.  Currently supported values are `none` and `jaeger`.
	Exporter string `json:"exporter"`
	//ServiceName is the name to utilize in report tracing
	ServiceName string `json:"service-name"`
	Environment string `json:"environment"`
	//Silent will not generate any output regarding the runtime configuration of the otel system
	Silent  bool `json:"silent"`
	Batched bool `json:"batched"`
}

Config is used to describe the setup of the observability libraries

func DefaultConfig

func DefaultConfig(serviceName string) Config

DefaultConfig pulls values from the environment for the service or uses sensible defaults.

func (Config) Start

func (c Config) Start(setup context.Context) (*Component, error)

type UnknownExportError

type UnknownExportError struct {
	Exporter string
}

func (*UnknownExportError) Error

func (u *UnknownExportError) Error() string

Jump to

Keyboard shortcuts

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