Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions src/otel/otel_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ pub fn collect_json_from_value(key: &String, value: OtelValue) -> Map<String, Va
Value::String(String::from_utf8_lossy(&bytes_val).to_string()),
);
}
OtelValue::StringValueStrindex(str_index) => {
tracing::warn!(
"StringValueStrindex is not supported in key-value lists, index: {str_index}"
);
}
}

value_json
Expand Down Expand Up @@ -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}"
);
}
}
}
}
Expand Down
15 changes: 9 additions & 6 deletions src/otel/traces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ mod tests {
),
),
}),
key_strindex: 0,
},
KeyValue {
key: "http.method".to_string(),
Expand All @@ -473,6 +474,7 @@ mod tests {
),
),
}),
key_strindex: 0,
},
]
}
Expand Down Expand Up @@ -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{
Expand Down
Loading