-
Notifications
You must be signed in to change notification settings - Fork 8
Revive jaeger #500
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
Revive jaeger #500
Conversation
wilko77
left a comment
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.
the config restructuring looks good from a high level.
| load_yaml_config(filename) | ||
|
|
||
| def test_random_bytes(self): | ||
| with temp_file_containing(generate_bytes(128)) as fp: |
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.
there is a non-zero chance that those random bytes resemble valid yaml. Why not just feeding a known invalid config to the test?
backend/entityservice/tests/util.py
Outdated
|
|
||
| @contextmanager | ||
| def temp_file_containing(data): | ||
| # Code to acquire resource, e.g.: |
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.
that is not a very useful comment
backend/entityservice/utils.py
Outdated
| with open(filename, 'rt') as f: | ||
| return yaml.safe_load(f) | ||
| except UnicodeDecodeError as e: | ||
| raise InvalidConfiguration("YAML file appears corrupt") from e |
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 would be nice to include the filename in the error message.
Expose LOG_CFG variable via settings.py like all other env vargs
6f38bc0 to
5439e49
Compare
Brings Jaeger/opentracing support back to life.
Refactors some of the logging config to be reused in the tracing config. I just pulled out the yaml config file loader and added tests.
Restructures the config via k8s to be a bit simpler - now all monitoring related config files are mounted in
/var/config, the filenames are still passed in via ENV vars.The default
values.yamlfile for our helm chart now includes annotations that will enable opentracing via a jaeger sidecar - if the cluster supports it. It has no effect on clusters that don't have jaeger enabled so I don't think it is a big deal to enable by default.I uncommented the logging config in the values.yaml file so it is actually tested/used. It needs improvement.