StructsΒ§
- Json
Stream πItem - LOKI_
INIT_ πSCHEMAS - Loki
Json πParser - Loki
Middle Item - This is the holder of the loki lines parsed from json or protobuf.
The generic here is either serde_json::Value or Vec
. Depending on the target destination, this can be converted to LokiRawItem or LokiPipeline. - Loki
PbParser - Loki
Pipeline - This is the line item prepared for the pipeline engine.
- Loki
RawItem - This is the line item for the Loki raw ingestion. Weβll persist the line in its whole, set labels into tags, and structured metadata into a big JSON.
- PbStream
Item
ConstantsΒ§
- LABEL_
KEY π - LINES_
KEY π - LOKI_
LINE_ πCOLUMN - LOKI_
LINE_ πCOLUMN_ NAME - LOKI_
PIPELINE_ πLABEL_ PREFIX - LOKI_
PIPELINE_ πMETADATA_ PREFIX - LOKI_
STRUCTURED_ πMETADATA_ COLUMN - LOKI_
TABLE_ πNAME - STREAMS_
KEY π
FunctionsΒ§
- extract_
item π - This is the flow of the Loki ingestion.
+ββββ+
| bytes |
+ββββ+
|
+βββββββββββ+βββββββββββ+
| | |
| JSON content type | PB content type |
+βββββββββββ+βββββββββββ+
| | |
| JsonStreamItem | PbStreamItem |
| stream: serde_json | stream: adapter |
+βββββββββββ+βββββββββββ+
| | |
| MiddleItem<serde_json> | MiddleItem
| +βββββββββββ+βββββββββββ+ \ / \ / \ / +βββββββββββ+ | MiddleItem | +βββββββββββ+ | +ββββββββ+ββββββββ+ | | +ββββββ+ +βββββββ+ | LokiRawItem | | LokiPipelineItem | +ββββββ+ +βββββββ+ | | +ββββββ+ +βββββββ+ | Loki ingest | | run_pipeline | +ββββββ+ +βββββββ+ - init_
row π - loki_
ingest - parse_
loki_ labels - since weβre hand-parsing the labels, if any error is encountered, weβll just skip the label note: pub here for bench usage ref:
- process_
labels π - prost_
ts_ πto_ nano