1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
use Client;
use DefaultFields;
use FormatFields;
/// Configuration of the [`TracyLayer`](super::TracyLayer) behaviour.
///
/// For most users [`DefaultConfig`] is going to be a good default choice, however advanced users
/// can implement this trait manually to override the formatter used or to otherwise modify the
/// behaviour of the `TracyLayer`.
///
/// # Examples
///
/// ```
/// use tracing_subscriber::fmt::format::DefaultFields;
///
/// struct TracyLayerConfig {
/// fmt: DefaultFields,
/// }
/// impl tracing_tracy::Config for TracyLayerConfig {
/// type Formatter = DefaultFields;
/// fn formatter(&self) -> &Self::Formatter {
/// &self.fmt
/// }
/// // The boilerplate ends here
///
/// /// Collect 32 frames in stack traces.
/// fn stack_depth(&self, _: &tracing::Metadata) -> u16 {
/// 32
/// }
///
/// /// Do not format fields into zone names.
/// fn format_fields_in_zone_name(&self) -> bool {
/// false
/// }
///
/// // etc.
/// }
/// ```
///
/// With this configuration `TracyLayer` will collect some call stacks and the formatting of the
/// zone names is different from the `DefaultConfig`.
/// A default configuration of the [`TracyLayer`](super::TracyLayer).
///
/// This type does not allow for any adjustment of the configuration. In order to customize
/// the behaviour of the layer implement the [`Config`] trait for your own type.
;