Add environment info#1928
Draft
hmpf wants to merge 4 commits into
Draft
Conversation
This may be used to enrich for instance logs and is a slug (string without whitespace) that defaults to "environment-unset". It can be overridden via the environment variable "ARGUS_ENVIRONMENT". When running in development this could be set to for instance "dev" or "localhost". When running in production it could be automatically set by the deployment system, to an ip-address or hostname for instance.
Test results 8 files 1 712 suites 3m 8s ⏱️ Results for commit 6a8a177. ♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1928 +/- ##
==========================================
- Coverage 88.60% 88.22% -0.39%
==========================================
Files 146 148 +2
Lines 7093 7124 +31
==========================================
Hits 6285 6285
- Misses 808 839 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Scope and purpose
Should probably be merged after #1927, #1929.
Adds the django string setting "ENVIRONMENT" and makes it available to logs. via a log filter -or- a log formatter.
"ENVIRONMENT" is be default set to "environment-unset".
If set to "blbl" and made visible in a log format string, e.g. via:
then every single log message will start with "blbl ":
unless "environment" is passed in via the extra-parameter:
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.