From 1c303e83949e1f2a9feb30176faaf070fb9b55fc Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Wed, 23 Aug 2023 08:10:02 -0700 Subject: [PATCH] enhancement(websocket sink): Allow any data type depending on configured codec (#18295) * enhancement(websocket sink): Allow any data type depending on configured codec I had mistakenly thought this was done in https://github.com/vectordotdev/vector/pull/18060 but it was not. Signed-off-by: Jesse Szwedko * Fix input type determination Signed-off-by: Jesse Szwedko --------- Signed-off-by: Jesse Szwedko --- src/sinks/websocket/config.rs | 2 +- .../cue/reference/components/sinks/websocket.cue | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/sinks/websocket/config.rs b/src/sinks/websocket/config.rs index 6027273ee4275..76a3391ff0eac 100644 --- a/src/sinks/websocket/config.rs +++ b/src/sinks/websocket/config.rs @@ -94,7 +94,7 @@ impl SinkConfig for WebSocketSinkConfig { } fn input(&self) -> Input { - Input::log() + Input::new(self.encoding.config().input_type()) } fn acknowledgements(&self) -> &AcknowledgementsConfig { diff --git a/website/cue/reference/components/sinks/websocket.cue b/website/cue/reference/components/sinks/websocket.cue index f38a55091b4e9..d46777404de88 100644 --- a/website/cue/reference/components/sinks/websocket.cue +++ b/website/cue/reference/components/sinks/websocket.cue @@ -67,9 +67,16 @@ components: sinks: websocket: { } input: { - logs: true - metrics: null - traces: false + logs: true + metrics: { + counter: true + distribution: true + gauge: true + histogram: true + summary: true + set: true + } + traces: true } telemetry: metrics: {