Documentation ¶
Index ¶
- Variables
- func GetLogLineMarshaller[T logLine](config LogConfig) func(T) string
- func GetSettingValue(name string) any
- func Load()
- func Reset() error
- func SettingNames() []string
- func UpdateSettingValue(name string, value string) error
- func ValidArgSettingName(cmdName string) func(cmd *cobra.Command, args []string) error
- type Config
- type Duration
- type LogConfig
- type SpanAttributeConfig
- type SpanStep
- type TracesConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetLogLineMarshaller ¶ added in v1.1.0
func GetSettingValue ¶
func SettingNames ¶
func SettingNames() []string
func UpdateSettingValue ¶
Types ¶
type Config ¶
type Config struct { URL string `yaml:"url" json:"url" validate:"required"` Headers map[string]string `yaml:"headers" json:"headers"` APIKey string `yaml:"api_key" json:"api_key" validate:"required"` APISecret string `yaml:"api_secret" json:"api_secret" validate:"required"` Labels map[string]string `yaml:"labels" json:"labels" validate:"required"` Rate int `yaml:"rate" json:"rate" validate:"required"` Timeout Duration `yaml:"timeout" json:"timeout" validate:"required"` LogConfig LogConfig `yaml:"log_config" json:"log_config" validate:"required"` EnableMetrics bool `yaml:"enable_metrics" json:"enable_metrics"` Traces TracesConfig `yaml:"traces" json:"traces" validate:"required"` }
func (*Config) GetHeaders ¶ added in v1.1.0
func (Config) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Config) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Config) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Config) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Duration ¶ added in v1.1.0
func (Duration) MarshalJSON ¶ added in v1.1.0
func (Duration) MarshalYAML ¶ added in v1.1.0
func (*Duration) UnmarshalJSON ¶ added in v1.1.0
func (*Duration) UnmarshalYAML ¶ added in v1.1.0
type LogConfig ¶
type LogConfig struct { Format string `yaml:"format" json:"format" validate:"oneof=logfmt json"` Structure map[string]string `yaml:"structure" json:"structure" validate:"required"` }
func (LogConfig) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (LogConfig) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*LogConfig) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LogConfig) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SpanAttributeConfig ¶ added in v1.1.0
type SpanAttributeConfig struct { Name string `yaml:"name" json:"name"` ValueType string `yaml:"value_type" json:"value_type" validate:"required"` ResolveFake string `yaml:"resolve_fake" json:"resolve_fake"` ResolveFromLogValue string `yaml:"resolve_from_log_value" json:"resolve_from_log_value"` }
func (SpanAttributeConfig) MarshalEasyJSON ¶ added in v1.1.0
func (v SpanAttributeConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SpanAttributeConfig) MarshalJSON ¶ added in v1.1.0
func (v SpanAttributeConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SpanAttributeConfig) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *SpanAttributeConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SpanAttributeConfig) UnmarshalJSON ¶ added in v1.1.0
func (v *SpanAttributeConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SpanStep ¶ added in v1.1.0
type SpanStep struct { Kind trace.SpanKind `yaml:"kind" json:"kind" validate:"required"` Name string `yaml:"name" json:"name"` Duration time.Duration `yaml:"duration" json:"duration"` Attributes []SpanAttributeConfig `yaml:"attributes" json:"attributes"` Children []SpanStep `yaml:"children" json:"children"` }
func (SpanStep) MarshalEasyJSON ¶ added in v1.1.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (SpanStep) MarshalJSON ¶ added in v1.1.0
MarshalJSON supports json.Marshaler interface
func (*SpanStep) UnmarshalEasyJSON ¶ added in v1.1.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SpanStep) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON supports json.Unmarshaler interface
type TracesConfig ¶ added in v1.1.0
type TracesConfig struct { Enabled bool `yaml:"enabled" json:"enabled"` Defaults []attribute.Key `yaml:"defaults" json:"defaults"` Custom attributeKeyValueList `yaml:"custom" json:"custom"` Spans []SpanStep `json:"spans" json:"spans"` }
func (TracesConfig) MarshalEasyJSON ¶ added in v1.1.0
func (v TracesConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TracesConfig) MarshalJSON ¶ added in v1.1.0
func (v TracesConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TracesConfig) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *TracesConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TracesConfig) UnmarshalJSON ¶ added in v1.1.0
func (v *TracesConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface