Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlagsForMetrics ¶
func FlagsForMetrics(prefix string, c *MetricsConfig) *pflag.FlagSet
func FlagsForPProfConfig ¶
func FlagsForPProfConfig(prefix string, c *PProfConfig) *pflag.FlagSet
func FlagsForTracing ¶
func FlagsForTracing(prefix string, c *TracingConfig) *pflag.FlagSet
Types ¶
type MetricsConfig ¶
type MetricsConfig struct { // Enabled metrics collection Enabled bool `json:"enabled" yaml:"enabled"` // Endpoint address for metrics/tracing collection, // for prometheus, it's a listen address (SHOULD NOT be empty or use random port (:0)) // for otlp, it's the otlp collector address Endpoint string `json:"listen" yaml:"listen"` // Format of exposed metrics Format string `json:"format" yaml:"format"` // HTTPPath for metrics collection HTTPPath string `json:"httpPath" yaml:"httpPath"` // TLS config for client/server TLS tlshelper.TLSConfig `json:"tls" yaml:"tls"` }
func (*MetricsConfig) RegisterIfEnabled ¶
type PProfConfig ¶
type PProfConfig struct { Enabled bool `json:"enabled" yaml:"enabled"` Listen string `json:"listen" yaml:"listen"` HTTPPath string `json:"httpPath" yaml:"httpPath"` MutexProfileFraction int `json:"mutexProfileFraction" yaml:"mutexProfileFraction"` BlockProfileRate int `json:"blockProfileRate" yaml:"blockProfileRate"` }
func (*PProfConfig) RunIfEnabled ¶
func (c *PProfConfig) RunIfEnabled() error
type TracingConfig ¶
type TracingConfig struct { // Enabled tracing stats Enabled bool `json:"enabled" yaml:"enabled"` // Format of exposed tracing stats Format string `json:"format" yaml:"format"` // EndpointType the type of collector (used for jaeger), can be one of [agent, collector] EndpointType string `json:"endpointType" yaml:"endpointType"` // Endpoint to report tracing stats Endpoint string `json:"endpoint" yaml:"endpoint"` // SampleRate SampleRate float64 `json:"sampleRate" yaml:"sampleRate"` // ReportedServiceName used when reporting tracing stats ReportedServiceName string `json:"serviceName" yaml:"serviceName"` // TLS config for client/server TLS tlshelper.TLSConfig `json:"tls" yaml:"tls"` }
func (*TracingConfig) RegisterIfEnabled ¶
Click to show internal directories.
Click to hide internal directories.