Skip to content

[Bug] calling MetricsLogger setDimensions() followed by putDimensions() throws java.lang.UnsupportedOperationException #59

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

Closed
neukev opened this issue Nov 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@neukev
Copy link

neukev commented Nov 20, 2020

Calling setDimensions() in MetricsLogger forwards to MetricsContext which calls Arrays.asList(). This returns a fixed-size list that does not support add() (JavaDoc). Therefore, the following code throws a java.lang.UnsupportedOperationException.

MetricsLogger logger = new MetricsLogger();
logger.setDimensions(DimensionSet.of("foo", "bar"));
logger.putDimensions(DimensionSet.of("foobar", "baz"));
@jaredcnance jaredcnance added the bug Something isn't working label Nov 20, 2020
@ivan-moto
Copy link
Contributor

#62

@yaozhaoy yaozhaoy closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants