mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #168] [MERGED] feat(snapshot): add artifact dimension to OSS upload observability #224
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/168
Author: @huajq
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @yingdi-shan
Base:
main← Head:feat/snapshot-upload-artifact-metrics📝 Commits (1)
ef2a15efeat(snapshot): add artifact dimension to OSS upload observability📊 Changes
3 files changed (+154 additions, -27 deletions)
View changed files
📝
src/observability/prometheus.rs(+36 -0)📝
src/snapshot/repository/backends/oss/client.rs(+56 -4)📝
src/snapshot/repository/backends/oss/repository.rs(+62 -23)📄 Description
What
agentenv_snapshot_oss_upload_bytes_total,and the
put_file/put_bytesseries ofagentenv_snapshot_oss_operation_duration_seconds) gain anartifactlabel:
rootfs_layer/attached_drive_layer/memory_layer/vm_state/manifest/record/alias.put_filelogskey,artifact,size_bytes,elapsed_msat info level.Why
Upload metrics could not distinguish memory layers from disk layers, and
canceled uploads left no per-artifact trace. Slow or canceled snapshot
publishes can now be attributed to a specific artifact.
Related issue
None.
Scope and non-goals
In scope: the OSS repository upload path and the shared
MetricGuard.Non-goals: no timeout/retry behavior changes; POSIX backend, ACR/regctl
path, and the download/resolver path are untouched.
Design and behavior changes
MetricGuard::operation_artifactlabel variant; guards droppedmid-flight still record
status="canceled", now with the artifact.OssUploadArtifactenum threaded through the publish flow;DiskImageSubjectmaps to rootfs/attached-drive artifact.debug!("uploaded managed layer to oss")(themanaged-layer key already contains the digest) and its
digestparameter.Compatibility and operations
artifactlabel;sum by (operation)-style queries remain valid. Rollback is a revert.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
make test-unit: covered by CI; the unit tests of the touched module wererun directly (see above).
path.
services/, generated code, docs, benchmarks: not affected.Risks and reviewer notes
put_file/put_bytescarry
artifact); valid Prometheus, existing aggregations unaffected.src/snapshot/repository/backends/oss/client.rs,src/snapshot/repository/backends/oss/repository.rs,src/observability/prometheus.rs.Checklist
(Label threading only; no metrics-assertion harness exists — covered by
the existing snapshot test suite and clippy.)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.