observability

package
v0.386.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleNameAttribute          = "ftl.module.name"
	OutcomeStatusNameAttribute   = "ftl.outcome.status"
	RunnerDeploymentKeyAttribute = "ftl.deployment.key"

	SuccessStatus = "success"
	FailureStatus = "failure"
)

Variables

This section is empty.

Functions

func AddSpanContextToLogger added in v0.383.0

func AddSpanContextToLogger(ctx context.Context) context.Context

func AddSpanToLogger added in v0.383.0

func AddSpanToLogger(ctx context.Context, span trace.Span) (context.Context, trace.Span)

func Init

func Init(ctx context.Context, isUserService bool, projectName, serviceName, serviceVersion string, config Config) error

func NewOtelLogger

func NewOtelLogger(logger *log.Logger, level log.Level) logr.Logger

func OpenDBAndInstrument added in v0.349.0

func OpenDBAndInstrument(dsn string) (*sql.DB, error)

func SuccessOrFailureStatusAttr added in v0.324.0

func SuccessOrFailureStatusAttr(succeeded bool) attribute.KeyValue

Types

type Config

type Config struct {
	LogLevel   log.Level      `default:"error" help:"OTEL log level." env:"FTL_O11Y_LOG_LEVEL"`
	ExportOTEL ExportOTELFlag `help:"Export observability data to OTEL." env:"OTEL_EXPORTER_OTLP_ENDPOINT"`
}

type ExportOTELFlag added in v0.138.0

type ExportOTELFlag bool

func (*ExportOTELFlag) UnmarshalText added in v0.138.0

func (e *ExportOTELFlag) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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