From 0cc0d4d210f60eef4c23f7a46dff05f52ce889c4 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Sun, 12 Nov 2023 10:26:09 +0100 Subject: [PATCH] Skip some more types of even data --- ingest/management/commands/send_json.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ingest/management/commands/send_json.py b/ingest/management/commands/send_json.py index 757074a..1c62f8b 100644 --- a/ingest/management/commands/send_json.py +++ b/ingest/management/commands/send_json.py @@ -41,6 +41,24 @@ class Command(BaseCommand): self.stderr.write("%s %s" % ("Platform not set", json_filename)) continue + if data.get("type", "") == "transaction": + # kinda weird that this is in the "type" field rather than endpoint/envelope but who cares, that's + # where the info lives and we use it as an indicator to skip + self.stderr.write("%s %s" % ("We don't do transactions", json_filename)) + continue + + if data.get('profile'): + # yet another case of undocumented behavior that I don't care about + # ../sentry-current/static/app/utils/profiling/profile/formats/node/trace.json + self.stderr.write("%s %s" % ("124", json_filename)) + continue + + if data.get('message'): + # yet another case of undocumented behavior that I don't care about (top-level "message") + # ../glitchtip/events/test_data/py_hi_event.json + self.stderr.write("%s %s" % ("asdf", json_filename)) + continue + try: response = requests.post( get_store_url(dsn),