Skip to content

Conversation

@nikhilsinhaparseable
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Jan 14, 2026

update incorrect log source error
add telemetry type to the error message

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error messages for log source mismatches by including additional context information, providing clearer diagnostics when log ingestion source validation fails.

✏️ Tip: You can customize this high-level summary in your review settings.

update incorrect log source error
add telemetry type to the error message
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

The PostError::IncorrectLogSource variant signature was updated to include telemetry type information as a second parameter alongside the expected log source. Error construction and pattern matching throughout the ingest handler were updated to reflect this change, providing more detailed context in error responses.

Changes

Cohort / File(s) Summary
Error variant enhancement
src/handlers/http/ingest.rs
Modified PostError::IncorrectLogSource from single LogSource payload to tuple (LogSource, String) containing expected log source and telemetry type. Updated error construction in setup_otel_stream and ResponseError implementation pattern matching to handle the new variant signature.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

for next release

Poem

🐰 An error now tells a richer tale,
With telemetry type in every detail,
The log source dances with context so bright,
Making debugging a true delight! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It lacks required sections like the goals of the PR, chosen solution rationale, and testing/documentation checklists from the template. Expand the description to include the goal of the PR, rationale for the chosen solution, and complete the provided checklist items (testing, comments, documentation).
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: error message in otel ingestion' directly addresses the main change—improving the error message in OpenTelemetry log ingestion by adding telemetry type context.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac1e6e0 and ac2ab17.

📒 Files selected for processing (1)
  • src/handlers/http/ingest.rs
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-18T18:01:22.834Z
Learnt from: nikhilsinhaparseable
Repo: parseablehq/parseable PR: 1405
File: src/handlers/http/modal/utils/ingest_utils.rs:271-292
Timestamp: 2025-08-18T18:01:22.834Z
Learning: In Parseable's ingestion validation, validate_stream_for_ingestion is designed to prevent regular log ingestion endpoints (ingest() and post_event()) from ingesting into streams that exclusively contain OTEL traces or metrics. The function allows mixed streams (regular logs + OTEL) but blocks ingestion into OTEL-only streams, maintaining architectural separation between regular log and OTEL ingestion pathways.

Applied to files:

  • src/handlers/http/ingest.rs
📚 Learning: 2025-03-26T06:44:53.362Z
Learnt from: nikhilsinhaparseable
Repo: parseablehq/parseable PR: 1263
File: src/handlers/http/ingest.rs:300-310
Timestamp: 2025-03-26T06:44:53.362Z
Learning: In Parseable, every stream is always associated with a log_source - no stream can exist without a log_source. For otel-traces and otel-metrics, strict restrictions are implemented where ingestion is rejected if a stream already has a different log_source format. However, regular logs from multiple log_sources can coexist in a single stream.

Applied to files:

  • src/handlers/http/ingest.rs
📚 Learning: 2025-08-18T17:59:31.642Z
Learnt from: nikhilsinhaparseable
Repo: parseablehq/parseable PR: 1405
File: src/handlers/http/modal/utils/ingest_utils.rs:149-156
Timestamp: 2025-08-18T17:59:31.642Z
Learning: The time_partition parameter in push_logs() function in src/handlers/http/modal/utils/ingest_utils.rs is determined by the caller (flatten_and_push_logs). OSS callers pass None, enterprise callers pass the appropriate value (None or Some<>), and OTEL callers always pass None. The push_logs() function should not add additional time partition logic since it's already handled at the caller level.

Applied to files:

  • src/handlers/http/ingest.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Build Default aarch64-apple-darwin
  • GitHub Check: Build Default aarch64-unknown-linux-gnu
  • GitHub Check: Build Default x86_64-pc-windows-msvc
  • GitHub Check: Build Default x86_64-unknown-linux-gnu
  • GitHub Check: Build Kafka x86_64-unknown-linux-gnu
  • GitHub Check: Build Kafka aarch64-apple-darwin
  • GitHub Check: coverage
  • GitHub Check: Quest Smoke and Load Tests for Distributed deployments
  • GitHub Check: Quest Smoke and Load Tests for Standalone deployments
🔇 Additional comments (3)
src/handlers/http/ingest.rs (3)

185-188: LGTM!

The error construction correctly includes both the expected log source and telemetry type, providing clearer guidance to users about the required x-p-log-source header value for the specific OTEL endpoint they're calling.


490-491: LGTM!

The enhanced error message clearly communicates both the required header value and the telemetry context, improving the developer experience when debugging incorrect OTEL ingestion configurations.


522-522: LGTM!

The pattern matching is correctly updated to reflect the new two-field variant signature.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nitisht nitisht merged commit f9082fa into parseablehq:main Jan 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants