Commit Graph

40 Commits

Author SHA1 Message Date
Klaas van Schelven
661d83bd93 minidumps: FEATURE flag 2025-11-15 13:33:49 +01:00
Klaas van Schelven
97c1e4c71c Comment about difs_assemble endpoint 2025-11-13 08:33:31 +01:00
Klaas van Schelven
9f6cd88ec6 Remove unneeded layer of indirection in query. 2025-11-13 08:33:12 +01:00
Klaas van Schelven
9f2a7c6737 de-chatgptize event_threads_for_process_state
this code was created in a REPL/ChatGPT/minidump-API/HITL session,
until I had something that "seemed to work". the present commit
is the result of rereading, refactoring for understanding etc.
it's not "pure refacting" in the sense that it's behavior-changing,
but AFAICT for the better. e.g. "line 0" => just leave that out and
many similar changes.
2025-11-12 22:05:42 +01:00
Klaas van Schelven
eea5f032e2 Clarified meaning of process_state.requesting_thread
(the now-removed 'treat as pid' was hallunicated by the bot; the
taken-from-sentry version missed the guard against -1)

> The index of the thread that requested a dump be written in the
> threads vector. [..] If the dump was not produced as a result of an exception
> [..] this field will be set to -1,
2025-11-12 21:33:18 +01:00
Klaas van Schelven
b60980c8f3 PoC: Minidumps w/ symbolification
Plenty of TODOs left; but this proves we can find:

* file names
* function names
* line nos
* source context

See #82
2025-11-12 20:44:38 +01:00
Klaas van Schelven
ab065a6329 api_catch_all: header-based
rather than try-and-recover, just look at the headers and show body/POST etc.
this avoids hard-to-reason about situations where either of those won't work
because the other has already been executed; in combination with reasoning
about max size usage the explicit solution is simply easier to reason about.

further:

