Skip to content

Better blob performance information #31122

Open

Description

Is your feature request related to a problem? Please describe.
I am using the BlockBlobClient.uploadData() call to upload several files from our users' browser to blob storage. I'm having a difficult time correlating onProgress events with the browser native PerformanceResourceTiming entries exposed by the browser Performance API. I want to use this information to:

  1. Display real-time throughput to the user.
  2. Display a progress bar for completion percentage.
  3. Record high precision traces/logs for individual block uploads in our observability platform (Datadog, but I don't think that matters).

The problems I'm encountering are:

  1. The browser native PerformanceResourceTiming API has the timing data (start time and duration), but not the block size due to the default browser security and privacy policies.
  2. The onProgress event has the block size but not the timing data (start time and duration).

Describe the solution you'd like
I can think of 2 possible ways to fix this:

  1. Implement support for the Timing-Allow-Origin HTTP header within the Azure blob backend service itself. This tells the browser to un-hide the detailed performance metrics.
  2. Add the blockid to the TransferProgressEvent. This will allow me to match PerformanceResourceTiming entries with onProgress events.

Personally I think option 1 is far superior since it enables much more detailed performance information. And I believe that most frontend observability platforms ingest this data already.

Describe alternatives you've considered
I've considered implementing a proxy, but really that doesn't make sense. It's complex, costs a lot, and increases the maintenance burden. For us developers, adding the magic "Timing-Allow-Origin" header to the storage account unlocks a ton of observability with what seems to me an appropriate amount of cost and work.

Additional context
Security limitations of the browser PerformanceResourceTiming API
Unlock more detailed performance metrics with Timing-Allow-Origin HTTP header
Similar header for CORS that Azure Storage Accounts already natively support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions