Skip to content

refactor(request-trace): reuse object-store S3 client [DYN-3844] - #13002

Merged
PeaBrane merged 5 commits into
mainfrom
rupei/request-trace-object-store
Aug 11, 2026
Merged

PeaBrane merged 5 commits into
mainfrom
rupei/request-trace-object-store

Conversation

@PeaBrane

@PeaBrane PeaBrane commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace the request-trace S3 sink's feature-gated aws-config and aws-sdk-s3 client with the object_store S3 client already used by dynamo-llm.
  • Preserve the upload contract: gzipped JSONL objects use application/gzip, each request has a 30-second timeout, and the full operation is bounded to 90 seconds across three attempts.
  • Keep the public request-trace-s3 feature while removing its two direct AWS SDK dependency edges.
  • Continue supporting environment credentials, IMDS, IRSA, and Pod Identity. Shared AWS config and credential profiles are no longer loaded; the request-tracing documentation now states that behavior and the exact region precedence.

Dependency Footprint

56 production packages removed, 0 added.

Locked production graph Before After Delta
Python wheel 726 670 -56
Python wheel with FFmpeg 730 674 -56

aws-config and aws-sdk-s3 are no longer reachable. object_store was already present, so the replacement adds no packages.

The lockfiles may retain inactive AWS package records, but identical cargo tree --locked comparisons confirm that they are not reachable from these production graphs and are not compiled as part of them.

Validation

  • cargo test -p dynamo-llm --no-default-features --features request-trace-s3 request_trace::s3_sink --lib — 7 passed, including an in-memory upload round trip that verifies the object body and content type.
  • Locked cargo tree comparisons for x86_64-unknown-linux-gnu confirmed that aws-config and aws-sdk-s3 are unreachable from the dynamo-llm and production Python graphs; the production graphs remove 56 packages and add none.
  • cargo clippy -p dynamo-llm --no-default-features --features request-trace-s3 --lib -- -D warnings.
  • cargo clippy --no-default-features -- -D warnings and cargo fmt from lib/llm.
  • fern check and fern docs broken-links.

No live AWS environment was used for an end-to-end upload test; the local test exercises the new ObjectStore::put_opts path without external credentials or infrastructure.


Open in Devin Review

Summary by CodeRabbit

  • Improvements
    • Request trace uploads to S3 now use the shared object-store configuration and credential handling.
    • Added bounded upload attempts, retry timeouts, operation timeouts, and gzip content-type metadata for trace files.
    • S3 region resolution is documented as AWS_REGION, then AWS_DEFAULT_REGION, then us-east-1.
  • Documentation
    • Clarified S3 credential and region behavior, including supported configuration sources and upload failure handling.

Signed-off-by: PeaBrane <yanrpei@gmail.com>
@PeaBrane
PeaBrane requested review from a team as code owners August 11, 2026 05:37
@github-actions github-actions Bot added refactor documentation Improvements or additions to documentation labels Aug 11, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread lib/llm/src/request_trace/s3_sink.rs Resolved
Comment thread lib/llm/src/request_trace/s3_sink.rs Resolved
@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The S3 request trace sink now uses the shared object_store abstraction. AWS SDK dependencies were removed, upload timeouts and retries were configured through the object store, tests now use InMemory, and related documentation was updated.

Changes

S3 object-store migration

Layer / File(s) Summary
Object-store configuration
lib/llm/Cargo.toml, lib/bindings/python/Cargo.toml, lib/llm/src/request_trace/s3_sink.rs, docs/fern/pages/reference/observability/environment-variables.mdx, docs/fern/pages/reference/observability/request-traces.mdx
The S3 feature no longer enables direct AWS SDK dependencies. The sink builds an environment-configured AmazonS3Builder store. Documentation describes the updated credential provider chain and region fallback.
Worker upload path and validation
lib/llm/src/request_trace/s3_sink.rs
The worker and uploader use Arc<dyn ObjectStore>. Uploads use put_opts with gzip metadata and an operation timeout. Tests use InMemory and verify uploaded bytes and content type.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the implementation, compatibility, dependency impact, validation, and limitations, but omits the required Related Issues section and reviewer-start guidance. Add the required Related Issues section with an issue link or no-issue confirmation, and identify the files where reviewers should start.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: reusing the object-store S3 client for request tracing.

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

Comment thread lib/llm/src/request_trace/s3_sink.rs Resolved
@datadog-official

This comment has been minimized.

Signed-off-by: PeaBrane <yanrpei@gmail.com>
@PeaBrane PeaBrane changed the title refactor(request-trace): reuse object-store S3 client refactor(request-trace): reuse object-store S3 client [DYN-3844] Aug 11, 2026
Comment thread lib/llm/src/request_trace/s3_sink.rs Resolved

@dmitry-tokarev-nv dmitry-tokarev-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@PeaBrane
PeaBrane merged commit b57d034 into main Aug 11, 2026
121 checks passed
@PeaBrane
PeaBrane deleted the rupei/request-trace-object-store branch August 11, 2026 22:58
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 refactor size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants