-
Something I'm confused about, which relates to issue #9306. I am led to understand that logs and metric events are treated differently. I see examples with
However, by the time I get to a sink - let's say the console sink for simplicity - the "log" or "metric" wrapper has been removed. All I see is a JSON object:
Even in an intermediate transform I don't see the outer wrapper. For example, I would write
and not
So my question is: how does the distinction between logs and metric events make a difference in practice to the end user? Is it possible to distinguish between them in a transform or sink? If not, what purpose does the separation serve? EDIT: if I receive data from a general-purpose source - kafka say - what determines if this is a stream of logs or metrics? [^1] #9306 says these are from "the cue data". In the repo I found website/cue/reference.cue although I can't see where it's linked in the website. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hey @candlerb ! Apologies for the delay. These are good questions.
This is an error in our documentation (as you noted with link to #9306). It shouldn't be rendering the wrapping object with When Vector is dealing with events they will either be logs (which are essentially just key/value maps) or metrics (which are structs with a specific set of fields as described on https://vector.dev/docs/about/under-the-hood/architecture/data-model/metric/).
Currently the The one example we do currently have of sending logs and metrics over the same transport is the vector/lib/vector-core/proto/event.proto Lines 6 to 11 in 74c3f06 Does that make things clearer? Let me know if you have questions! I bumped #9306 again to see if we can resolve that to reduce confusion. |
Beta Was this translation helpful? Give feedback.
Hey @candlerb !
Apologies for the delay. These are good questions.
This is an error in our documentation (as you noted with link to #9306). It shouldn't be rendering the wrapping object with
log
andmetric
keys. This is an artifact of how we represent events as an enum in the cue configuration.When Vector is dealing with events they will either be logs (which are essentially just key/value maps) or metrics (which are structs with a specific set of fields as described on https://vector.dev/docs/about/under-the-hood/architecture/da…