* makes api_catch_all one of the content_encoding-ready views.
* implement a max length for the ingest api view
2025-11-11 15:25:51 +01:00
Klaas van Schelven
ad077b4056 file_info's debug_id is optional
(as per my notes; didn't recheck this when committing)
2025-11-09 23:11:10 +01:00
Klaas van Schelven
7d008da4a1 PoC for difs_assemble
works w/ sentry-client; no actual handling yet; TODOs in-code

See #82
2025-11-05 21:40:07 +01:00
Klaas van Schelven
21297eff2a Comment about understanding
(from reading the code, not actually double-checked right now)
2025-11-05 14:36:38 +01:00
Klaas van Schelven
74ace016bc api_catch_all: fix for request.POST debugging 2025-10-29 17:25:49 +01:00
Klaas van Schelven
be7ac2043b Implement /api/0/ endpoint
Fix #97
2025-09-08 14:50:23 +02:00
Klaas van Schelven
cff82b4797 Document that api_catch_all disables APPEND_SLASH behavior for the api
See #188
2025-08-25 08:36:49 +02:00
Klaas van Schelven
354af7ea0a Fix issues as reported by bandit or mark as nosec
Nothing worrying, but good to have checked this regardless
and important to have a green pipeline.

Fix #175
2025-07-30 12:16:40 +02:00
Klaas van Schelven
6ad9947460 Uploaded, but ignored, files: warn
See #158
2025-07-23 12:18:30 +02:00
Klaas van Schelven
bd1eabe60b Warn (in the logs) on multiple-debug-ids source uploads
See #157, #158
2025-07-23 12:11:20 +02:00
Klaas van Schelven
e80855a8b9 Admin for filemetadata: click-don't-select
See #158
2025-07-23 11:37:27 +02:00
Klaas van Schelven
99f782f4e3 add vacuum_files command
Fix #129
2025-07-17 09:05:16 +02:00
Klaas van Schelven
2e32ec78a3 Artifact Bundle upload: clean up after extract
for each bundle upload both the chunks and the zipped bundle
were kept (even though they are only needed on-upload, i.e.
after extracting we deal with the extracted files exclusively

This is an important step in 'keeping sourcemaps-related data-usage limited'
i.e. see #129
2025-07-16 20:26:28 +02:00
Klaas van Schelven
995c627fe6 Add API catch-all endpoint for logging
enabled using a setting.
Fix #153
2025-07-16 17:22:38 +02:00
Klaas van Schelven
d35327fe80 File-upload: chunk-size of 2MiB
as per the comment

Fix #147
2025-07-16 15:31:41 +02:00
Klaas van Schelven
4c4a4f6fd6 Add test to prove chunked file-uploads work
See #147
2025-07-16 15:22:23 +02:00
Klaas van Schelven
b9880fe59b Remove untrue comment about single-chunk API
chunk_upload is and has always been working 'for real'. The only sense in
which the comment has been 'vaguely in the direction of truth' was that
with a chunkSize and maxRequestSize of 32MiB in practice sourcemap uploads
will often have been single-chunk in practice.

See #147
2025-07-16 15:17:35 +02:00
Klaas van Schelven
931f00135b File-upload: update comments about concurrency and chunksPerRequest
i.e. update the comments to reflect what I just learned doing some actual
experiments.

See #147

b.t.w. the now-removed comment was somewhat misleading: "single-chunk"
was (and is) being forced as in "single chunk per request" but not as
in "single chunk per file", and it was only forced by chunksPerRequest=1,
not by concurrency=1.
2025-07-16 14:43:41 +02:00
Klaas van Schelven
05fbf50e89 Sourcemaps upload: max file size 2GiB
As per the comment.

Since we haven't actually gone multi-chunk, this is just preparation

The now-removed comment should be read as 'it could be assumed that
unzipping introduces a factor 5 increase between chunk size and file
size' but that's a whole bunch of assumptions that I'd rather get
rid of (mental overhead, with little gain).

See #147
2025-07-16 12:53:11 +02:00
Klaas van Schelven
e972a21c2a file upload: chunk size and request size to 16MiB
As per the comment

See #147
2025-07-16 12:49:34 +02:00
Klaas van Schelven
4c104714e3 Fix the tests
update key phrases according to the recent improvements;
specifically: test also for the fact that function-name now shows up

See #87
2025-05-29 11:11:45 +02:00
Klaas van Schelven
ef5c203d78 Merge branch 'sourcemaps-multi-source-test' 2025-05-29 11:01:37 +02:00
Klaas van Schelven
1a60cbcd3c Add test for multi-file sourcemaps
See #87 for the code that fixes this
2025-05-29 11:01:10 +02:00
Klaas van Schelven
46c9f3d7cc Merge pull request #87 from bpeschier/fix/sourcemap-with-multiple-sources
* Apply source mapping when sourcemap contains multiple sources
* Propagate `filename` and `function` from the sourcemap.
2025-05-28 22:18:02 +02:00
Klaas van Schelven
859ba6b31e Add test that proves database lookups on UUID work the way you think
See #105
2025-05-28 22:02:35 +02:00
Bas Peschier
bc3daf7662 Apply source mapping when sourcemap contains mappings for multiple sources. 2025-04-24 15:45:28 +02:00
Klaas van Schelven
4bbfe1a4ff Files: use the appropriate db transactions 2025-04-14 09:55:15 +02:00
Klaas van Schelven
70b8afb842 Factor out assemble_artifact_bundle into an async task
I did not do any research into actual timings (i.e. whether there really is a
need to pull this out of the request/response loop) but it seems somewhat
prudent.  Because Sentry also does this (and does it at this point), the whole
thing of matching Sentry's interface is not being complicated by it (if
anything: the contrary).
2025-04-14 09:37:05 +02:00
Klaas van Schelven
294105170b Remove debugging-line 2025-04-11 14:31:02 +02:00
Klaas van Schelven
895da36adc AuthToken: barebones implementation 2025-04-11 14:30:29 +02:00
Klaas van Schelven
5d01214752 Sourcemaps: a test
See #19
2025-04-11 10:32:13 +02:00
Klaas van Schelven
b160a6df06 Files: downloadable from admin
for convenience
2025-04-11 09:15:09 +02:00
Klaas van Schelven
0bd899fdfa File.filename (for display purposes) 2025-04-10 17:00:46 +02:00
Klaas van Schelven
eb266d805c PoC of uploading sourcemap artifact bundles
* debug_id-only
* various TODOs (e.g. auth, async, retention)

See #19
2025-04-10 10:30:30 +02:00