Skip to content

Conversation

@scott-rc
Copy link
Contributor

This adds a way to make WS <event> spans become root spans that link back to their original parent.

Examples

Make WS open spans be root:

const socket = withWSOpenRoot(() => new WebSocket("wss://echo.websocket.org"));

Make WS open and WS close spans be root:

let socket;
withWSOpenRoot(() => {
	withWSCloseRoot() => {
		socket = new WebSocket("wss://echo.websocket.org");
	});
});

@scott-rc scott-rc requested a review from airhorns July 30, 2025 20:53
@scott-rc scott-rc merged commit 7beb009 into main Jul 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants