Skip to content

[improvement](ci) Harden Litefuse OTLP reliability - #67416

Draft
shuke987 wants to merge 2 commits into
apache:masterfrom
shuke987:codex/harden-litefuse-otel-ingestion
Draft

[improvement](ci) Harden Litefuse OTLP reliability#67416
shuke987 wants to merge 2 commits into
apache:masterfrom
shuke987:codex/harden-litefuse-otel-ingestion

Conversation

@shuke987

@shuke987 shuke987 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?\n\nIssue Number: None\n\nRelated PR: #67413\n\nProblem Summary:\n\nThis is a reliability follow-up stacked on #67413. The minimal OTLP migration restores Litefuse trace writes; this separate change hardens large-review transport and read-back verification without expanding the core fix.\n\nThe follow-up makes legacy pre-chunk size accounting linear for multi-thousand-observation traces, retries OTLP-defined transient HTTP failures, paginates the v2 Observations API, prefers v2 read-back with the legacy API as fallback, and requires the complete expected set of unique observation IDs before verification succeeds.\n\nThis PR is intentionally draft while #67413 is open. Its current diff includes the parent OTLP migration commit; after #67413 merges, the remaining diff will be the single reliability commit b8cb66a.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: Unit Test\n - python3 .github/scripts/test_emit_litefuse_otel_io.py (15 tests passed)\n - 500 randomized payload and chunk-limit cases preserved order, count, and exact encoded sizes\n - A 5,220-observation synthetic pre-chunk test preserved every event within the configured request limit\n- Behavior changed: No. This only strengthens Litefuse transport and verification.\n- Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Litefuse 26.2 rejects legacy trace-create, span-create, and generation-create events on /api/public/ingestion, so code review traces stopped after August 28 even though the review workflow stayed green. Convert the existing review event model to OTLP/HTTP JSON spans, send it to /api/public/otel/v1/traces with ingestion version 4, preserve hierarchy and Langfuse attributes, keep payload chunking, and surface response details for rejected requests.

### Release note

None

### Check List (For Author)

- Test: Unit Test / Manual test
    - python3 .github/scripts/test_emit_litefuse_otel_io.py
    - Live Litefuse OTLP canary write and read-back verification
- Behavior changed: No. This restores code review observability without changing review decisions.
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#67413

Problem Summary: The minimal OTLP migration restores Litefuse trace writes, but large reviews and transient failures still need stronger reliability guarantees. Make legacy pre-chunking linear for multi-thousand-observation traces, retry OTLP-defined transient HTTP failures, paginate v2 observation read-back, and require the full expected set of unique observation IDs before verification succeeds.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - python3 .github/scripts/test_emit_litefuse_otel_io.py
    - 500 randomized payload and chunk-limit cases
- Behavior changed: No. This only strengthens trace transport and verification.
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

shuke987 added a commit to shuke987/doris that referenced this pull request Sep 2, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#67416

Problem Summary: Preserve the actual subagent task on the root OTLP observation, avoid truncating spans that fit the full request limit during pre-chunking, and retry singleton HTTP 413 responses against a strictly smaller complete OTLP envelope instead of an arbitrary half-size ceiling.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - python3 .github/scripts/test_emit_litefuse_otel_io.py (11 tests passed)
    - 200 randomized OTLP chunk cases
- Behavior changed: Yes. OTLP trace export now preserves valid payload data and recovers viable singleton 413 requests.
- Does this need documentation: No
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