@@ -11,10 +11,6 @@ use url::Url;
1111
1212use super :: ConfigurationSection ;
1313
14- fn sample_rate_example ( ) -> f64 {
15- 0.5
16- }
17-
1814/// Propagation format for incoming and outgoing requests
1915#[ derive( Clone , Copy , Debug , Serialize , Deserialize , PartialEq , Eq , JsonSchema ) ]
2016#[ serde( rename_all = "lowercase" ) ]
@@ -70,7 +66,7 @@ pub struct TracingConfig {
7066 ///
7167 /// Defaults to `1.0` if not set.
7268 #[ serde( skip_serializing_if = "Option::is_none" ) ]
73- #[ schemars( example = "sample_rate_example" , range( min = 0.0 , max = 1.0 ) ) ]
69+ #[ schemars( example = 0.5 , range( min = 0.0 , max = 1.0 ) ) ]
7470 pub sample_rate : Option < f64 > ,
7571}
7672
@@ -123,41 +119,33 @@ impl MetricsConfig {
123119 }
124120}
125121
126- fn sentry_dsn_example ( ) -> & ' static str {
127- "https://public@host:port/1"
128- }
129-
130- fn sentry_environment_example ( ) -> & ' static str {
131- "production"
132- }
133-
134122/// Configuration related to the Sentry integration
135123#[ derive( Clone , Debug , Default , Serialize , Deserialize , JsonSchema ) ]
136124pub struct SentryConfig {
137125 /// Sentry DSN
138- #[ schemars( url, example = "sentry_dsn_example ") ]
126+ #[ schemars( url, example = & "https://public@host:port/1 ") ]
139127 #[ serde( skip_serializing_if = "Option::is_none" ) ]
140128 pub dsn : Option < String > ,
141129
142130 /// Environment to use when sending events to Sentry
143131 ///
144132 /// Defaults to `production` if not set.
145- #[ schemars( example = "sentry_environment_example ") ]
133+ #[ schemars( example = & "production ") ]
146134 #[ serde( skip_serializing_if = "Option::is_none" ) ]
147135 pub environment : Option < String > ,
148136
149137 /// Sample rate for event submissions
150138 ///
151139 /// Defaults to `1.0` if not set.
152140 #[ serde( skip_serializing_if = "Option::is_none" ) ]
153- #[ schemars( example = "sample_rate_example" , range( min = 0.0 , max = 1.0 ) ) ]
141+ #[ schemars( example = 0.5 , range( min = 0.0 , max = 1.0 ) ) ]
154142 pub sample_rate : Option < f32 > ,
155143
156144 /// Sample rate for tracing transactions
157145 ///
158146 /// Defaults to `0.0` if not set.
159147 #[ serde( skip_serializing_if = "Option::is_none" ) ]
160- #[ schemars( example = "sample_rate_example" , range( min = 0.0 , max = 1.0 ) ) ]
148+ #[ schemars( example = 0.5 , range( min = 0.0 , max = 1.0 ) ) ]
161149 pub traces_sample_rate : Option < f32 > ,
162150}
163151
0 commit comments