erikvanoosten / metrics-scala

The scala API for Dropwizard's Metrics.
Apache License 2.0
427 stars 62 forks source link

Upgrade to metrics 5 #99

Open bryanmau1 opened 6 years ago

bryanmau1 commented 6 years ago

Metrics 5 is out! Do you think metrics-scala will support this?

erikvanoosten commented 6 years ago

O my. Yes, we'll support that. However, unless someone comes with a big PR, it will take +- 2 weeks.

erikvanoosten commented 6 years ago

@bryanmau1 can you please point me to the release notes for metrics 5? I can't find them on the metrics-Dropwizard site.

bryanmau1 commented 6 years ago

https://github.com/dropwizard/metrics/releases

See the release notes for 5.0.0-rc0 and rc1. I don't think there are too many changes, mostly moving packages. But the big bonus of metrics 5 is tags support.

erikvanoosten commented 6 years ago

I see. Thanks for that! Do you have suggestions for changing the API to support tags?

bryanmau1 commented 6 years ago

Actually, not much. My need is actually (right now) is just for a metrics5 compatible version, which would allow me to not keep two separate copies of the dropwizard metrics library around.

Thanks again for your work on this!

erikvanoosten commented 6 years ago

I have prepared changes for Dropwizard metrics 5, build against 5.0.0-rc2. To try it out just build from master.

The following things block a proper release:

(*) The release notes for RC1 say: "Accidentally released to Maven Central as 5.0.0. Please use 5.0.0-rc1." So the 5.0.0 release on Maven central does not count as a non-RC release.

SethTisue commented 6 years ago

in the Scala 2.12 community build at https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/2880/consoleFull I'm (since recent commits here) seeing:

[metrics-scala] [info] ImplicitsSpec:
[metrics-scala] [info] Implicits
[metrics-scala] [info] - is not required in Scala 2.12 and later because of SAM support *** FAILED ***
[metrics-scala] [info]   Expected no compiler error, but got the following type error: "type mismatch;
[metrics-scala] [info]    found   : (String, io.dropwizard.metrics5.Metric) => Boolean
[metrics-scala] [info]    required: io.dropwizard.metrics5.MetricFilter", for code: val metricFilter: MetricFilter = (_: String, _: Metric) => true (ImplicitsSpec.scala:25)
erikvanoosten commented 6 years ago

Sorry about that. I am on it.

erikvanoosten commented 6 years ago

@SethTisue I found a fix

erikvanoosten commented 3 years ago

Development of v5 is on hold: https://github.com/dropwizard/metrics#versions