Bug 484958

Summary: Wrong Sentry DSN in preamble.py?
Product: [Applications] drkonqi Reporter: Malte S. Stretz <mss>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: minor    
Priority: NOR    
Version First Reported In: 6.0.3   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.