-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(aws_s3 source): add S3 download processing duration metric #24289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add histogram metric `s3_object_processing_duration_seconds` to track how long S3 object downloads and processing takes. The metric includes `bucket` and `status` labels to help identify slow buckets and distinguish successful vs failed downloads. The timing captures the full download lifecycle from the GetObject API call through complete ByteStream body consumption.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
thomasqueirozb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be a nice addition! I just think we need to redesign the metrics a bit. Additionally new metrics need to be documented in website/cue/reference/components/sources/internal_metrics.cue.
src/sources/aws_s3/sqs.rs
Outdated
| let processing_status = if read_error.is_some() { | ||
| "error" | ||
| } else { | ||
| "success" | ||
| }; | ||
| emit!(S3ObjectProcessingCompleted { | ||
| bucket: &s3_event.s3.bucket.name, | ||
| duration: download_start.elapsed(), | ||
| status: processing_status, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should emit different events here. One on success and another on failure. I don't think any other metric/histogram in Vector uses status as a way to track success/failure but we instead opt to emit different metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I debated on this a bit, but SGTM. Will fix
|
sorry I kinda screwed up the git history here b/c I was juggling a few PRs for this package. This is what changed if that helps: e49004b |
Summary
Add a histogram metric
s3_object_download_duration_secondsto the AWS S3 source to track how long S3 object download + decompression + framing + decoding takes. This helps operators identify slow buckets and debug S3 performance issues.The metric includes two labels:
The timing captures the full download lifecycle from the GetObject API call through complete ByteStream body consumption (including decompression).
Vector configuration
How did you test this PR?
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
vector/src/internal_events/http_client.rs
Lines 46 to 73 in bc654a7
vector/src/internal_events/aws_sqs.rs
Lines 11 to 45 in bc654a7
SqsMessageProcessingError pattern we followed