Skip to content

reva_upload_sessions_bytes_received counts upload sessions, not bytes #930

Closed

Description

@pbleser-oc

The counter reva_upload_sessions_bytes_received (pkg/rhttp/datatx/metrics/metrics.go) is incremented once per upload session, when all of its bytes have arrived and it goes into postprocessing (pkg/storage/pkg/decomposedfs/upload/upload.go). Its help text says so, but its name suggests an amount of data: by Prometheus' naming conventions, _bytes is for values in bytes. On a dashboard, it's easily mistaken for the upload volume.

To reproduce: upload a few files to OpenCloud (default posix driver), e.g. 546 WebDAV PUTs of about 50 bytes each. reva_upload_sessions_bytes_received is then 546, like reva_upload_sessions_initiated and reva_upload_sessions_finalized.

Suggestions:

  • a name that says what it counts, e.g. reva_upload_sessions_received_total
  • a counter for the actual volume, e.g. reva_upload_received_bytes_total, incremented by the session's size at the same place
  • the comment of UploadSessionsFinalized is copied from the one above ("…that have received all bytes"), but it counts completed sessions
  • none of the counters in this package have the _total suffix

Renaming is a breaking change for anyone who graphs these; nothing in opencloud or opencloud-charts uses reva_upload_sessions_bytes_received today.

Seen on reva main 2f017ae86 and OpenCloud main 5d745311f7.

Activity

  1. added theissue type on Oct 28, 2026
  2. moved this from Qualification to No status in OpenCloud Team Boardon Oct 29, 2026
  3. micbar commented on Oct 29, 2026

    @micbar
    Member

    Naming 🙈

    The event is “All Bytes have been received by the server” which means “all data is safe on the storage but we do not know yet what the postprocessing outcome will be”

    That means, this counts the raw number of successful uploads to openCloud before postprocessing.

    So, works as designed but bad naming.

  4. pbleser-oc commented on Oct 29, 2026

    @pbleser-oc
    MemberAuthor

    Thanks for clarifying.

    Agreed, renaming isn't worth breaking existing dashboards.

    I'll make the help text explicit instead (sessions whose data was fully received, before postprocessing; sessions, not bytes), and fix the comment copied onto UploadSessionsFinalized and the typo "uploads sessions" in the other help texts while at it.

    No metric gets renamed.

  5. added a commit that references this issue on Nov 5, 2026
    1c5c559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions