Skip to content

Commit

Permalink
Merge pull request #3412 from AlexsLemonade/ark/3410-fix-stage-enviro…
Browse files Browse the repository at this point in the history
…nment-variables

Use STAGE variable for Sentry environment tag
  • Loading branch information
davidsmejia authored Oct 12, 2023
2 parents 06f1610 + 15d7142 commit 760fdc3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions api/data_refinery_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
}

APP_NAME = "Refine.bio API"
ENVIRONMENT = get_env_variable_gracefully("ENVIRONMENT")
STAGE = get_env_variable_gracefully("STAGE")
SYSTEM_VERSION = get_env_variable_gracefully("SYSTEM_VERSION")

# Setting the RAVEN_CONFIG when SENTRY_DSN isn't set will cause the
Expand All @@ -216,7 +216,7 @@
if SENTRY_DSN:
RAVEN_CONFIG = {
"dsn": SENTRY_DSN,
"environment": "-".join((ENVIRONMENT, *(APP_NAME.replace(".", "").lower().split()))),
"environment": "-".join((STAGE, *(APP_NAME.replace(".", "").lower().split()))),
"release": SYSTEM_VERSION,
# Only send 5% of errors for the API, since we aren't going to
# be interested in any single one.
Expand Down
4 changes: 2 additions & 2 deletions common/data_refinery_common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
}

APP_NAME = "Refine.bio Common"
ENVIRONMENT = get_env_variable_gracefully("ENVIRONMENT")
STAGE = get_env_variable_gracefully("STAGE")
SYSTEM_VERSION = get_env_variable_gracefully("SYSTEM_VERSION")

# Setting the RAVEN_CONFIG when SENTRY_DSN isn't set will cause the
Expand All @@ -164,7 +164,7 @@
if SENTRY_DSN:
RAVEN_CONFIG = {
"dsn": SENTRY_DSN,
"environment": "-".join((ENVIRONMENT, *(APP_NAME.replace(".", "").lower().split()))),
"environment": "-".join((STAGE, *(APP_NAME.replace(".", "").lower().split()))),
"release": SYSTEM_VERSION,
}
else:
Expand Down
4 changes: 2 additions & 2 deletions foreman/data_refinery_foreman/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
}

APP_NAME = "Refine.bio Foreman"
ENVIRONMENT = get_env_variable_gracefully("ENVIRONMENT")
STAGE = get_env_variable_gracefully("STAGE")
SYSTEM_VERSION = get_env_variable_gracefully("SYSTEM_VERSION")


Expand All @@ -173,7 +173,7 @@
if SENTRY_DSN:
RAVEN_CONFIG = {
"dsn": SENTRY_DSN,
"environment": "-".join((ENVIRONMENT, *(APP_NAME.replace(".", "").lower().split()))),
"environment": "-".join((STAGE, *(APP_NAME.replace(".", "").lower().split()))),
"release": SYSTEM_VERSION,
}
else:
Expand Down
4 changes: 2 additions & 2 deletions workers/data_refinery_workers/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
STATIC_URL = "/static/"

APP_NAME = "Refine.bio Workers"
ENVIRONMENT = get_env_variable_gracefully("ENVIRONMENT")
STAGE = get_env_variable_gracefully("STAGE")
SYSTEM_VERSION = get_env_variable_gracefully("SYSTEM_VERSION")

# Setting the RAVEN_CONFIG when SENTRY_DSN isn't set will cause the
Expand All @@ -149,7 +149,7 @@
if SENTRY_DSN:
RAVEN_CONFIG = {
"dsn": SENTRY_DSN,
"environment": "-".join((ENVIRONMENT, *(APP_NAME.replace(".", "").lower().split()))),
"environment": "-".join((STAGE, *(APP_NAME.replace(".", "").lower().split()))),
"release": SYSTEM_VERSION,
}
else:
Expand Down

0 comments on commit 760fdc3

Please sign in to comment.