bevy_fleet

Crates.iobevy_fleet
lib.rsbevy_fleet
version0.1.0
created_at2025-10-21 17:44:48.183347+00
updated_at2025-10-21 17:44:48.183347+00
descriptionbevy swarm diagnostic, event, metric, and telemetry client
homepage
repositoryhttps://github.com/aberration-technology/bevy_fleet
max_upload_size
id1894205
size229,793
Mitchell Mosure (mosure)

documentation

README

bevy_fleet 🌍📐📊

test License crates.io

bevy fleet plugin, see the demo dashboard for live telemetry.

install

cargo add bevy_fleet
# or Cargo.toml
# bevy_fleet = "0.1"

optional features

  • git-version - embed git metadata in every payload

  • sysinfo_plugin - tap Bevy's system info diagnostics

  • bevy_render - include GPU / adapter details

what you get

  • bevy plugin with async publisher (tokio runtime, never blocks main thread)

  • automatic capture of diagnostics + metrics + machine info

  • tracing-friendly event collector and panic hook

  • production-grade OTLP exporter (official OpenTelemetry pipeline)

  • test companion server for local dev (cargo run -p bevy_fleet_test_server)

  • managed and self-hosted dashboards

  • wasm support

  • network diagnostics plugin (e.g. latency, packet loss)

  • authentication

  • fleet performance optimization (e.g. graphics settings tuning)

  • register asset load failure events

  • register render pipeline events (e.g. validation error)

usage

use bevy::prelude::*;
use bevy::diagnostic::FrameTimeDiagnosticsPlugin;
use bevy_fleet::{FleetPlugin, FleetConfig};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(FrameTimeDiagnosticsPlugin)
        .add_plugins(FleetPlugin {
            config: FleetConfig {
                app_id: "example".into(),
                ..Default::default()
            },
        })
        .run();
}

emitting events

Use Bevy's message API to write Fleet events from any system:

use bevy::prelude::*;
use bevy_fleet::FleetEvent;

fn track_player_kill(mut events: MessageWriter<FleetEvent>) {
    events.write(
        FleetEvent::new("player.kill")
            .with_data("weapon", "rocket_launcher")
            .with_data("map", "de_dust2"),
    );
}

telemetry payload (json)

{
  "app_id": "example",
  "timestamp": 1760840585,
  "session_id": "session-68f44a99-ce4-27c87004",
  "session_stats": {
    "payloads_published": 12,
    "metrics_collected": 72,
    "diagnostics_recorded": 120
  },
  "machine_info": { "os": "Windows", "cpu_count": 16, "total_memory_bytes": 102757092557 },
  "metrics": [{ "name": "fps.value", "value": 60.10 }],
  "diagnostics": [{ "name": "frame_time.smoothed", "value": "16.63" }],
  "events": [],
  "panics": []
}
  • metrics carry numeric values (ideal for dashboards)

  • diagnostics keep smoothed + history metadata (no duplication)

  • events + panics stream through tracing-friendly collectors

examples

  • basic – minimal setup, custom metric
  • advanced – event tracking + custom diagnostics
  • test_server – local telemetry viewer (cargo run -p bevy_fleet_test_server --bin test_server)
# start companion server
cargo run -p bevy_fleet_test_server --bin test_server

# in another terminal
cargo run --example basic

bevy support

bevy_fleet bevy
0.1 0.17

license

licensed under either of

at your option.

contribution

unless you say otherwise, any contribution submitted for inclusion in the project is dual-licensed as above.

Commit count: 0

cargo fmt