Documentation
¶
Overview ¶
Package observability provides unified configuration and initialization for the four observability pillars: logging, metrics, tracing, and profiling.
Index ¶
- Variables
- func AcknowledgeError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, ...)
- func ObserveValues(values map[string]any, span tracing.Span, logger logging.Logger) logging.Logger
- func PrepareAndLogError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, ...) error
- func PrepareAndLogGRPCStatus(err error, logger logging.Logger, span tracing.Span, code codes.Code, ...) error
- func PrepareError(err error, span tracing.Span, descriptionFmt string, descriptionArgs ...any) error
- func RegisterO11yConfigs(i do.Injector)
- type Config
- type Pillars
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AcknowledgeError ¶
func AcknowledgeError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, descriptionArgs ...any)
AcknowledgeError standardizes our error handling by logging and tracing consistently.
func ObserveValues ¶
func PrepareAndLogError ¶
func PrepareAndLogError(err error, logger logging.Logger, span tracing.Span, descriptionFmt string, descriptionArgs ...any) error
PrepareAndLogError standardizes our error handling by logging, tracing, and formatting an error consistently.
func PrepareAndLogGRPCStatus ¶
func PrepareAndLogGRPCStatus(err error, logger logging.Logger, span tracing.Span, code codes.Code, descriptionFmt string, descriptionArgs ...any) error
PrepareAndLogGRPCStatus standardizes our error handling by logging, tracing, and formatting an error consistently.
func PrepareError ¶
func PrepareError(err error, span tracing.Span, descriptionFmt string, descriptionArgs ...any) error
PrepareError standardizes our error handling by logging, tracing, and formatting an error consistently.
func RegisterO11yConfigs ¶
RegisterO11yConfigs registers sub-configs extracted from *Config with the injector. This mirrors the wire.FieldsOf pattern in wire.go. Prerequisite: *Config must be registered in the injector before calling this.
Types ¶
type Config ¶
type Config struct {
Profiling profilingcfg.Config `envPrefix:"PROFILING_" json:"profiling"`
Logging loggingcfg.Config `envPrefix:"LOGGING_" json:"logging"`
Metrics metricscfg.Config `envPrefix:"METRICS_" json:"metrics"`
Tracing tracingcfg.Config `envPrefix:"TRACING_" json:"tracing"`
// contains filtered or unexported fields
}
Config contains settings about how we report our metrics.
func (*Config) ProvidePillars ¶
ProvidePillars creates and returns all four observability pillars.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package metrics provides a metrics-tracking implementation for the service.
|
Package metrics provides a metrics-tracking implementation for the service. |
|
mock
Package mockmetrics provides metrics-related mocks.
|
Package mockmetrics provides metrics-related mocks. |
|
Package tracing provides distributed tracing utilities.
|
Package tracing provides distributed tracing utilities. |
|
cloudtrace
Package cloudtrace provides common functions for attaching values to trace spans
|
Package cloudtrace provides common functions for attaching values to trace spans |
|
oteltrace
Package oteltrace provides common functions for attaching values to trace spans
|
Package oteltrace provides common functions for attaching values to trace spans |
|
Package o11yutils offers observability utility functions.
|
Package o11yutils offers observability utility functions. |