diff --git a/Cargo.lock b/Cargo.lock index c0caa5faf..c7b334d59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3562,7 +3562,7 @@ dependencies = [ [[package]] name = "opentelemetry" version = "0.31.0" -source = "git+https://github.com/parmesant/opentelemetry-rust/?rev=45fb828769e6ade96d56ca1f5fa14cf0986a5341#45fb828769e6ade96d56ca1f5fa14cf0986a5341" +source = "git+https://github.com/open-telemetry/opentelemetry-rust/?branch=main#b096b70b2ffe9beb65a716cf47d5e5db80a9e930" dependencies = [ "futures-core", "futures-sink", @@ -3575,7 +3575,7 @@ dependencies = [ [[package]] name = "opentelemetry-proto" version = "0.31.0" -source = "git+https://github.com/parmesant/opentelemetry-rust/?rev=45fb828769e6ade96d56ca1f5fa14cf0986a5341#45fb828769e6ade96d56ca1f5fa14cf0986a5341" +source = "git+https://github.com/open-telemetry/opentelemetry-rust/?branch=main#b096b70b2ffe9beb65a716cf47d5e5db80a9e930" dependencies = [ "base64", "const-hex", @@ -3583,7 +3583,6 @@ dependencies = [ "opentelemetry_sdk", "prost 0.14.1", "serde", - "serde_json", "tonic", "tonic-prost", ] @@ -3591,13 +3590,14 @@ dependencies = [ [[package]] name = "opentelemetry_sdk" version = "0.31.0" -source = "git+https://github.com/parmesant/opentelemetry-rust/?rev=45fb828769e6ade96d56ca1f5fa14cf0986a5341#45fb828769e6ade96d56ca1f5fa14cf0986a5341" +source = "git+https://github.com/open-telemetry/opentelemetry-rust/?branch=main#b096b70b2ffe9beb65a716cf47d5e5db80a9e930" dependencies = [ "futures-channel", "futures-executor", "futures-util", "opentelemetry", "percent-encoding", + "portable-atomic", "rand 0.9.2", "thiserror 2.0.17", ] @@ -3903,6 +3903,12 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + [[package]] name = "potential_utf" version = "0.1.4" diff --git a/Cargo.toml b/Cargo.toml index 3c18adebc..f9a407535 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,7 +97,7 @@ tokio-util = { version = "0.7" } # ] } # add custom branch with fix until it gets merged -opentelemetry-proto = { git = "https://github.com/parmesant/opentelemetry-rust/", rev = "45fb828769e6ade96d56ca1f5fa14cf0986a5341", features = [ +opentelemetry-proto = { git = "https://github.com/open-telemetry/opentelemetry-rust/", branch = "main", features = [ "gen-tonic", "with-serde", "logs", diff --git a/src/otel/otel_utils.rs b/src/otel/otel_utils.rs index cff4dcb8f..88cb788d8 100644 --- a/src/otel/otel_utils.rs +++ b/src/otel/otel_utils.rs @@ -66,6 +66,11 @@ pub fn collect_json_from_value(key: &String, value: OtelValue) -> Map { + tracing::warn!( + "StringValueStrindex is not supported in key-value lists, index: {str_index}" + ); + } } value_json @@ -102,6 +107,11 @@ fn collect_json_from_array_value(array_value: &ArrayValue) -> Value { let nested_json = collect_json_from_key_value_list(kv_list.clone()); json_array.push(Value::Object(nested_json)); } + OtelValue::StringValueStrindex(str_index) => { + tracing::warn!( + "StringValueStrindex is not supported in array values, index: {str_index}" + ); + } } } } diff --git a/src/otel/traces.rs b/src/otel/traces.rs index 70bcf7e59..5aba0b248 100644 --- a/src/otel/traces.rs +++ b/src/otel/traces.rs @@ -463,6 +463,7 @@ mod tests { ), ), }), + key_strindex: 0, }, KeyValue { key: "http.method".to_string(), @@ -473,6 +474,7 @@ mod tests { ), ), }), + key_strindex: 0, }, ] } @@ -871,12 +873,13 @@ mod tests { let traces_data = TracesData { resource_spans: vec![ResourceSpans { resource: Some(Resource { - attributes: vec![KeyValue { - key: "deployment.environment".to_string(), - value: Some(AnyValue { - value: Some(opentelemetry_proto::tonic::common::v1::any_value::Value::StringValue("production".to_string())), - }), - }], + attributes: vec![KeyValue { + key: "deployment.environment".to_string(), + value: Some(AnyValue { + value: Some(opentelemetry_proto::tonic::common::v1::any_value::Value::StringValue("production".to_string())), + }), + key_strindex: 0, + }], dropped_attributes_count: 0, entity_refs: vec![ EntityRef{