Documentation
¶
Overview ¶
Package otlpdecode converts OTLP protobuf directly into native signal batches. Converters retain scratch and borrow input bytes until their next conversion. An ingest sink must copy the data it retains.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dropped ¶
type Dropped struct {
// Points is the number of number data points carrying neither as_double nor as_int.
Points int
// Exemplars is the number of exemplars with no home: those on histogram,
// exponential-histogram and summary points (stored by classic decomposition, which leaves an
// exemplar no unambiguous series to hang off), those on a dropped point, and value-less ones.
Exemplars int
}
Dropped counts what a metrics conversion could not represent. It mirrors github.com/oteldb/storage/otlp/pdataconv.Dropped field for field, so the direct decoder and the pdata path report the same numbers for the same request.
type LogsConverter ¶
type LogsConverter struct {
// contains filtered or unexported fields
}
LogsConverter decodes an OTLP ExportLogsServiceRequest into log.Logs. It retains the batch and the scratch it is built from, so a converter reused across requests allocates nothing in steady state. It is not safe for concurrent use; pool one per in-flight request.
func (*LogsConverter) Convert ¶
Convert decodes a serialized ExportLogsServiceRequest, returning how many records it could not represent (a record carrying no usable time — see [LogsConverter.record]).
The returned batch aliases src: every key, string value, body and id is a sub-slice of it. It stays valid until the next Convert on this converter, and src must not be recycled until the write consuming the batch has returned.
type MetricsConverter ¶
type MetricsConverter struct {
// contains filtered or unexported fields
}
MetricsConverter decodes an OTLP ExportMetricsServiceRequest into metric.Metrics. It retains the batch and the scratch it is built from, so a converter reused across requests allocates nothing in steady state. It is not safe for concurrent use; pool one per in-flight request.
func (*MetricsConverter) Convert ¶
Convert decodes a serialized ExportMetricsServiceRequest, returning what it could not represent.
The returned batch aliases src: every attribute key, string value, metric name and unit is a sub-slice of it. It stays valid until the next Convert on this converter, and src must not be recycled until the write consuming the batch has returned.
type ProfilesConverter ¶
type ProfilesConverter struct {
// contains filtered or unexported fields
}
ProfilesConverter decodes an OTLP ExportProfilesServiceRequest into profile.Profiles. It retains the batch and the scratch it is built from, so a converter reused across requests allocates nothing in steady state. It is not safe for concurrent use; pool one per in-flight request.
func (*ProfilesConverter) Convert ¶
func (c *ProfilesConverter) Convert(src []byte) (*profile.Profiles, error)
Convert decodes a serialized ExportProfilesServiceRequest.
The returned batch aliases src: every string-table entry, id and attribute key is a sub-slice of it. It stays valid until the next Convert on this converter, and src must not be recycled until the write consuming the batch has returned.
type TracesConverter ¶
type TracesConverter struct {
// contains filtered or unexported fields
}
TracesConverter decodes an OTLP ExportTraceServiceRequest into trace.Traces. It retains the batch and the scratch it is built from, so a converter reused across requests allocates nothing in steady state. It is not safe for concurrent use; pool one per in-flight request.
func (*TracesConverter) Convert ¶
func (c *TracesConverter) Convert(src []byte) (*trace.Traces, error)
Convert decodes a serialized ExportTraceServiceRequest.
The returned batch aliases src: every key, name, id and string value is a sub-slice of it. It stays valid until the next Convert on this converter, and src must not be recycled until the write consuming the batch has returned.