Skip to content

Commit

Permalink
limit spans returned by traces list endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mellowagain committed Feb 19, 2025
1 parent 430687f commit 6c79f00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions otel-worker-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ async-trait = { version = "0.1", default-features = false }
axum = { workspace = true, default-features = false, features = [
"json",
"matched-path",
"query"
] }
bytes = { version = "1.0", default-features = false }
otel-worker-macros = { version = "0.1.0", path = "../otel-worker-macros" }
Expand Down
2 changes: 1 addition & 1 deletion otel-worker-core/src/data/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl From<api::models::Span> for Span {

#[derive(Deserialize)]
pub struct QueryParams {
limit: Option<u32>,
pub limit: Option<u32>,
}

#[derive(Clone, Debug, Serialize, PartialEq)]
Expand Down
2 changes: 1 addition & 1 deletion otel-worker/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Store for D1Store {
trace_id: &HexEncodedId,
) -> Result<Vec<models::Span>> {
SendFuture::new(async {
self.fetch_all(self.sql_builder.span_list_by_trace(), &[trace_id.into()])
self.fetch_all(self.sql_builder.span_list_by_trace(None), &[trace_id.into()])
.await
})
.await
Expand Down

0 comments on commit 6c79f00

Please sign in to comment.