Commit Graph

49 Commits

Author SHA1 Message Date
Klaas van Schelven 0f60dab032 phone-home: on (docker) server-start too 2024-11-11 14:37:27 +01:00
Klaas van Schelven 488b52ea04 prestart command (simplying the throwaway Docker install) 2024-11-06 09:38:54 +01:00
Klaas van Schelven f0006a63f5 raise_exception helper: tag should be string
> Tags are key/value string pairs that are both indexed and searchable.
2024-10-08 11:00:57 +02:00
Klaas van Schelven b2b63c9664 Use precompiled event_schema.py 2024-09-19 14:57:47 +02:00
Klaas van Schelven ff37e8f40c Remove 'understandable_json_errors utils
turns out it already exists (best_match)
2024-09-19 12:39:06 +02:00
Klaas van Schelven fe9aba5c7d Add (optional) input validation using JSONSchema 2024-09-19 10:14:00 +02:00
Klaas van Schelven f2a78fed9d Use the envelope's event_id when using the envelope endpoint
* As per the spec 'takes precendence'
* Also fixes the reported bug on Laravel, which apparently doesn't send event_id
  as part of the event payload.
* Fixes the envelope tests (they were doing nothing when I moved the
  data samples around recently)
* Adds a 'no event_id in data, but yes in envelope' test to that test.
* Adds handling to send_json such that we can send envelopes when the event_id
  is missing from the event data.
2024-09-18 11:36:47 +02:00
Klaas van Schelven c5465f2f8a Don't assume samples miss the 'timestamp' property
(we have fixed the samples accordingly)
2024-09-17 09:38:08 +02:00
Klaas van Schelven 5f29a20765 send_json: print understandable json errors
at least: this works in the current set of circumstances
2024-09-16 14:20:21 +02:00
Klaas van Schelven f1b75aab81 api.json.schema: put back in code, make test fail on invalidness and related fixes
This reverts course on 4201fbd778, and restores event.schema.json from that
commit.  In that commit we said: 'this is not used'. Not true: it's used in a
test, though this test used the validity check to silently skip.

In this commit:

1. Do _not_ just silently skip invalid samples. Since we have a way of properly
   validating, let's use that so that we know how useful the samples that we have
   actually are.

2. Deal with "_meta", a field that we sometimes see in the "private samples" (data
   that ultimately comes from running a somewhat recent python-sdk against my
   actual codebase). The need for this was exposed by [1]

3. Add a test for the up-to-date-ness of event.json.schema

4. remove special-cased attribute-checks in `is_valid`; `send_json` was, at the
   time, an opportunistic way to just get my hands on some sample data. the
   approach at validation reflected that: I just did some tests on the existence
   of certain attributes to determine which json files were even events. But in
   the end I did a full validation using an API schema, which kinda made the
   whole business useless. This commit cleans up the individual checks.
