Skip to content

feat(request-trace): native S3 sink for request-trace records - #2

Closed
chethanuk wants to merge 1 commit into
mainfrom
fix/issue-11768-featrequesttrace-native-s3-sink-for-requesttrace
Closed

feat(request-trace): native S3 sink for request-trace records#2
chethanuk wants to merge 1 commit into
mainfrom
fix/issue-11768-featrequesttrace-native-s3-sink-for-requesttrace

Conversation

@chethanuk

Copy link
Copy Markdown
Owner

Native S3 sink for request-trace records

@chethanuk
chethanuk deployed to external_collaborator August 12, 2026 11:21 — with GitHub Actions Active
@codeant-ai

codeant-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 3e58019 Aug 12, 2026 · 11:21 11:25

@codeant-ai

codeant-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 12, 2026
Signed-off-by: ChethanUK <chethanuk@outlook.com>
@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Aug 12, 2026
@codeant-ai

codeant-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown

User description

Native S3 sink for request-trace records


CodeAnt-AI Description

Add direct S3 storage for request-trace records

What Changed

  • Request traces can now be sent directly to S3 by including s3 in DYN_REQUEST_TRACE_SINKS.
  • Records are uploaded as rolled, compressed JSONL objects organized by time, instance, startup, and segment, preventing writers and restarts from overwriting each other.
  • Pending records are uploaded during shutdown, and each rolled segment becomes its own S3 object.
  • S3 bucket, region, prefix, upload threshold, and flush interval can be configured through environment variables; missing bucket configuration produces a clear startup error.
  • Upload failures are retried by the AWS client and logged without stopping request processing.
  • Observability documentation now lists the S3 sink and its configuration.

Impact

✅ Direct request-trace archival to S3
✅ Fewer lost records during shutdown
✅ Collision-free trace segments across replicas and restarts

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@chethanuk
chethanuk force-pushed the fix/issue-11768-featrequesttrace-native-s3-sink-for-requesttrace branch from 3e58019 to 6173b36 Compare August 12, 2026 11:21
@chethanuk
chethanuk had a problem deploying to external_collaborator August 12, 2026 11:22 — with GitHub Actions Failure
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chethanuk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 71ba2f34-5cfc-46d2-87d6-44de659f0360

📥 Commits

Reviewing files that changed from the base of the PR and between 4ab1d69 and 6173b36.

⛔ Files ignored due to path filters (3)
  • Cargo.lock is excluded by !**/*.lock
  • lib/bindings/kvbm/Cargo.lock is excluded by !**/*.lock
  • lib/bindings/python/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • docs/observability/request-tracing.md
  • lib/llm/Cargo.toml
  • lib/llm/src/request_trace/config.rs
  • lib/llm/src/request_trace/sink.rs
  • lib/llm/src/telemetry/jsonl_gz.rs
  • lib/llm/src/telemetry/mod.rs
  • lib/llm/src/telemetry/s3_segment_sink.rs
  • lib/llm/tests/request_trace_s3_replay.rs
  • lib/runtime/src/config/environment_names.rs
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/issue-11768-featrequesttrace-native-s3-sink-for-requesttrace
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment on lines +230 to +236
let s3_roll_bytes = env_u64(&[env_request_trace::DYN_REQUEST_TRACE_S3_ROLL_BYTES])
.filter(|value| *value > 0)
.unwrap_or(DEFAULT_FILE_ROLL_BYTES);
let s3_flush_interval_ms =
env_u64(&[env_request_trace::DYN_REQUEST_TRACE_S3_FLUSH_INTERVAL_MS])
.filter(|value| *value > 0)
.unwrap_or(DEFAULT_FILE_FLUSH_INTERVAL_MS);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The S3-specific defaults are never used: when the S3 environment variables are absent, this configuration selects the file sink defaults of 256 MiB and 1 second instead of the declared S3 defaults of 64 MiB and 10 seconds. This changes S3 object size and upload cadence from the intended behavior; use the S3 constants in these fallbacks. [api mismatch]

Severity Level: Major ⚠️
- ⚠️ S3 objects use unintended 256 MiB roll thresholds.
- ⚠️ S3 uploads occur at unintended one-second intervals.
- ⚠️ Storage and request cadence differ from S3 defaults.

Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** lib/llm/src/request_trace/config.rs
**Line:** 230:236
**Comment:**
	*Api Mismatch: The S3-specific defaults are never used: when the S3 environment variables are absent, this configuration selects the file sink defaults of 256 MiB and 1 second instead of the declared S3 defaults of 64 MiB and 10 seconds. This changes S3 object size and upload cadence from the intended behavior; use the S3 constants in these fallbacks.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@chethanuk chethanuk closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant