diagnostics

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package diagnostics writes redacted, structured operator diagnostics.

Index

Constants

View Source
const (
	DefaultMaxBytes int64 = 10 << 20
	DefaultBackups        = 5
)

Variables

This section is empty.

Functions

func RedactText

func RedactText(value string) string

RedactText removes common credential representations before text reaches any diagnostic sink. It deliberately returns a useful stable marker instead of dropping the surrounding operator context.

Types

type Event

type Event struct {
	Level        Level
	Message      string
	Component    string
	Operation    string
	ErrorCode    string
	RunID        string
	RequestID    string
	ReportID     string
	Duration     time.Duration
	DroppedCount uint64
	FailureCount uint64
	Err          error
}

type Level

type Level string
const (
	LevelDebug Level = "debug"
	LevelInfo  Level = "info"
	LevelWarn  Level = "warn"
	LevelError Level = "error"
)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func Open

func Open(options Options) (*Logger, error)

func (*Logger) Close

func (logger *Logger) Close() error

func (*Logger) Path

func (logger *Logger) Path() string

func (*Logger) Record

func (logger *Logger) Record(ctx context.Context, event Event) error

type Options

type Options struct {
	Directory  string
	Filename   string
	AppVersion string
	MaxBytes   int64
	Backups    int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL