Skip to content

Commit

Permalink
Parse OTLP logs in doc processor (#4807)
Browse files Browse the repository at this point in the history
* Rename `OtlpTrace*` to `OtlpTraces*`

* Parse OTLP logs in doc processor
  • Loading branch information
guilload committed Mar 29, 2024
1 parent 8f21026 commit 24950c0
Show file tree
Hide file tree
Showing 8 changed files with 479 additions and 190 deletions.
2 changes: 1 addition & 1 deletion config/tutorials/otel-traces/kafka-source.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 0.7
source_id: kafka-source
source_type: kafka
input_format: otlp_trace_proto
input_format: otlp_traces_proto
params:
topic: otlp_spans
client_params:
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-common/src/rate_limited_tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ macro_rules! rate_limited_warn {
}
#[macro_export]
macro_rules! rate_limited_error {
($unit:literal=$limit:literal, $($args:tt)*) => {
($unit:ident=$limit:literal, $($args:tt)*) => {
$crate::rate_limited_tracing::rate_limited_tracing!(error, $unit=$limit, $($args)*)
};
}
Expand Down
14 changes: 11 additions & 3 deletions quickwit/quickwit-config/src/source_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,17 @@ impl TestableForRegression for SourceConfig {
pub enum SourceInputFormat {
#[default]
Json,
OtlpTraceJson,
#[serde(alias = "otlp_trace_proto")]
OtlpTraceProtobuf,
OtlpLogsJson,
#[serde(alias = "otlp_logs_proto")]
OtlpLogsProtobuf,
#[serde(alias = "otlp_trace_json")]
OtlpTracesJson,
#[serde(
alias = "otlp_trace_proto",
alias = "otlp_trace_protobuf",
alias = "otlp_traces_proto"
)]
OtlpTracesProtobuf,
#[serde(alias = "plain")]
PlainText,
}
Expand Down
5 changes: 4 additions & 1 deletion quickwit/quickwit-config/src/source_config/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ impl SourceConfigForSerialization {
if let Some(transform_config) = &self.transform {
if matches!(
self.input_format,
SourceInputFormat::OtlpTraceJson | SourceInputFormat::OtlpTraceProtobuf
SourceInputFormat::OtlpLogsJson
| SourceInputFormat::OtlpLogsProtobuf
| SourceInputFormat::OtlpTracesJson
| SourceInputFormat::OtlpTracesProtobuf
) {
bail!("VRL transforms are not supported for OTLP input formats");
}
Expand Down
Loading

0 comments on commit 24950c0

Please sign in to comment.