File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 15
15
{
16
16
cargoTOML = builtins . fromTOML ( builtins . readFile ../Cargo.toml ) ;
17
17
outputHashes = {
18
- "azalia-0.1.0" = "sha256-+fvpmHxO/QPQlDU7GMARx3oIJuEcCjrDj4xfaUc4CX8 =" ;
18
+ "azalia-0.1.0" = "sha256-y0crnoet3Jg1+UA86K6ucPb6tv98f895vyjt02dgAAE =" ;
19
19
} ;
20
20
21
21
rustflags = stdenv :
Original file line number Diff line number Diff line change @@ -156,8 +156,7 @@ mod tests {
156
156
S {
157
157
tracing: Config :: OpenTelemetry ( otel:: Config :: default ( ) )
158
158
} ,
159
- hcl:: from_str( "tracing \" opentelemetry\" {\n kind = \" grpc\" \n url = \" grpc://localhost:4318\" \n }\n " )
160
- . unwrap( )
159
+ hcl:: from_str( "tracing \" opentelemetry\" {\n url = \" grpc://localhost:4318\" \n }\n " ) . unwrap( )
161
160
) ;
162
161
163
162
assert_eq ! (
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ pub struct Config {
76
76
pub labels : HashMap < String , String > ,
77
77
78
78
/// Which kind of OpenTelemetry Collector we should configure for?
79
- #[ serde( default ) ]
79
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
80
80
#[ deprecated(
81
81
since = "4.0.6" ,
82
82
note = "this field will be removed in v4.1.0, ume will determine the kind of collector from the url's scheme"
@@ -96,8 +96,10 @@ impl TryFromEnv for Config {
96
96
Ok ( Config {
97
97
kind : match env ! ( "UME_TRACING_OTEL_COLLECTOR" ) {
98
98
Ok ( res) => match res. as_str ( ) {
99
- "grpc" | "grpcs" | "" => Some ( Kind :: Grpc ) ,
99
+ "grpc" | "grpcs" => Some ( Kind :: Grpc ) ,
100
100
"http" | "https" => Some ( Kind :: Http ) ,
101
+ "" => None ,
102
+
101
103
out => return Err ( eyre ! ( format!( "unknown otel collector kind [{out}]" ) ) ) ,
102
104
} ,
103
105
You can’t perform that action at this time.
0 commit comments