Sentry.io requires a Data source name (DSN) for it's clients to upload exceptions. It's unclear to me from the docs
Why does the generic documentation use Javascript, i.e. is it for Javascript only or is it an example? In the practical example the Raven DSN comes from main
method's arguments. When is this ever going to be the case in reality?
Sorry about the poor documentation. I'm working to overhaul them all right now, actually.
You are correct that hardcoding the DSN or retrieving it manually from the program arguments is not preferred. The preferred way to set your DSN (and other configuration) is via process environment variables or Java system properties. See the example here: https://github.com/getsentry/raven-java/blob/08c45e38a859e222b56d21570d00ad6a1411ebdd/raven-logback/README.md
This way, the Raven client code can be included in the project (even in open source projects) but the configuration of the DSN happens at runtime however the administrator prefers to setup their environment (or not configured at all, if they want to leave Sentry disabled).
In regards to the other question: a DSN is tied to a specific Sentry project so that all exceptions that occur in that project are aggregated regardless of which end user encountered the issue.