Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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.
Click to show internal directories.
Click to hide internal directories.