cpp_client_telemetry
cpp_client_telemetry copied to clipboard
No separation between sent and sending events
EVT_SENT and EVT_SENDING both have the same value. The event is triggered before the data is actually sent. There should be different value for two events where EVT_SENDING is triggered before the data is sent and EVT_SEND only after the data has been sent.
/// <summary>Event(s) sent.</summary>
EVT_SENT = 0x04000000,
/// <summary>Event(s) being uploaded.</summary>
EVT_SENDING = 0x04000000,
https://github.com/microsoft/cpp_client_telemetry/blob/8032b1aef1931ed9027034a05b847598b5a20e7f/lib/include/public/DebugEvents.hpp#L80
It's sort of design intent. There used to be EVT_SENT constant in the older Aria SDK. The new SDK keeps track of the moment the batch is sent for async processing, with no confirmation when the batch actually receives 200 OK. There is a case where there will be multiple retries, if one attempt fails, and there's no cross-reference back to individual events included in the batch. Best you can do is keep track of EVT_SENDING, and the HTTP status code callbacks, operating based on how many batches got 200 OK EVT_HTTP_OK. Fixing this won't be trivial.