Closed victorserbu2709 closed 4 days ago
Thanks for filing this @victorserbu2709 including the details about the request payload. Could you try setting compression: snappy
? That will cause the loki
sink to use the protobuf encoding. I think structured metadata support may have only been added to the protobuf protocol and not to the JSON one.
If that is the case, we should make that clearer in the docs and/or make it explicit error to configure structured_metadata
without configuring compression
to be snappy
. This is, assuming, that we can't just add structured metadata support when using the JSON API.
cc/ @maxboone since you implemented this support
Thank you for your quick response @jszwedko. I set compression: snappy and then checked in grafana that event has structured metadata. Thank you
cc/ @maxboone since you implemented this support
I see that there is support for it with the JSON API by adding the object at the end of the log line. I'll see if I can open an MR with that tomorrow.
Gave it a shot, but building for unit tests keep running out of memory, so will have to try on another machine tomorrow.
cc/ @maxboone since you implemented this support
I see that there is support for it with the JSON API by adding the object at the end of the log line. I'll see if I can open an MR with that tomorrow.
Gave it a shot, but building for unit tests keep running out of memory, so will have to try on another machine tomorrow.
That would be great π Much simpler than trying to document that the option can only be used with snappy/protobuf. It could be useful to deprecate and remove the old JSON API though. I'm unsure it it offers anything that the protobuf API doesn't π€
A note for the community
Problem
I tried to use structured metadata with loki sink but i observed that these are not sent. Simple replication:
This is the http body that is receive by nginx proxy
i tried with vector rpm 0.41.0 and also with nighly build
Configuration
Version
vector 0.42.0 (x86_64-unknown-linux-gnu 51dcf8d 2024-10-06 04:01:48.303006361)
Debug Output