@Jona - Thanks for the question and using MS Q&A platform.
I understand that you have some questions regarding the Event Hub REST API and some of the metrics you are seeing in your experiment. Let me try to help you with that.
Regarding your first question about the Throttled Requests metric, this metric indicates the number of requests that were rejected due to throttling. This means that some of the events may have been sent properly, but others were rejected. Throttling can occur when the number of requests exceeds the capacity of the Event Hub. This can happen with both single and batch event sendings.
Regarding your second question about the Capture Backlog metric, this metric indicates the number of events that are waiting to be captured by the capture feature. The capture feature allows you to capture events from an Event Hub and store them in a storage account for further processing. The backlog can occur when the capture feature is not able to keep up with the incoming events.
Regarding the response code you are seeing when uploading a file larger than 1 MB, the 413 response code indicates that the payload of the request is too large. This can happen when the size of the file you are trying to upload exceeds the maximum size allowed by the Event Hub. The throttling metric may not show up in Azure Monitor because the request was rejected due to the payload size, not due to throttling.
Regarding your question about error handling with the Event Hub output binding, you can use the try-catch block to handle errors that occur when sending events to the Event Hub. If an error occurs, you can log the error or retry sending the event.
Regarding the performance of the SDK versus the REST API, it is possible that the REST API is faster because it allows you to send larger payloads in a single request. The SDK may be slower because it sends smaller payloads in multiple requests.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.