Skip to content
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

Merged
merged 9 commits into from
Nov 15, 2024
Merged

feat(sentry): Add server_name option #4251

merged 9 commits into from
Nov 15, 2024

Conversation

loewenheim
Copy link
Contributor

Unlike default_tags, the server_name also gets set for transactions. This might aid in the investigation of https://github.com/getsentry/team-ingest/issues/587.

@loewenheim loewenheim requested a review from a team as a code owner November 14, 2024 14:17
@loewenheim loewenheim self-assigned this Nov 14, 2024
Copy link
Member

@jjbayer jjbayer left a 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-log/src/setup.rs Outdated Show resolved Hide resolved
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(),
Copy link
Member

@Dav1dde Dav1dde Nov 14, 2024

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()

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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.

@loewenheim loewenheim enabled auto-merge (squash) November 14, 2024 17:21
@loewenheim loewenheim merged commit 727555c into master Nov 15, 2024
21 checks passed
@loewenheim loewenheim deleted the feat/server-name branch November 15, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants