* Refactor json pipeline stage to have a Run function
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Allow for dropping log lines in json pipeline stage if they are not
valid json strings
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* fix linting
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Clean up new malformed json test.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Address some review feedback.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Refactor json pipeline stage test to use testify assert instead of
t.Errorf
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Update changelog and docs with new drop malformed option
Signed-off-by: Callum Styan <callumstyan@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
* Update docs based on Karen's comments.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
* [6099](https://github.com/grafana/loki/pull/6099/files) **cstyan**: Drop lines with malformed JSON in Promtail JSON pipeline stage
* [6136](https://github.com/grafana/loki/pull/6136) **periklis**: Add support for alertmanager header authorization
* [6102](https://github.com/grafana/loki/pull/6102) **timchenko-a**: Add multi-tenancy support to lambda-promtail
* [5971](https://github.com/grafana/loki/pull/5971) **kavirajk**: Record statistics about metadata queries such as labels and series queries in `metrics.go` as well
level.Debug(j.logger).Log("msg","failed to convert source value to string","source",*j.cfg.Source,"err",err,"type",reflect.TypeOf(extracted[*j.cfg.Source]))