Skip to content

Commit 9cd3809

Browse files
fix: home api (#1273)
get log_source from memory map instead of checking stream.json from storage as there may be stream.json of an ingestor which is offline and has never migrated to a newer version
1 parent af096e4 commit 9cd3809

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/prism/home/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ pub async fn generate_home_response(key: &SessionKey) -> Result<HomeResponse, Pr
204204
}
205205
stream_wise_stream_json.insert(stream.clone(), stream_jsons.clone());
206206

207-
let log_source = &stream_jsons[0].clone().log_source;
207+
let log_source = PARSEABLE
208+
.get_stream(&stream)
209+
.map_err(|e| PrismHomeError::Anyhow(e.into()))?
210+
.get_log_source();
208211

209212
// if log_source_format is otel-metrics, set DataSetType to metrics
210213
//if log_source_format is otel-traces, set DataSetType to traces

0 commit comments

Comments
 (0)