Skip to content

Commit a24cbd3

Browse files
feat(opentelemetry source): Include source_type on logs received by opentelemetry source (#13939)
* feat(opentelemetry source): Include source_type on logs received by opentelemetry source * trigger ci * +update unit test
1 parent 4ccf57c commit a24cbd3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/opentelemetry/convert.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ impl From<ResourceLog> for Event {
139139
rl.log_record.dropped_attributes_count,
140140
);
141141

142+
le.insert(log_schema().source_type_key(), Bytes::from("opentelemetry"));
143+
142144
le.into()
143145
}
144146
}

src/sources/opentelemetry/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ async fn receive_grpc_logs() {
116116
("dropped_attributes_count", 3.into()),
117117
("timestamp", Utc.timestamp_nanos(1).into()),
118118
("observed_timestamp", Utc.timestamp_nanos(2).into()),
119+
("source_type", "opentelemetry".into()),
119120
]);
120121
let expect_event = Event::from(LogEvent::from(expect_vec));
121122
assert_eq!(actual_event, expect_event);

0 commit comments

Comments
 (0)