Documentation
¶
Overview ¶
Package otlprecord reads OTLP log records as backplane stores them: attributes as JSON, bodies as text, times, bounded text. The audit and error ingests share it.
Index ¶
- Variables
- func AnyJSON(v *commonpb.AnyValue) (any, error)
- func AttributesJSON(attrs []*commonpb.KeyValue) (json.RawMessage, error)
- func BodyText(body *commonpb.AnyValue) (string, error)
- func BoolAttr(attrs []*commonpb.KeyValue, key string) (bool, bool)
- func CutBytes(s string, limit int) string
- func CutRunes(s string, limit int) string
- func HasAttr(attrs []*commonpb.KeyValue, key string) bool
- func RecordTime(record *logspb.LogRecord, now time.Time) time.Time
- func SeverityText(record *logspb.LogRecord) string
- func StringAttr(attrs []*commonpb.KeyValue, key string) string
- func ValidText(s string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidText = errors.New("record contains invalid PostgreSQL text")
ErrInvalidText: PostgreSQL text and jsonb cannot store NUL or invalid UTF-8; such a record is rejected before any transaction.
Functions ¶
func AttributesJSON ¶
func AttributesJSON(attrs []*commonpb.KeyValue) (json.RawMessage, error)
AttributesJSON is attrs as a JSON object.
func RecordTime ¶
RecordTime is the record's time, else its observed time, else now.
func SeverityText ¶
SeverityText is the record's severity text, else its number's name.
func StringAttr ¶
StringAttr is the string value of key among attrs, "" without.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.