sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Drop `sample_rates` if its only for debugging

Open marandaneto opened this issue 3 years ago • 1 comments

Problem Statement

{
  "type": "transaction",
  "sample_rates": [
    {
      "id": "client_rate",
      "rate": 1
    }
  ]
}

sample_rates isn't part of the spec.

Solution Brainstorm

Remove the field from the JSON before sending it over.

marandaneto avatar Jul 04 '22 12:07 marandaneto

Similar issue that may be addressed in this PR as well:

{
  "type": "transaction",
  "message": {}
}

AFAIK message isn't part of the spec for transactions either.

marandaneto avatar Jul 04 '22 13:07 marandaneto

Why is this a problem? Closing it for now

HazAT avatar Jan 26 '23 07:01 HazAT

Why is this a problem? Closing it for now

sample_rates isn't part of the event protocol nor is used in the product. This is used locally only for debugging, it should not be part of the captured event. We are wasting computer power and network data from people for no reason.

Similarly, message isn't part of the event protocol for transactions either, but even if it is, an empty {} or "" message should be dropped for the same reason, no reason to spend computer power and network data for something that is dropped during ingestion anyway.

This was acknowledged as a bug back then by the JS team.

marandaneto avatar Jan 26 '23 11:01 marandaneto

You are not wrong, tho this is such a tiny thing that, in the grand scheme of things, can be neglected. We have more important things to do.

HazAT avatar Jan 26 '23 11:01 HazAT