vector icon indicating copy to clipboard operation
vector copied to clipboard

fix(loki sink): Loki fails to parse protobuf payload with '"' in label value.

Open alexgavrushenko opened this issue 2 months ago • 0 comments

Summary

When using Loki sink with JSON enconding, label values with '"' and '' chars are pushed to Loki normally, while Protobuf encoding causes errors like: 'couldn't parse labels: ... parse error: unexpected character inside braces' or 'couldn't parse labels: ... parse error: unexpected string'

Vector configuration

Default Vector configuration with Loki sink

How did you test this PR?

There is a unit-test

Change Type

  • [x] Bug fix
  • [ ] New feature
  • [ ] Non-functional (chore, refactoring, docs)
  • [ ] Performance

Is this a breaking change?

  • [ ] Yes
  • [x] No

Does this PR include user facing changes?

  • [ ] Yes. Please add a changelog fragment based on our guidelines.
  • [x] No. A maintainer will apply the no-changelog label to this PR.

References

N/A

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

alexgavrushenko avatar Nov 05 '25 15:11 alexgavrushenko