Documentation ¶
Index ¶
- func OTLPLogFrom(logRecord plog.LogRecord) any
- func OTLPLogToSampleType[T OTLPLog]() control.SampleType
- func Range(otlpLogs OTLPLogs, fn func(resource, sampler string, otlpLog interface{}))
- func RangeSamplerLogs(samplerOtlpLogs SamplerOTLPLogs, fn func(otlpLog interface{}))
- func RangeSamplerLogsWithType[T OTLPLog](samplerOtlpLogs SamplerOTLPLogs, fn func(otlpLog T))
- func RangeSamplers(otlpLogs OTLPLogs, ...)
- func RangeWithType[T OTLPLog](otlpLogs OTLPLogs, fn func(resource, sampler string, otlpLog T))
- type ConfigOTLPLog
- func (b ConfigOTLPLog) Record() plog.LogRecord
- func (b ConfigOTLPLog) SampleData() (*data.Data, error)
- func (b ConfigOTLPLog) SampleEncoding() Encoding
- func (b ConfigOTLPLog) SampleKey() string
- func (b ConfigOTLPLog) SampleRawData() []byte
- func (b ConfigOTLPLog) SampleType() control.SampleType
- func (b ConfigOTLPLog) SetSampleKey(key string)
- func (b ConfigOTLPLog) SetSampleRawData(encoding Encoding, data []byte)
- func (b ConfigOTLPLog) SetStreams(streams []control.SamplerStreamUID)
- func (b ConfigOTLPLog) SetTimestamp(ts time.Time)
- func (b ConfigOTLPLog) Streams() []control.SamplerStreamUID
- func (b ConfigOTLPLog) StreamsStr() []string
- func (b ConfigOTLPLog) Timestamp() time.Time
- type Encoding
- type EventOTLPLog
- func (b EventOTLPLog) Record() plog.LogRecord
- func (e EventOTLPLog) RuleExpression() string
- func (b EventOTLPLog) SampleData() (*data.Data, error)
- func (b EventOTLPLog) SampleEncoding() Encoding
- func (b EventOTLPLog) SampleKey() string
- func (b EventOTLPLog) SampleRawData() []byte
- func (b EventOTLPLog) SampleType() control.SampleType
- func (e EventOTLPLog) SetRuleExpression(ruleExpression string)
- func (b EventOTLPLog) SetSampleKey(key string)
- func (b EventOTLPLog) SetSampleRawData(encoding Encoding, data []byte)
- func (b EventOTLPLog) SetStreams(streams []control.SamplerStreamUID)
- func (b EventOTLPLog) SetTimestamp(ts time.Time)
- func (e EventOTLPLog) SetUID(uid control.SamplerEventUID)
- func (b EventOTLPLog) Streams() []control.SamplerStreamUID
- func (b EventOTLPLog) StreamsStr() []string
- func (b EventOTLPLog) Timestamp() time.Time
- func (e EventOTLPLog) UID() control.SamplerEventUID
- type MetadataKey
- type OTLPLog
- type OTLPLogs
- type RawSampleOTLPLog
- func (b RawSampleOTLPLog) Record() plog.LogRecord
- func (b RawSampleOTLPLog) SampleData() (*data.Data, error)
- func (b RawSampleOTLPLog) SampleEncoding() Encoding
- func (b RawSampleOTLPLog) SampleKey() string
- func (b RawSampleOTLPLog) SampleRawData() []byte
- func (b RawSampleOTLPLog) SampleType() control.SampleType
- func (b RawSampleOTLPLog) SetSampleKey(key string)
- func (b RawSampleOTLPLog) SetSampleRawData(encoding Encoding, data []byte)
- func (b RawSampleOTLPLog) SetStreams(streams []control.SamplerStreamUID)
- func (b RawSampleOTLPLog) SetTimestamp(ts time.Time)
- func (b RawSampleOTLPLog) Streams() []control.SamplerStreamUID
- func (b RawSampleOTLPLog) StreamsStr() []string
- func (b RawSampleOTLPLog) Timestamp() time.Time
- type Sample
- type SamplerOTLPLogs
- func (s SamplerOTLPLogs) AppendConfigOTLPLog() ConfigOTLPLog
- func (s SamplerOTLPLogs) AppendEventOTLPLog() EventOTLPLog
- func (s SamplerOTLPLogs) AppendRawSampleOTLPLog() RawSampleOTLPLog
- func (s *SamplerOTLPLogs) AppendStructDigestOTLPLog() StructDigestOTLPLog
- func (s SamplerOTLPLogs) AppendValueDigestOTLPLog() ValueDigestOTLPLog
- func (s SamplerOTLPLogs) MoveAndAppendTo(dest SamplerOTLPLogs)
- type SamplerSamples
- type StructDigestOTLPLog
- func (b StructDigestOTLPLog) Record() plog.LogRecord
- func (b StructDigestOTLPLog) SampleData() (*data.Data, error)
- func (b StructDigestOTLPLog) SampleEncoding() Encoding
- func (b StructDigestOTLPLog) SampleKey() string
- func (b StructDigestOTLPLog) SampleRawData() []byte
- func (b StructDigestOTLPLog) SampleType() control.SampleType
- func (b StructDigestOTLPLog) SetSampleKey(key string)
- func (b StructDigestOTLPLog) SetSampleRawData(encoding Encoding, data []byte)
- func (b StructDigestOTLPLog) SetStreams(streams []control.SamplerStreamUID)
- func (b StructDigestOTLPLog) SetTimestamp(ts time.Time)
- func (e StructDigestOTLPLog) SetUID(uid control.SamplerDigestUID)
- func (b StructDigestOTLPLog) Streams() []control.SamplerStreamUID
- func (b StructDigestOTLPLog) StreamsStr() []string
- func (b StructDigestOTLPLog) Timestamp() time.Time
- func (e StructDigestOTLPLog) UID() control.SamplerDigestUID
- type ValueDigestOTLPLog
- func (b ValueDigestOTLPLog) Record() plog.LogRecord
- func (b ValueDigestOTLPLog) SampleData() (*data.Data, error)
- func (b ValueDigestOTLPLog) SampleEncoding() Encoding
- func (b ValueDigestOTLPLog) SampleKey() string
- func (b ValueDigestOTLPLog) SampleRawData() []byte
- func (b ValueDigestOTLPLog) SampleType() control.SampleType
- func (b ValueDigestOTLPLog) SetSampleKey(key string)
- func (b ValueDigestOTLPLog) SetSampleRawData(encoding Encoding, data []byte)
- func (b ValueDigestOTLPLog) SetStreams(streams []control.SamplerStreamUID)
- func (b ValueDigestOTLPLog) SetTimestamp(ts time.Time)
- func (e ValueDigestOTLPLog) SetUID(uid control.SamplerDigestUID)
- func (b ValueDigestOTLPLog) Streams() []control.SamplerStreamUID
- func (b ValueDigestOTLPLog) StreamsStr() []string
- func (b ValueDigestOTLPLog) Timestamp() time.Time
- func (e ValueDigestOTLPLog) UID() control.SamplerDigestUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OTLPLogFrom ¶
func OTLPLogToSampleType ¶
func OTLPLogToSampleType[T OTLPLog]() control.SampleType
func Range ¶
Range iterates over the logs and runs the callback for each log. Logs added to the SamplerOTLPLogs after this function is called will not be visited.
func RangeSamplerLogs ¶
func RangeSamplerLogs(samplerOtlpLogs SamplerOTLPLogs, fn func(otlpLog interface{}))
RangeSamplerLogs iterates over the logs and runs the callback for each log. Logs added to the SamplerOTLPLogs after this function is called will not be visited
func RangeSamplerLogsWithType ¶
func RangeSamplerLogsWithType[T OTLPLog](samplerOtlpLogs SamplerOTLPLogs, fn func(otlpLog T))
func RangeSamplers ¶
func RangeSamplers(otlpLogs OTLPLogs, fn func(resource, sampler string, samplerLogs SamplerOTLPLogs))
RangeSamplers iterates over the samplers and runs the callback for each one. Samplers added to the OTLPLogs after this function is called will not be visited
func RangeWithType ¶
Range iterates over the logs and runs the callback for each log record that matches the type provided. Logs added to the SamplerOTLPLogs after this function is called will not be visited.
Types ¶
type ConfigOTLPLog ¶
type ConfigOTLPLog struct {
// contains filtered or unexported fields
}
ConfigOTLPLog implementation
func ConfigOTLPLogFrom ¶
func ConfigOTLPLogFrom(logRecord plog.LogRecord) ConfigOTLPLog
func (ConfigOTLPLog) SampleData ¶
func (ConfigOTLPLog) SampleEncoding ¶
func (b ConfigOTLPLog) SampleEncoding() Encoding
func (ConfigOTLPLog) SampleRawData ¶
func (b ConfigOTLPLog) SampleRawData() []byte
func (ConfigOTLPLog) SampleType ¶
func (b ConfigOTLPLog) SampleType() control.SampleType
func (ConfigOTLPLog) SetSampleKey ¶
func (b ConfigOTLPLog) SetSampleKey(key string)
func (ConfigOTLPLog) SetSampleRawData ¶
func (ConfigOTLPLog) SetStreams ¶
func (b ConfigOTLPLog) SetStreams(streams []control.SamplerStreamUID)
func (ConfigOTLPLog) SetTimestamp ¶
func (ConfigOTLPLog) Streams ¶
func (b ConfigOTLPLog) Streams() []control.SamplerStreamUID
func (ConfigOTLPLog) StreamsStr ¶
func (b ConfigOTLPLog) StreamsStr() []string
type EventOTLPLog ¶
type EventOTLPLog struct {
// contains filtered or unexported fields
}
EventOTLPLog implementation
func EventOTLPLogFrom ¶
func EventOTLPLogFrom(logRecord plog.LogRecord) EventOTLPLog
func (EventOTLPLog) RuleExpression ¶
func (e EventOTLPLog) RuleExpression() string
func (EventOTLPLog) SampleData ¶
func (EventOTLPLog) SampleEncoding ¶
func (b EventOTLPLog) SampleEncoding() Encoding
func (EventOTLPLog) SampleRawData ¶
func (b EventOTLPLog) SampleRawData() []byte
func (EventOTLPLog) SampleType ¶
func (b EventOTLPLog) SampleType() control.SampleType
func (EventOTLPLog) SetRuleExpression ¶
func (e EventOTLPLog) SetRuleExpression(ruleExpression string)
func (EventOTLPLog) SetSampleKey ¶
func (b EventOTLPLog) SetSampleKey(key string)
func (EventOTLPLog) SetSampleRawData ¶
func (EventOTLPLog) SetStreams ¶
func (b EventOTLPLog) SetStreams(streams []control.SamplerStreamUID)
func (EventOTLPLog) SetTimestamp ¶
func (EventOTLPLog) SetUID ¶
func (e EventOTLPLog) SetUID(uid control.SamplerEventUID)
func (EventOTLPLog) Streams ¶
func (b EventOTLPLog) Streams() []control.SamplerStreamUID
func (EventOTLPLog) StreamsStr ¶
func (b EventOTLPLog) StreamsStr() []string
func (EventOTLPLog) UID ¶
func (e EventOTLPLog) UID() control.SamplerEventUID
type MetadataKey ¶
type MetadataKey string
const ( EventUID MetadataKey = "event_uid" EventRule MetadataKey = "event_rule" DigestUID MetadataKey = "digest_uid" )
type OTLPLog ¶
type OTLPLog interface { RawSampleOTLPLog | StructDigestOTLPLog | ValueDigestOTLPLog | EventOTLPLog | ConfigOTLPLog }
type OTLPLogs ¶
type OTLPLogs struct {
// contains filtered or unexported fields
}
func NewOTLPLogs ¶
func NewOTLPLogs() OTLPLogs
func OTLPLogsFrom ¶
func (*OTLPLogs) AppendSamplerOTLPLogs ¶
func (l *OTLPLogs) AppendSamplerOTLPLogs(resource string, sampler string) SamplerOTLPLogs
func (OTLPLogs) MoveAndAppendTo ¶
func (OTLPLogs) RemoveOTLPLogIf ¶
RemoveOTLPLogIf calls f sequentially for each element present in the otlp logs. f receives an interface containing a RawSampleOTLPLog, EventOTLPLog, etc. If f returns true, the element is removed from otlp logs.
type RawSampleOTLPLog ¶
type RawSampleOTLPLog struct {
// contains filtered or unexported fields
}
RawSampleOTLPLog implementation
func RawSampleOTLPLogFrom ¶
func RawSampleOTLPLogFrom(logRecord plog.LogRecord) RawSampleOTLPLog
func (RawSampleOTLPLog) SampleData ¶
func (RawSampleOTLPLog) SampleEncoding ¶
func (b RawSampleOTLPLog) SampleEncoding() Encoding
func (RawSampleOTLPLog) SampleRawData ¶
func (b RawSampleOTLPLog) SampleRawData() []byte
func (RawSampleOTLPLog) SampleType ¶
func (b RawSampleOTLPLog) SampleType() control.SampleType
func (RawSampleOTLPLog) SetSampleKey ¶
func (b RawSampleOTLPLog) SetSampleKey(key string)
func (RawSampleOTLPLog) SetSampleRawData ¶
func (RawSampleOTLPLog) SetStreams ¶
func (b RawSampleOTLPLog) SetStreams(streams []control.SamplerStreamUID)
func (RawSampleOTLPLog) SetTimestamp ¶
func (RawSampleOTLPLog) Streams ¶
func (b RawSampleOTLPLog) Streams() []control.SamplerStreamUID
func (RawSampleOTLPLog) StreamsStr ¶
func (b RawSampleOTLPLog) StreamsStr() []string
type Sample ¶
type Sample struct { Ts time.Time Type control.SampleType Streams []control.SamplerStreamUID Encoding Encoding Key string Data []byte Metadata map[MetadataKey]string }
Sample defines a sample to be exported
type SamplerOTLPLogs ¶
type SamplerOTLPLogs struct {
// contains filtered or unexported fields
}
func (SamplerOTLPLogs) AppendConfigOTLPLog ¶
func (s SamplerOTLPLogs) AppendConfigOTLPLog() ConfigOTLPLog
func (SamplerOTLPLogs) AppendEventOTLPLog ¶
func (s SamplerOTLPLogs) AppendEventOTLPLog() EventOTLPLog
func (SamplerOTLPLogs) AppendRawSampleOTLPLog ¶
func (s SamplerOTLPLogs) AppendRawSampleOTLPLog() RawSampleOTLPLog
func (*SamplerOTLPLogs) AppendStructDigestOTLPLog ¶
func (s *SamplerOTLPLogs) AppendStructDigestOTLPLog() StructDigestOTLPLog
func (SamplerOTLPLogs) AppendValueDigestOTLPLog ¶
func (s SamplerOTLPLogs) AppendValueDigestOTLPLog() ValueDigestOTLPLog
func (SamplerOTLPLogs) MoveAndAppendTo ¶
func (s SamplerOTLPLogs) MoveAndAppendTo(dest SamplerOTLPLogs)
type SamplerSamples ¶
SamplerSamples contains a group of samples that originate from the same resource e.g. operator, service...
type StructDigestOTLPLog ¶
type StructDigestOTLPLog struct {
// contains filtered or unexported fields
}
StructDigestOTLPLog implementation
func StructDigestOTLPLogFrom ¶
func StructDigestOTLPLogFrom(logRecord plog.LogRecord) StructDigestOTLPLog
func (StructDigestOTLPLog) SampleData ¶
func (StructDigestOTLPLog) SampleEncoding ¶
func (b StructDigestOTLPLog) SampleEncoding() Encoding
func (StructDigestOTLPLog) SampleRawData ¶
func (b StructDigestOTLPLog) SampleRawData() []byte
func (StructDigestOTLPLog) SampleType ¶
func (b StructDigestOTLPLog) SampleType() control.SampleType
func (StructDigestOTLPLog) SetSampleKey ¶
func (b StructDigestOTLPLog) SetSampleKey(key string)
func (StructDigestOTLPLog) SetSampleRawData ¶
func (StructDigestOTLPLog) SetStreams ¶
func (b StructDigestOTLPLog) SetStreams(streams []control.SamplerStreamUID)
func (StructDigestOTLPLog) SetTimestamp ¶
func (StructDigestOTLPLog) SetUID ¶
func (e StructDigestOTLPLog) SetUID(uid control.SamplerDigestUID)
func (StructDigestOTLPLog) Streams ¶
func (b StructDigestOTLPLog) Streams() []control.SamplerStreamUID
func (StructDigestOTLPLog) StreamsStr ¶
func (b StructDigestOTLPLog) StreamsStr() []string
func (StructDigestOTLPLog) UID ¶
func (e StructDigestOTLPLog) UID() control.SamplerDigestUID
type ValueDigestOTLPLog ¶
type ValueDigestOTLPLog struct {
// contains filtered or unexported fields
}
ValueDigestOTLPLog implementation
func ValueDigestOTLPLogFrom ¶
func ValueDigestOTLPLogFrom(logRecord plog.LogRecord) ValueDigestOTLPLog
func (ValueDigestOTLPLog) SampleData ¶
func (ValueDigestOTLPLog) SampleEncoding ¶
func (b ValueDigestOTLPLog) SampleEncoding() Encoding
func (ValueDigestOTLPLog) SampleRawData ¶
func (b ValueDigestOTLPLog) SampleRawData() []byte
func (ValueDigestOTLPLog) SampleType ¶
func (b ValueDigestOTLPLog) SampleType() control.SampleType
func (ValueDigestOTLPLog) SetSampleKey ¶
func (b ValueDigestOTLPLog) SetSampleKey(key string)
func (ValueDigestOTLPLog) SetSampleRawData ¶
func (ValueDigestOTLPLog) SetStreams ¶
func (b ValueDigestOTLPLog) SetStreams(streams []control.SamplerStreamUID)
func (ValueDigestOTLPLog) SetTimestamp ¶
func (ValueDigestOTLPLog) SetUID ¶
func (e ValueDigestOTLPLog) SetUID(uid control.SamplerDigestUID)
func (ValueDigestOTLPLog) Streams ¶
func (b ValueDigestOTLPLog) Streams() []control.SamplerStreamUID
func (ValueDigestOTLPLog) StreamsStr ¶
func (b ValueDigestOTLPLog) StreamsStr() []string
func (ValueDigestOTLPLog) UID ¶
func (e ValueDigestOTLPLog) UID() control.SamplerDigestUID