bevyengine / bevyengine/bevy

Include the "schedule" span inside system trace scopes for multithreaded executors.

Open
#23,450 0 comments 0 reactions 0 assignees View on GitHub
A-Diagnostics A-ECS C-Usability D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?
There are many cases where a tracing subscriber would need to know from what schedule an event came from.
Im currently implementing my own tracing subscriber, so log messages show up in a console window in my game and would like to filter by schedule. This is especially usefull but also hard when handling schedules executing concurently (pipelined rendering for example).

## What solution would you like?
Capture Span::current() when executing systems.

## What alternative(s) have you considered?
Just one schedule executing at a time: just set a resource at the start of the schedule to the schedules name.
And there could also be a solution for piplined rendering, but it would require a bunch of locks and would be way complexer then just patching this in.

Contributor guide

Open the contributing guide

Research direction

Start by locating Bevy's multithreaded executor and the path that executes systems within schedules. Trace how the current span is handled there, then verify that capturing Span::current() makes the schedule context visible to tracing subscribers during concurrent system execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.