2024-09-16 11:28:05 +02:00
Klaas van Schelven 4201fbd778 remove vendored event.schema.json from codebase, document where it can be found in the future 2024-09-13 17:47:25 +02:00
Klaas van Schelven eec8d51491 Remove various non-TODOs
either already done, or more of a 'this is a way this code could potentially
evolve in the future' (but not a 'we must do this')
2024-09-13 10:05:22 +02:00
Klaas van Schelven 2e70197825 Add check_migrations command
this way, at least in the Docker setup, you'll get a meaningful error when you
try to start up a half-baked server
2024-09-09 15:31:14 +02:00
Klaas van Schelven 129a8db421 Fix various flake8 errors 2024-08-21 09:31:05 +02:00
Klaas van Schelven 927587c132 Stress test interuptible, still show results 2024-07-17 17:33:30 +02:00
Klaas van Schelven c403d906cd stress-test: report on errors 2024-07-15 09:26:27 +02:00
Klaas van Schelven 471b69e956 Stress test: ability to generate random event types: 2024-06-27 10:49:25 +02:00
Klaas van Schelven c5df10e9cf Stress test: ability to use multiple dsns (projects) 2024-06-27 09:52:10 +02:00
Klaas van Schelven 4647c1b498 Stress test: better stats 2024-05-23 12:36:14 +02:00
Klaas van Schelven f0c255a346 Force envelope use in stress tests 2024-05-23 11:02:44 +02:00
Klaas van Schelven 23d7f2172d Add showstat (for snappea queue size) 2024-05-23 08:37:48 +02:00
Klaas van Schelven 53353d2d8c Add some more percentiles 2024-05-19 15:36:27 +02:00
Klaas van Schelven 4b509ac13b Stress test: print some stats 2024-04-27 20:45:59 +02:00
Klaas van Schelven 61d5615d5d Add stress-test command (using copy/paste from send_json) 2024-04-26 16:11:38 +02:00
Klaas van Schelven 58435754e0 Digest immediately implemented 2024-04-26 14:48:07 +02:00
Klaas van Schelven 7bfad36376 Implement brotli decompression 2024-04-25 15:56:11 +02:00
Klaas van Schelven 58d448350a Implement MAX sizes for event & envelope 2024-04-25 14:56:11 +02:00
Klaas van Schelven 387234b847 Read the Envelope specification once more, implement some more details 2024-04-25 13:39:52 +02:00
Klaas van Schelven 4d996e0c51 Use my own impl. of conent_encoding based decompress
In the process: make it read-read rather than read-write
2024-04-25 12:10:15 +02:00
Klaas van Schelven d099d43418 send_json: ability to send envelopes 2024-04-25 11:38:29 +02:00
Klaas van Schelven 5a0195c533 Add 'deflate' as an option to send_json command 2024-04-24 15:44:02 +02:00
Klaas van Schelven 483aca6802 send_json: ability to send gzipped 2024-04-24 15:29:39 +02:00
Klaas van Schelven 280bd2172b History page: 'mostly done' (a first setup) 2024-04-12 16:07:25 +02:00
Klaas van Schelven 0747a808b9 (custom) tags on the detail page 2024-04-04 21:53:12 +02:00
Klaas van Schelven 9acff514ea Fix --fresh-id param on send_json command
probably never worked, the right attr is simply 'event_id'
2024-04-03 11:21:37 +02:00
Klaas van Schelven cc781b94d4 send_json: works for projects too 2024-03-21 23:05:47 +01:00
Klaas van Schelven c4645958e8 Fix case of accidental variable hiding/shadowing in debug tool 2024-03-20 21:12:02 +01:00
Klaas van Schelven 69698c2e15 Document behavior of Sentry SDK
which is what we expected; and what our server has built-in logic for
2024-03-19 22:36:24 +01:00
Klaas van Schelven 2eac8990b1 Promote settings-level 'hack' to command-param 2024-03-15 20:05:04 +01:00
Klaas van Schelven ee045a4639 Test-data for norepr 2023-11-24 20:36:41 +01:00
Klaas van Schelven 71d307f34a Add fresh_xxx options to send_json command 2023-11-19 21:25:20 +01:00
Klaas van Schelven 243591359e Command to raise (chained) exceptions 2023-11-14 23:12:38 +01:00
Klaas van Schelven 57f27504e2 Always send test messages as if they were sent just now 2023-11-13 19:20:44 +01:00
Klaas van Schelven 0c461d5472 valid-only as a param on send_json
ironically the only example we've harvested ourselves from reality
is not valid.

to be able to send it anyway we need this flag.
2023-11-13 18:53:23 +01:00
Klaas van Schelven a6f99ac1f7 Add samples (my own as well as from other projects) 2023-11-13 18:41:50 +01:00
Klaas van Schelven f3b3fea2d2 Only bulk-load up-to-date valid Events 2023-11-12 21:20:02 +01:00
Klaas van Schelven 0cc0d4d210 Skip some more types of even data 2023-11-12 10:26:09 +01:00
Klaas van Schelven 725822ce3d Events: some modelling and a command to ingest JSONs from other projects as examples 2023-11-11 21:13:15 +01:00
Klaas van Schelven 3ca27a43d5 First jab at ingesting loads of example data 2023-11-10 19:50:42 +01:00