Skip to content

[R2 instrumentation] Add tags for requests#5006

Merged
jmorrell-cloudflare merged 6 commits intomainfrom
jmorrell/r2-add-attributes-3
Sep 15, 2025
Merged

[R2 instrumentation] Add tags for requests#5006
jmorrell-cloudflare merged 6 commits intomainfrom
jmorrell/r2-add-attributes-3

Conversation

@jmorrell-cloudflare
Copy link
Copy Markdown
Contributor

@jmorrell-cloudflare jmorrell-cloudflare commented Sep 7, 2025

Follows on from the work in #4983

Focuses on annotating the request arguments for R2. There are likely more of them then you'd think.

get and put

cloudflare.r2.request.only_if.etag_matches
cloudflare.r2.request.only_if.etag_does_not_match
cloudflare.r2.request.only_if.uploaded_before
cloudflare.r2.request.only_if.uploaded_after

get

You can either pass in specific range arguments, or a header: https://workers-types.pages.dev/#R2GetOptions
cloudflare.r2.request.range.offset
cloudflare.r2.request.range.length
cloudflare.r2.request.range.suffix
cloudflare.r2.request.range

cloudflare.r2.request.ssec_key

put and createMultipartUpload

cloudflare.r2.request.custom_metadata
cloudflare.r2.request.http_metadata.content_type
cloudflare.r2.request.http_metadata.content_encoding
cloudflare.r2.request.http_metadata.content_disposition
cloudflare.r2.request.http_metadata.content_language
cloudflare.r2.request.http_metadata.cache_control
cloudflare.r2.request.http_metadata.cache_expiry
cloudflare.r2.request.storage_class
cloudflare.r2.request.ssec_key

put

cloudflare.r2.request.size
cloudflare.r2.request.checksum.type
cloudflare.r2.request.checksum.value

delete

cloudflare.r2.request.keys

list

cloudflare.r2.request.limit
cloudflare.r2.request.prefix
cloudflare.r2.request.cursor
cloudflare.r2.request.delimiter
cloudflare.r2.request.start_after
cloudflare.r2.request.include.http_metadata
cloudflare.r2.request.include.custom_metadata

Further changes

  • switched to including cursor instead of just a boolean whether one was present or not
  • switched to ISO8601 date formats

Base automatically changed from jmorrell/r2-add-attributes-2 to main September 8, 2025 15:59
@jmorrell-cloudflare jmorrell-cloudflare force-pushed the jmorrell/r2-add-attributes-3 branch from 220cc82 to 5939d80 Compare September 9, 2025 23:10
@jmorrell-cloudflare jmorrell-cloudflare marked this pull request as ready for review September 10, 2025 00:03
@jmorrell-cloudflare jmorrell-cloudflare requested review from a team as code owners September 10, 2025 00:03
@jmorrell-cloudflare jmorrell-cloudflare merged commit 1736386 into main Sep 15, 2025
21 of 26 checks passed
@jmorrell-cloudflare jmorrell-cloudflare deleted the jmorrell/r2-add-attributes-3 branch September 15, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants