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

1) Error injecting constructor, java.lang.IllegalArgumentException: A metric named jvm.attribute.vendor already exists [info] at com.kenshoo.play.metrics.MetricsImpl.<init>(Metrics.scala:28) [info] at com.kenshoo.play.metrics.MetricsImpl.class(Metrics.scala:28) #85

Open
ed1286 opened this issue Jul 9, 2021 · 2 comments

Comments

@ed1286
Copy link

ed1286 commented Jul 9, 2021

Hello I have encountered this error when doing a play 2.8 upgrade. I have seen the previous thread about this but it was quite outdated so wanted to bump a new one. Any ideas on how to resolve this would be greatly appreciated thanks :)

@tzachz
Copy link
Member

tzachz commented Jul 9, 2021

Hi Edward, thanks for posting this issue!

I'm not aware of any relevant change so I'd assume the advice given on #74 is still relevant - gauge name uniqueness is a Metrics limitation which pops up when trying to re-register a metrics-play instance. If the instructions on that thread are insufficient - please provide some more information:

  • When do you see this error (when running tests? Starting the server?)
  • How are you instantiating MetricsPlay - are you using the default configuration (play.modules.enabled+="com.kenshoo.play.metrics.PlayModule") or did you apply any customization?

@ed1286
Copy link
Author

ed1286 commented Jul 12, 2021

thanks for your response. I saw the issue when upgrading to Play 2.8. The advice on the thread was interesting, but out of the suggested solutions, the one he used isn't really an option for us, and the others don't apply as we don't/already do those things.

-I see the error when doing sbt clean test compile
-play.modules.enabled+="com.kenshoo.play.metrics.PlayModule" is what we currently have in application.conf

Thanks :)

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