Skip to content

Conversation

@hardbyte
Copy link
Collaborator

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.yaml file 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.

@hardbyte hardbyte requested a review from wilko77 February 12, 2020 04:30
Copy link
Collaborator

@wilko77 wilko77 left a 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:
Copy link
Collaborator

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?


@contextmanager
def temp_file_containing(data):
# Code to acquire resource, e.g.:
Copy link
Collaborator

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

with open(filename, 'rt') as f:
return yaml.safe_load(f)
except UnicodeDecodeError as e:
raise InvalidConfiguration("YAML file appears corrupt") from e
Copy link
Collaborator

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.

@hardbyte hardbyte merged commit d39f530 into develop Feb 14, 2020
@hardbyte hardbyte deleted the revive-jaeger branch February 14, 2020 00:31
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