Documentation
¶
Index ¶
- func IsSensitiveKey(key string) bool
- func NewMetricReader(ctx context.Context, cfg Config) (sdkmetric.Reader, error)
- func NewTraceExporter(ctx context.Context, cfg Config) (sdktrace.SpanExporter, error)
- func RedactFields(fields logrus.Fields) map[string]interface{}
- func RedactString(value string) string
- func RedactValue(value interface{}) interface{}
- type Config
- type LogHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSensitiveKey ¶
func NewMetricReader ¶
NewMetricReader creates an OTLP/HTTP metric reader for remote monitoring.
func NewTraceExporter ¶
NewTraceExporter creates an OTLP/HTTP trace exporter for remote monitoring.
func RedactFields ¶
func RedactString ¶
func RedactValue ¶
func RedactValue(value interface{}) interface{}
Types ¶
type Config ¶
type Config struct {
DSN string
PublicKey string
ProjectID string
Endpoint string
Timeout time.Duration
}
Config describes the optional remote monitoring telemetry sink.
func FromEnv ¶
FromEnv returns the monitoring exporter config from environment variables. Missing DSN is not an error; it means remote export is disabled.
func (Config) OTLPSignalURL ¶
type LogHook ¶
type LogHook struct {
// contains filtered or unexported fields
}
LogHook asynchronously forwards sanitized logrus entries to remote monitoring.