Documentation
¶
Index ¶
- Variables
- func InitObservableMetrics(callbacks ObservableCallbacks)
- func Int64ToUint64(nanos int64) uint64
- func TimeToUnixNanoUint64(t time.Time) uint64
- type BlitzOutputActiveWorkersGaugeType
- type BlitzOutputEntriesReceivedCounterType
- type BlitzOutputEntryRateCounterType
- type BlitzOutputRequestLatencyHistogramType
- type BlitzOutputRequestSizeHistogramType
- type BlitzOutputSendErrorsCounterType
- type LogRecord
- type LogRecordMetadata
- type ObservableCallbacks
- type Output
- type Writer
Constants ¶
This section is empty.
Variables ¶
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
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
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
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
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
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
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