Skip to content

Report upload error status in metrics#1264

Merged
biglittlebigben merged 7 commits into
mainfrom
benjamin/upload_error_status
Jun 23, 2026
Merged

Report upload error status in metrics#1264
biglittlebigben merged 7 commits into
mainfrom
benjamin/upload_error_status

Conversation

@biglittlebigben

Copy link
Copy Markdown
Contributor

Summary

  • Label the pipeline_uploads failure counter with the HTTP status class (4xx, 5xx, or internal) instead of a single failure value, so user errors (bad creds, missing bucket, access denied) can be distinguished from infrastructure issues.
  • Extract the status code from storage errors via errors.As(&storage.ErrorWithStatusCode{}).
  • Switch ErrUploadFailed to %w so the underlying storage error is preserved through the wrap.

Dependencies

Depends on livekit/storage#30 (introduces storage.ErrorWithStatusCode). go.mod currently has a local replace pointing at ../storage so the branches can be reviewed together; this will be dropped once the storage PR merges.

Test plan

  • go test ./pkg/pipeline/sink/uploader/... — new TestUploadErrorHasStatusCode covers 4xx and 5xx S3 responses.
  • Verify the pipeline_uploads Prometheus metric shows status={success,4xx,5xx,internal} in a real egress run.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

AV-sync stats summary: view in run #28048493260

@biglittlebigben biglittlebigben merged commit d465904 into main Jun 23, 2026
16 checks passed
@biglittlebigben biglittlebigben deleted the benjamin/upload_error_status branch June 23, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants