Bug 484958 - Wrong Sentry DSN in preamble.py?
Summary: Wrong Sentry DSN in preamble.py?
Status: RESOLVED NOT A BUG
Alias: None
Product: drkonqi
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.0.3
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-03 08:27 UTC by Malte S. Stretz
Modified: 2024-04-03 10:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2024-04-03 08:27:12 UTC
SUMMARY
While trying to understand how the "new" Automatic Crash Reporting works and where it is hosted I had to dig a bit and found the MR https://invent.kde.org/plasma/drkonqi/-/merge_requests/210/diffs

While staring at the diff I noticed a difference between the URL with the hard coded key and index in preamble.py and the ones generated in SentryDSNContext::dsnUrl(): While the latter have the path /api/ before the index the former does not. This looks wrong to me I'd assume that the DSN should be https://d6d53bb0121041dd97f59e29051a1781@crash-reports.kde.org/api/13 instead.

I may be wrong of course in which case feel free to just close this report :-)

Two additional nits:
* I'd put those values into constants and use an f-string instead of having that long URL hardcoded
* Out of interest I looked at https://autoconfig.kde.org/drkonqi/sentry/0/dsns.json and couldn't find a project with the index 13. I'd add it there for completeness sake. 


OBSERVED RESULT
The hard coded DSN URL is "https://d6d53bb0121041dd97f59e29051a1781@crash-reports.kde.org/13"

EXPECTED RESULT
It looks like the DSN URL should be "https://d6d53bb0121041dd97f59e29051a1781@crash-reports.kde.org/api/13" instead.
Comment 1 Malte S. Stretz 2024-04-03 10:23:06 UTC
Ok, I read up on https://develop.sentry.dev/sdk/overview/#parsing-the-dsn and this is not an issue at all.