@@ -9,12 +9,6 @@ use std::borrow::Cow;
99use std:: env;
1010use std:: str:: FromStr ;
1111
12- /// Default trace configuration
13- #[ deprecated( since = "0.23.0" , note = "Use Config::default() instead" ) ]
14- pub fn config ( ) -> Config {
15- Config :: default ( )
16- }
17-
1812/// Tracer configuration
1913#[ derive( Debug ) ]
2014#[ non_exhaustive]
@@ -32,98 +26,6 @@ pub struct Config {
3226 pub resource : Cow < ' static , Resource > ,
3327}
3428
35- impl Config {
36- /// Specify the sampler to be used.
37- #[ deprecated(
38- since = "0.27.1" ,
39- note = "Config is becoming private. Please use Builder::with_sampler(...) instead."
40- ) ]
41- pub fn with_sampler < T : crate :: trace:: ShouldSample + ' static > ( mut self , sampler : T ) -> Self {
42- self . sampler = Box :: new ( sampler) ;
43- self
44- }
45-
46- /// Specify the id generator to be used.
47- #[ deprecated(
48- since = "0.27.1" ,
49- note = "Config is becoming private. Please use Builder::with_id_generator(...) instead."
50- ) ]
51- pub fn with_id_generator < T : IdGenerator + ' static > ( mut self , id_generator : T ) -> Self {
52- self . id_generator = Box :: new ( id_generator) ;
53- self
54- }
55-
56- /// Specify the maximum number of events that can be recorded per span.
57- #[ deprecated(
58- since = "0.27.1" ,
59- note = "Config is becoming private. Please use Builder::with_max_events_per_span(...) instead."
60- ) ]
61- pub fn with_max_events_per_span ( mut self , max_events : u32 ) -> Self {
62- self . span_limits . max_events_per_span = max_events;
63- self
64- }
65-
66- /// Specify the maximum number of attributes that can be recorded per span.
67- #[ deprecated(
68- since = "0.27.1" ,
69- note = "Config is becoming private. Please use Builder::with_max_attributes_per_span(...) instead."
70- ) ]
71- pub fn with_max_attributes_per_span ( mut self , max_attributes : u32 ) -> Self {
72- self . span_limits . max_attributes_per_span = max_attributes;
73- self
74- }
75-
76- /// Specify the maximum number of links that can be recorded per span.
77- #[ deprecated(
78- since = "0.27.1" ,
79- note = "Config is becoming private. Please use Builder::with_max_links_per_span(...) instead."
80- ) ]
81- pub fn with_max_links_per_span ( mut self , max_links : u32 ) -> Self {
82- self . span_limits . max_links_per_span = max_links;
83- self
84- }
85-
86- /// Specify the maximum number of attributes one event can have.
87- #[ deprecated(
88- since = "0.27.1" ,
89- note = "Config is becoming private. Please use Builder::with_max_attributes_per_event(...) instead."
90- ) ]
91- pub fn with_max_attributes_per_event ( mut self , max_attributes : u32 ) -> Self {
92- self . span_limits . max_attributes_per_event = max_attributes;
93- self
94- }
95-
96- /// Specify the maximum number of attributes one link can have.
97- #[ deprecated(
98- since = "0.27.1" ,
99- note = "Config is becoming private. Please use Builder::with_max_attributes_per_link(...) instead."
100- ) ]
101- pub fn with_max_attributes_per_link ( mut self , max_attributes : u32 ) -> Self {
102- self . span_limits . max_attributes_per_link = max_attributes;
103- self
104- }
105-
106- /// Specify all limit via the span_limits
107- #[ deprecated(
108- since = "0.27.1" ,
109- note = "Config is becoming private. Please use Builder::with_span_limits(...) instead."
110- ) ]
111- pub fn with_span_limits ( mut self , span_limits : SpanLimits ) -> Self {
112- self . span_limits = span_limits;
113- self
114- }
115-
116- /// Specify the attributes representing the entity that produces telemetry
117- #[ deprecated(
118- since = "0.27.1" ,
119- note = "Config is becoming private. Please use Builder::with_resource(...) instead."
120- ) ]
121- pub fn with_resource ( mut self , resource : Resource ) -> Self {
122- self . resource = Cow :: Owned ( resource) ;
123- self
124- }
125- }
126-
12729impl Default for Config {
12830 /// Create default global sdk configuration.
12931 fn default ( ) -> Self {
0 commit comments