Skip to content
Merged
Changes from all commits
Commits
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
11 changes: 7 additions & 4 deletions src/handlers/http/ingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ pub async fn setup_otel_stream(

let log_source = LogSource::from(log_source.to_str().unwrap());
if log_source != expected_log_source {
return Err(PostError::IncorrectLogSource(expected_log_source));
return Err(PostError::IncorrectLogSource(
expected_log_source,
telemetry_type.to_string(),
));
}

let stream_name = stream_name.to_str().unwrap().to_owned();
Expand Down Expand Up @@ -484,8 +487,8 @@ pub enum PostError {
OtelNotSupported,
#[error("The stream {0} is reserved for internal use and cannot be ingested into")]
InternalStream(String),
#[error(r#"Please use "x-p-log-source: {0}" for ingesting otel logs"#)]
IncorrectLogSource(LogSource),
#[error(r#"Please use "x-p-log-source: {0}" for ingesting otel {1} data"#)]
IncorrectLogSource(LogSource, String),
#[error("Ingestion is not allowed in Query mode")]
IngestionNotAllowed,
#[error("Missing field for time partition in json: {0}")]
Expand Down Expand Up @@ -516,7 +519,7 @@ impl actix_web::ResponseError for PostError {
| Header(_)
| Invalid(_)
| InternalStream(_)
| IncorrectLogSource(_)
| IncorrectLogSource(_, _)
| IngestionNotAllowed
| MissingTimePartition(_)
| KnownFormat(_)
Expand Down
Loading