Documentation
¶
Index ¶
- Constants
- Variables
- func AuthHeaders(apiKey string) map[string]string
- func Counter(desc *prometheus.Desc, value float64, labels ...string) prometheus.Metric
- func DatabaseTLSConfig(creds TLSCredentials, insecureSkipVerify bool) (*tls.Config, error)
- func Desc(name, help string, labels ...string) *prometheus.Desc
- func Gauge(desc *prometheus.Desc, value float64, labels ...string) prometheus.Metric
- func LabelsMatched(filters, labels map[string]string) bool
- func LogSeverity(level logparser.Level) log.Severity
- func SetAuthHeaders(r *http.Request, apiKey string)
- func SplitHostPort(addr string) (host string, port int, err error)
- func TlsConfig(insecureSkipVerify bool, caFile string) *tls.Config
- func TopN[T any](s []T, n int, less func(a, b T) bool) []T
- func TopNMap[K comparable, V any, S cmp.Ordered](m map[K]V, n int, val func(V) S) map[K]V
- func TopNMapByValue[K comparable, V cmp.Ordered](m map[K]V, n int) map[K]V
- type Endpoint
- type LogEmitter
- type LogsPipeline
- type TLSCredentials
Constants ¶
View Source
const ( MultilineCollectorTimeout = time.Second LogPatternsPerLevel = 256 LogSourceAttribute = "log.source" )
Variables ¶
View Source
var DefaultExcludeDatabases = []string{"rdsadmin", "cloudsqladmin", "mysql", "information_schema", "performance_schema", "sys", "mysql_innodb_cluster_metadata", "mysql_innodb_cluster_metadata_previous"}
Functions ¶
func AuthHeaders ¶
func Counter ¶
func Counter(desc *prometheus.Desc, value float64, labels ...string) prometheus.Metric
func DatabaseTLSConfig ¶ added in v1.9.0
func DatabaseTLSConfig(creds TLSCredentials, insecureSkipVerify bool) (*tls.Config, error)
func Gauge ¶
func Gauge(desc *prometheus.Desc, value float64, labels ...string) prometheus.Metric
func LabelsMatched ¶ added in v1.11.3
func LogSeverity ¶ added in v1.11.8
LogSeverity maps a logparser level to the OpenTelemetry log severity.
func SetAuthHeaders ¶
func SplitHostPort ¶ added in v1.3.0
func TopNMap ¶ added in v1.9.0
func TopNMap[K comparable, V any, S cmp.Ordered](m map[K]V, n int, val func(V) S) map[K]V
func TopNMapByValue ¶ added in v1.9.0
func TopNMapByValue[K comparable, V cmp.Ordered](m map[K]V, n int) map[K]V
Types ¶
type LogEmitter ¶ added in v1.11.2
type LogEmitter struct {
// contains filtered or unexported fields
}
func (*LogEmitter) Callback ¶ added in v1.11.2
func (e *LogEmitter) Callback() logparser.OnMsgCallbackF
func (*LogEmitter) Stop ¶ added in v1.11.2
func (e *LogEmitter) Stop()
type LogsPipeline ¶ added in v1.11.8
type LogsPipeline struct {
// contains filtered or unexported fields
}
func NewLogsPipeline ¶ added in v1.11.8
func (*LogsPipeline) NewLogEmitter ¶ added in v1.11.8
func (p *LogsPipeline) NewLogEmitter(serviceName, hostName, source string) (*LogEmitter, error)
func (*LogsPipeline) NewLoggerProvider ¶ added in v1.11.8
func (p *LogsPipeline) NewLoggerProvider(serviceName string, resourceAttrs ...attribute.KeyValue) (*sdk.LoggerProvider, error)
type TLSCredentials ¶ added in v1.9.0
type TLSCredentials struct {
CA, Cert, Key string
}
Click to show internal directories.
Click to hide internal directories.