Documentation
¶
Index ¶
- Constants
- func ConfigureLogger(ctx context.Context, globalTags map[string]string, logLevel string) (*slog.Logger, error)
- func Gauge(metrics *statsd.Client, name string, value float64, tags map[string]string, ...)
- func GaugeDuration(metrics *statsd.Client, name string, startedAt time.Time, ...)
- func GetClient(ctx context.Context) *statsd.Client
- func Increment(metrics *statsd.Client, name string, tags map[string]string)
- func WithStatsd(ctx context.Context, metricsNamespace string) context.Context
- type DatadogLoggerConfiguration
Constants ¶
View Source
const LevelLoggingDisabled slog.Level = 100
LevelLoggingDisabled sets the slog log level for LoggingDisabled string constant
View Source
const LoggingDisabled = "DISABLED"
LoggingDisabled holds a value to use when logging should be globally disabled, without removing the log handler
View Source
const (
// MetricsClientContextKey sets the context key for the metrics client
MetricsClientContextKey contextKey = "metrics"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
func Gauge ¶
func Gauge(metrics *statsd.Client, name string, value float64, tags map[string]string, rate float64)
Gauge reports a GAUGE metric using best-effort approach
func GaugeDuration ¶
func GaugeDuration(metrics *statsd.Client, name string, startedAt time.Time, tags map[string]string, rate float64)
GaugeDuration reports a GAUGE metric corresponding to a duration of an operation that started at a specified time, in milliseconds
Types ¶
type DatadogLoggerConfiguration ¶
type DatadogLoggerConfiguration struct {
Endpoint string
ApiKey string
Hostname string
ServiceName string
}
func NewDatadogLoggerConfiguration ¶
func NewDatadogLoggerConfiguration() (*DatadogLoggerConfiguration, error)
Click to show internal directories.
Click to hide internal directories.