Submit data on User's Consent

Hi,

I am looking for a functionality where users’ data is submitted to the server only when the user agrees to submit data.

Here’s the scenario

  1. Sentry is initialized on the client side and capture data and store it in local storage.
  2. We encounter an error which is captured by JS logic.
  3. We trigger a pop-up asking user if he/she would like to submit details.
  4. If the user agrees, submit sentry data to the server.

I don’t want to initialize sentry after an error occurs as it may miss some data points.

Hey,

We don’t provide such a functionality now, however you can do this yourself by utilising dataCallback to store all the events and _sendProcessedPayload to send them to Sentry once user agrees to that.

Please keep in mind that _sendProcessedPayload is not a public API and we cannot ensure it’s integrity, therefore you use it at your own responsibility.

Thanks @kamilogorek for answering my query.