Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerMock ¶
Types ¶
type Config ¶
type Config struct {
LogConfig *LogConfig `yaml:"logging" validate:"required"`
Resource map[string]string `yaml:"resource"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type LogConfig ¶
type LogConfig struct {
// Level is the minimum enabled logging level.
Level zapcore.Level `yaml:"level"`
// Encoding sets the logger's encoding. Valid values are "json", "console"
Encoding string `yaml:"encoding"`
// DisableCaller stops annotating logs with the calling function's file name and line number.
// By default, all logs are annotated.
DisableCaller bool `yaml:"disable_caller"`
// DisableStacktrace completely disables automatic stacktrace capturing. By
// default, stacktraces are captured for WarnLevel and above logs in
// development and ErrorLevel and above in production.
DisableStacktrace bool `yaml:"disable_stacktrace"`
// OutputPaths is a list of URLs or file paths to write logging output to.
OutputPaths []string `yaml:"output_paths"`
// InitialFields is a collection of fields to add to the root logger.
InitialFields map[string]interface{} `yaml:"initial_fields"`
}
func DefaultLogConfig ¶
func DefaultLogConfig() *LogConfig
func (*LogConfig) ToZapConfig ¶
type Telemetry ¶
func NewTelemetry ¶
func NewTelemetryMock ¶
func NewTelemetryMock() *Telemetry
NewTelemetryMock returns Telemetry object with NoOp loggers, meters, tracers
Click to show internal directories.
Click to hide internal directories.