Skip to content

Commit d44a5f8

Browse files
committed
fix json order in test
1 parent fd7d2b9 commit d44a5f8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

opentelemetry-proto/src/transform/logs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ pub mod tonic {
118118
#[cfg(not(feature = "populate-logs-event-name"))]
119119
attributes
120120
},
121+
event_name: log_record.event_name.unwrap_or_default().into(),
121122
severity_number: severity_number.into(),
122123
severity_text: log_record.severity_text.map(Into::into).unwrap_or_default(),
123124
body: log_record.body.clone().map(Into::into),

opentelemetry-proto/tests/json_serde.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ mod json_serde {
11871187
"Example log record",
11881188
))),
11891189
}),
1190+
event_name: "test_log_event".to_string(),
11901191
attributes: vec![
11911192
KeyValue {
11921193
key: String::from("string.attribute"),
@@ -1359,7 +1360,8 @@ mod json_serde {
13591360
"droppedAttributesCount": 0,
13601361
"flags": 0,
13611362
"traceId": "5b8efff798038103d269b633813fc60c",
1362-
"spanId": "eee19b7ec3c1b174"
1363+
"spanId": "eee19b7ec3c1b174",
1364+
"eventName": "test_log_event"
13631365
}
13641366
],
13651367
"schemaUrl": ""
@@ -1465,7 +1467,8 @@ mod json_serde {
14651467
}
14661468
}
14671469
}
1468-
]
1470+
],
1471+
"eventName": "test_log_event"
14691472
}
14701473
]
14711474
}

0 commit comments

Comments
 (0)