output

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// BlitzOutputEntriesReceivedCounter tracks the total number of log entries received by the output
	BlitzOutputEntriesReceivedCounter BlitzOutputEntriesReceivedCounterType

	// BlitzOutputActiveWorkersGauge tracks the number of active output worker goroutines
	BlitzOutputActiveWorkersGauge BlitzOutputActiveWorkersGaugeType

	// BlitzOutputEntryRateCounter tracks the rate of log entries processed per second
	BlitzOutputEntryRateCounter BlitzOutputEntryRateCounterType

	// BlitzOutputRequestSizeHistogram tracks the size of output requests in bytes
	BlitzOutputRequestSizeHistogram BlitzOutputRequestSizeHistogramType

	// BlitzOutputRequestLatencyHistogram tracks the latency of output requests
	BlitzOutputRequestLatencyHistogram BlitzOutputRequestLatencyHistogramType

	// BlitzOutputSendErrorsCounter tracks the total number of send errors
	BlitzOutputSendErrorsCounter BlitzOutputSendErrorsCounterType
)

Functions

func InitObservableMetrics added in v0.14.0

func InitObservableMetrics(callbacks ObservableCallbacks)

InitObservableMetrics initializes observable metrics with the provided callbacks

func Int64ToUint64 added in v0.4.0

func Int64ToUint64(nanos int64) uint64

Int64ToUint64 safely converts an int64 timestamp to uint64. UnixNano() returns int64 but OTLP protobuf requires uint64. Since timestamps are always non-negative (nanoseconds since Unix epoch), this conversion is safe. However, we validate to satisfy static analysis tools.

func TimeToUnixNanoUint64 added in v0.4.0

func TimeToUnixNanoUint64(t time.Time) uint64

TimeToUnixNanoUint64 converts a time.Time to uint64 nanoseconds. This is a convenience wrapper around Int64ToUint64 for better readability.

Types

type BlitzOutputActiveWorkersGaugeType added in v0.14.0

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

BlitzOutputActiveWorkersGaugeType wraps the blitz.output.active_workers metric with type-safe required attributes

func (BlitzOutputActiveWorkersGaugeType) Record added in v0.14.0

func (m BlitzOutputActiveWorkersGaugeType) Record(ctx context.Context, value int64, outputType string, opts ...metric.RecordOption)

Record records a value for blitz.output.active_workers with required attributes

type BlitzOutputEntriesReceivedCounterType added in v0.14.0

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

BlitzOutputEntriesReceivedCounterType wraps the blitz.output.entries_received metric with type-safe required attributes

func (BlitzOutputEntriesReceivedCounterType) Add added in v0.14.0

func (m BlitzOutputEntriesReceivedCounterType) Add(ctx context.Context, value int64, outputType string, opts ...metric.AddOption)

Add records a value for blitz.output.entries_received with required attributes

type BlitzOutputEntryRateCounterType added in v0.14.0

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

BlitzOutputEntryRateCounterType wraps the blitz.output.entry_rate metric with type-safe required attributes

func (BlitzOutputEntryRateCounterType) Add added in v0.14.0

func (m BlitzOutputEntryRateCounterType) Add(ctx context.Context, value float64, outputType string, opts ...metric.AddOption)

Add records a value for blitz.output.entry_rate with required attributes

type BlitzOutputRequestLatencyHistogramType added in v0.14.0

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

BlitzOutputRequestLatencyHistogramType wraps the blitz.output.request_latency metric with type-safe required attributes

func (BlitzOutputRequestLatencyHistogramType) Record added in v0.14.0

func (m BlitzOutputRequestLatencyHistogramType) Record(ctx context.Context, value float64, outputType string, opts ...metric.RecordOption)

Record records a value for blitz.output.request_latency with required attributes

type BlitzOutputRequestSizeHistogramType added in v0.14.0

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

BlitzOutputRequestSizeHistogramType wraps the blitz.output.request_size metric with type-safe required attributes

func (BlitzOutputRequestSizeHistogramType) Record added in v0.14.0

func (m BlitzOutputRequestSizeHistogramType) Record(ctx context.Context, value int64, outputType string, opts ...metric.RecordOption)

Record records a value for blitz.output.request_size with required attributes

type BlitzOutputSendErrorsCounterType added in v0.14.0

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

BlitzOutputSendErrorsCounterType wraps the blitz.output.send_errors metric with type-safe required attributes

func (BlitzOutputSendErrorsCounterType) Add added in v0.14.0

func (m BlitzOutputSendErrorsCounterType) Add(ctx context.Context, value int64, outputType string, opts ...metric.AddOption)

Add records a value for blitz.output.send_errors with required attributes

type LogRecord added in v0.3.0

type LogRecord struct {
	// Message is the raw log message
	Message string

	// ParseFunc is an optional function that will be
	// used by some outputs to parse the message to a
	// map[string]any structure.
	ParseFunc func(message string) (map[string]any, error)

	// Metadata is the metadata for a log record.
	Metadata LogRecordMetadata
}

type LogRecordMetadata added in v0.3.0

type LogRecordMetadata struct {
	Timestamp time.Time
	Severity  string
}

LogRecordMetadata is the metadata for a log record.

type ObservableCallbacks added in v0.14.0

type ObservableCallbacks interface {
	ObserveBlitzOutputQueueSize(ctx context.Context, observer metric.Int64Observer) error
}

ObservableCallbacks defines the callback interface for observable metrics

type Output

type Output interface {
	Writer

	// Stop stops the output.
	Stop(ctx context.Context) error
}

Output is the interface for outputting data.

type Writer added in v0.3.0

type Writer interface {
	// Write writes the data to the output.
	Write(ctx context.Context, data LogRecord) error
}

Writer can consume log records.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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