SIGN IN SIGN UP

feat(new source): add initial `websocket` source (#23449)

* Refactor: extract websocket connect logic

* Refactor: extract backoff

* Refactor: extract ping utility

* Refactor: extract is_closed

* Add WsMessageReceived internal event

* Add websocket source implementation

* Handle binary messages

* [review] make check-clippy happy

* [review] Remove name field from WebSocketEvent

It was suggested to use the `WebSocketConfig::NAME` constant (it's
macro-generated), but it seemed more sensible to define an ad hoc
constant instead of importing the struct just to use this const.

* [review] Make WsMessageReceived compliant with the component specification

* [review] Move ping back into websocket common logic

* [review] improve visibility of pub items

* [review] feature-gate websocket source and move it

* chore: fix imports & clippy

* chore: drop enterprise code

* refactor: use common config for websocket source & sink

* fix: remove manual pong reply to prevent timeout

* chore: add missing source type metadata

* docs: add more generic docstring for websocket config

* chore: add missing punctuation for logs

* chore: add tests to validate schema

* chore: add internal events for websocket source errors

* chore: add integration test for websocket source

* feat: allow initial_message to be sent to server

* feat: add support for custom ping and pong

* chore: clean up ping variable

* chore: simplify main loop

* chore: remove redundant get_decoding_config helper

* refactor: improve encapsulation of websocket source

* chore: rename send_initial_message -> maybe_send_initial_message

* refactor: move reconnect logic to separate function

* refactor: move ping logic + timeout checking to wrapper

* chore: add test for binary events

* chore: add test for reconnection

* chore: avoid infinite reconnect

* chore: add test for rejected initial message

* chore: add pong timeout test

* chore: add test for connection timeout

* chore: update config for websocket

* chore: add changelog fragment

* chore: handle arms for message in separate function

* chore: improve ordering of functions

* chore: drop dangling binary decode error

* chore: clippy

* fix: ping timeout not triggering correctly

* refactor: move string matching logic to pong enum

* chore: make record_pong into const

* chore: update test for custom pong

* docs: update websocket source

* refactor: improve error handling with dedicated enum

* chore: add 'reconnected' log message

* refactor: use websocket instead of ws shorthand for types

* chore: add new docs for websocket source

* chore: add missing dep for integration test

* chore: add missing import for integration test

* chore: exposet internal events for integration test

* chore: only enable healthcheck for sink

* chore: fix docs

* chore: update docs

---------

Co-authored-by: Leonardo Barcaroli <leonardo@koyeb.com>
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>
B
Benjamin Dornel committed
6a17a5423d886d98e96d8a4bc24bbfb03a6785d3
Parent: 9bd70fd
Committed by GitHub <noreply@github.com> on 8/1/2025, 3:55:48 PM