-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add server name to sentry init #217
Conversation
panuhorsmalahti
commented
Jun 25, 2024
- https://docs.sentry.io/platforms/java/configuration/options/#server-name
- Makes it easier to link the Sentry errors to the actual server
@@ -35,4 +38,4 @@ process.once("SIGINT", () => { | |||
process.exit(0); | |||
}); | |||
|
|||
server.start(serverPort, agentToken, idpPublicKey); | |||
server.start(serverPort, agentToken, idpPublicKey, tunnelAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the tunnelAddress
added to the server.start
function or did I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already there as optional parameter
if (process.env.SENTRY_DSN) { | ||
enabled = true; | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN | ||
dsn: process.env.SENTRY_DSN, | ||
serverName: tunnelAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the process.env.TUNNEL_ADDRESS
straight here as this already looks for the process.env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use single source of truth for tunnelAddress