Open Feuermurmel opened 3 months ago
@Feuermurmel is this a doc or a code bug? And which document did you see this sentence in? (URL?)
is this a doc or a code bug?
I don't know. I did not find enough guidance in the Promtail docs to figure out what the general concepts are, e.g. behind the separation of the extraction map and labels, which stages and other parts of the configuration (e.g. relabeling) affect which, etc. I think the docs are unclear or ambiguous in many places when it comes to data transformation in Promtail.
I think what would help would be:
And which document did you see this sentence in? (URL?)
It's this page: https://grafana.com/docs/loki/latest/send-data/promtail/stages/pack/
I got here by clicking on "Contribute to docs" on the bottom of the page. This automatically placed the file name in the title. I hoped that would be enough context.
I think the following sentence is incorrect:
In my tests, I was unable to insert a label into the packed JSON object, while inserting a value from the extraction map works.
I'm using the following pipeline, which inserts the entry
foo_extraction_map = hello-1
into the extraction map and the entryfoo_labels = hello-2
into the labels:The produced log line (when running with
--dry-run
) looks like this:This means that
pack
was able to "see"extraction_map_entry
from the extraction map, but notlabels_entry
from the labels.