mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
fix: improve alert mcp (#10065)
This commit is contained in:
@@ -77,6 +77,11 @@ impl Ingest for Ingester {
|
||||
}
|
||||
}
|
||||
StreamType::Metrics => {
|
||||
let stream_name = if stream_name.is_empty(){
|
||||
None
|
||||
} else {
|
||||
Some(stream_name.as_str())
|
||||
};
|
||||
let log_ingestion_type: IngestionType = req
|
||||
.ingestion_type
|
||||
.unwrap_or_default()
|
||||
@@ -88,7 +93,7 @@ impl Ingest for Ingester {
|
||||
)))
|
||||
} else {
|
||||
let data = bytes::Bytes::from(in_data.data);
|
||||
crate::service::metrics::json::ingest(&org_id, data, internal_user)
|
||||
crate::service::metrics::json::ingest(&org_id, stream_name, data, internal_user)
|
||||
.await
|
||||
.map(|_| ()) // we don't care about success response
|
||||
.map_err(|e| Error::IngestionError(format!("error in ingesting metrics {e}")))
|
||||
|
||||
@@ -80,7 +80,7 @@ pub async fn json(
|
||||
return MetaHttpResponse::too_many_requests(e);
|
||||
}
|
||||
|
||||
let mut resp = match metrics::json::ingest(&org_id, body, user).await {
|
||||
let mut resp = match metrics::json::ingest(&org_id, None, body, user).await {
|
||||
Ok(v) => {
|
||||
if v.code == StatusCode::OK.as_u16() {
|
||||
MetaHttpResponse::json(v)
|
||||
|
||||
Reference in New Issue
Block a user