Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
089c73a
Merge branch 'perf/otel-flatten-rows' into feat/otlp-chunked-ingest
VibeSWE Nov 24, 2026
63d96da
test(otel): let OTEL_BENCH_ITERS override the benchmark iterations
VibeSWE Nov 23, 2026
301b0fc
test(otel): measure the memory an OTLP request holds while its rows a…
VibeSWE Nov 24, 2026
fb1d042
feat(otel): hand OTLP rows to a sink one at a time, collected in boun…
VibeSWE Nov 24, 2026
1c7a7a8
feat(otel): stage an OTLP request in chunks, answering partial succes…
VibeSWE Nov 24, 2026
fce3183
fix(otel): refuse an OTLP request whose rows would expand past 1024x …
VibeSWE Nov 24, 2026
e35071e
fix(otel): size metric, exemplar, key-value list and array maps by th…
VibeSWE Nov 24, 2026
f42f8d1
fix(otel): bound the memory a JSON text log body is parsed into, befo…
VibeSWE Nov 24, 2026
c1cf097
fix(json): charge the null cells of column tables built from arrays o…
VibeSWE Nov 24, 2026
f49a4ba
test(otel): report the resident memory of the worst requests and of 1…
VibeSWE Nov 24, 2026
8438ecb
style(otel): name the stage closure type of the memory tests, drop a …
VibeSWE Nov 24, 2026
fcc4f37
feat(otel): decode an OTLP protobuf request one leaf record at a time
VibeSWE Nov 24, 2026
f686bfb
fix(otel): refuse a body that is not a protobuf request before readin…
VibeSWE Nov 24, 2026
47b78aa
feat(otel): read an OTLP protobuf request in one pass, capping its ro…
VibeSWE Nov 24, 2026
9e2b9bd
perf(otel): make the decoded-size scan of large records cheaper
VibeSWE Nov 24, 2026
05a391c
fix(otel): fit shared row maps whose attributes repeat keys
VibeSWE Nov 24, 2026
5a0c18d
fix(otel): keep a JSON text log body as text when its parse is over o…
VibeSWE Nov 24, 2026
0b44f8c
fix(otel): cap expansion by the body, answer empty requests without a…
VibeSWE Nov 24, 2026
d9e52e3
test(otel): pin that outer protobuf levels are read in constant memory
VibeSWE Nov 24, 2026
f1411ec
docs(otel): correct what an exporter does after a 5xx once chunks are…
VibeSWE Nov 24, 2026
e694900
docs(otel): document that chunks are typed against the previous chunk…
VibeSWE Nov 24, 2026
18ef444
test(otel): confirm the expansion total counts the Prometheus labels …
VibeSWE Nov 24, 2026
31dacf5
style(otel): format the regression tests, name their row builder type
VibeSWE Nov 24, 2026
2266bc1
test(otel): pin the rows of a seeded corpus of generated OTLP requests
VibeSWE Nov 24, 2026
6c8c507
test(otel): measure record-level maps with repeated keys against row_…
VibeSWE Nov 24, 2026
9846231
perf(otel): hash the metric series identity without copying its labels
VibeSWE Nov 24, 2026
711fd00
perf(otel): size each row map for every field merged into it
VibeSWE Nov 24, 2026
10e37b0
perf(otel): insert attribute values by reference instead of cloning them
VibeSWE Nov 24, 2026
d4c8442
perf(otel): build a log record row in place instead of in a scratch map
VibeSWE Nov 24, 2026
9977636
perf(otel): insert the fixed severity, flags, kind and status fields
VibeSWE Nov 24, 2026
0d9fab2
fix(otel): cap what one request stages at 1024 times the payload limit
VibeSWE Nov 24, 2026
76dbb2a
docs(otel): drop a pointer to a report that is not in the repository
VibeSWE Nov 24, 2026
4b9c3e6
Merge branch 'feat/otlp-protobuf-ingest' into feat/otlp-chunked-ingest
VibeSWE Nov 24, 2026
e93543c
Merge remote-tracking branch 'origin/main' into feat/otlp-chunked-ingest
VibeSWE Nov 24, 2026
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
16 changes: 9 additions & 7 deletions src/handlers/http/ingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::event::format::known_schema::{self, KNOWN_SCHEMA_LIST};
use crate::event::format::{self, EventFormat, LogSource, LogSourceEntry};
use crate::event::{self, FORMAT_KEY, USER_AGENT_KEY};
use crate::handlers::http::modal::utils::ingest_utils::{
ingest_helper, otel_success_response, process_otel_content, validate_stream_for_ingestion,
ingest_helper, otel_response, process_otel_content, validate_stream_for_ingestion,
};
use crate::handlers::{
DatasetTag, EXTRACT_LOG_KEY, LOG_SOURCE_KEY, STREAM_NAME_HEADER_KEY, TELEMETRY_TYPE_KEY,
Expand Down Expand Up @@ -312,9 +312,10 @@ pub async fn handle_otel_logs_ingestion(
e
})?;

process_otel_content(&req, body, &stream_name, &log_source, TelemetryType::Logs).await?;
let ingested =
process_otel_content(&req, body, &stream_name, &log_source, TelemetryType::Logs).await?;

Ok(otel_success_response(&req))
Ok(otel_response(&req, TelemetryType::Logs, &ingested))
}

// Handler for POST /v1/metrics to ingest OTEL metrics
Expand All @@ -338,7 +339,7 @@ pub async fn handle_otel_metrics_ingestion(
e
})?;

process_otel_content(
let ingested = process_otel_content(
&req,
body,
&stream_name,
Expand All @@ -347,7 +348,7 @@ pub async fn handle_otel_metrics_ingestion(
)
.await?;

Ok(otel_success_response(&req))
Ok(otel_response(&req, TelemetryType::Metrics, &ingested))
}

// Handler for POST /v1/traces to ingest OTEL traces
Expand All @@ -371,9 +372,10 @@ pub async fn handle_otel_traces_ingestion(
e
})?;

process_otel_content(&req, body, &stream_name, &log_source, TelemetryType::Traces).await?;
let ingested =
process_otel_content(&req, body, &stream_name, &log_source, TelemetryType::Traces).await?;

Ok(otel_success_response(&req))
Ok(otel_response(&req, TelemetryType::Traces, &ingested))
}

// Handler for POST /api/v1/logstream/{logstream}
Expand Down
14 changes: 12 additions & 2 deletions src/handlers/http/kinesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,18 @@ mod tests {
.iter()
.map(|row| {
let mut row = row.clone();
crate::utils::json::flatten::flatten(&mut row, "_", None, None, None, false)
.unwrap();
crate::utils::json::flatten::flatten(
&mut row,
"_",
None,
None,
None,
false,
&mut crate::utils::json::flatten::FlattenBudget::new(
crate::utils::json::flatten::GENEROUS_LIMITS,
),
)
.unwrap();
serde_json::to_vec(&row).unwrap().len()
})
.sum();
Expand Down
10 changes: 9 additions & 1 deletion src/handlers/http/logstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ pub async fn detect_schema(Json(json): Json<Value>) -> Result<impl Responder, St
});
}
};
if let Err(err) = flatten::flatten(&mut flattened_json, "_", None, None, None, false) {
if let Err(err) = flatten::flatten(
&mut flattened_json,
"_",
None,
None,
None,
false,
&mut budget,
) {
return Err(StreamError::Custom {
msg: err.to_string(),
status: StatusCode::BAD_REQUEST,
Expand Down
Loading
Loading