Skip to content

Commit 24950c0

Browse files
committed
Parse OTLP logs in doc processor (#4807)
* Rename `OtlpTrace*` to `OtlpTraces*` * Parse OTLP logs in doc processor
1 parent 8f21026 commit 24950c0

File tree

8 files changed

+479
-190
lines changed

8 files changed

+479
-190
lines changed

config/tutorials/otel-traces/kafka-source.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 0.7
22
source_id: kafka-source
33
source_type: kafka
4-
input_format: otlp_trace_proto
4+
input_format: otlp_traces_proto
55
params:
66
topic: otlp_spans
77
client_params:

quickwit/quickwit-common/src/rate_limited_tracing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ macro_rules! rate_limited_warn {
8686
}
8787
#[macro_export]
8888
macro_rules! rate_limited_error {
89-
($unit:literal=$limit:literal, $($args:tt)*) => {
89+
($unit:ident=$limit:literal, $($args:tt)*) => {
9090
$crate::rate_limited_tracing::rate_limited_tracing!(error, $unit=$limit, $($args)*)
9191
};
9292
}

quickwit/quickwit-config/src/source_config/mod.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,17 @@ impl TestableForRegression for SourceConfig {
182182
pub enum SourceInputFormat {
183183
#[default]
184184
Json,
185-
OtlpTraceJson,
186-
#[serde(alias = "otlp_trace_proto")]
187-
OtlpTraceProtobuf,
185+
OtlpLogsJson,
186+
#[serde(alias = "otlp_logs_proto")]
187+
OtlpLogsProtobuf,
188+
#[serde(alias = "otlp_trace_json")]
189+
OtlpTracesJson,
190+
#[serde(
191+
alias = "otlp_trace_proto",
192+
alias = "otlp_trace_protobuf",
193+
alias = "otlp_traces_proto"
194+
)]
195+
OtlpTracesProtobuf,
188196
#[serde(alias = "plain")]
189197
PlainText,
190198
}

quickwit/quickwit-config/src/source_config/serialize.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ impl SourceConfigForSerialization {
110110
if let Some(transform_config) = &self.transform {
111111
if matches!(
112112
self.input_format,
113-
SourceInputFormat::OtlpTraceJson | SourceInputFormat::OtlpTraceProtobuf
113+
SourceInputFormat::OtlpLogsJson
114+
| SourceInputFormat::OtlpLogsProtobuf
115+
| SourceInputFormat::OtlpTracesJson
116+
| SourceInputFormat::OtlpTracesProtobuf
114117
) {
115118
bail!("VRL transforms are not supported for OTLP input formats");
116119
}

0 commit comments

Comments
 (0)