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

NPE if service is missing from dimensions #38

Open
matthayter opened this issue Oct 11, 2016 · 1 comment
Open

NPE if service is missing from dimensions #38

matthayter opened this issue Oct 11, 2016 · 1 comment

Comments

@matthayter
Copy link

matthayter commented Oct 11, 2016

This line throws an NPE if the service key is missing from dimensions.

In general, should the code assume that certain dimensions are present (service, host, cluster) and therefore verify this upon parsing; or should the code make no assumptions about present dimensions?

I believe the latter, but just wanted to confirm, as the above line appears to be @vjkoskela 's change.

@vjkoskela
Copy link
Member

So the reason to expose these "special" dimensions was because we have and likely will need to continue to have logic based on them. However, there seems to be a miss when they are not present. Either, the code should wrap those special dimensions with Optional or default the value (e.g. to "" or "DEFAULT_SERVICE").

I don't think we should require them to be there are the parser level. I'm partial to an incremental solution where we call a duck a duck; that is, mark those accessors as Optional. @BrandonArp do you have a preference on how we expand this logic?

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

No branches or pull requests

2 participants