-
Notifications
You must be signed in to change notification settings - Fork 94
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(sentry): Add server_name option #4251
Conversation
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.
Nice, don't forget to add a changelog entry.
relay/src/cli.rs
Outdated
@@ -119,6 +120,7 @@ pub fn extract_config_env_vars() -> OverridableConfig { | |||
outcome_source: None, //already extracted in params | |||
shutdown_timeout: env::var("SHUTDOWN_TIMEOUT").ok(), | |||
instance: env::var("RELAY_INSTANCE").ok(), | |||
server_name: env::var("RELAY_SERVER_NAME").ok(), |
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.
We could default it to HOSTNAME
.
Something like this (untested):
env::var("RELAY_SERVER_NAME").or_else(|| env::var("HOSTNAME")).ok()
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 think you made a typo there
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.
Updated, copy paste, but get the idea, check RELAY_SERVER_NAME
then fallback to HOSTNAME
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.
Does the HOSTNAME
variable have any special meaning/are we already using it somewhere?
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.
A lot of (all?) kubernetes distributions set the HOSTNAME
variable by default. Also e.g. bash sets it.
Unlike
default_tags
, theserver_name
also gets set for transactions. This might aid in the investigation of https://github.com/getsentry/team-ingest/issues/587.