debugbundle 1.0.0-alpha.1

Safe, bounded runtime error reporting for Rust, Axum and Actix Web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;
#[test]
fn span_registry_has_instance_wide_count_bytes_and_close_bounds() {
    let mut registry = Registry::default();
    for id in 0..130 {
        registry.insert("layer", id, None, json!({"fields":{},"name":"technical"}));
    }
    assert_eq!(registry.entries.len(), 128);
    registry.close("layer", 0);
    registry.insert("another", 0, None, json!({"fields":{},"name":"other"}));
    assert_eq!(registry.entries.len(), 128);
    registry.detach("layer");
    assert_eq!(registry.entries.len(), 1);
    registry.detach("another");
    assert_eq!(registry.bytes, 0);
}