kamon-prometheus icon indicating copy to clipboard operation
kamon-prometheus copied to clipboard

Scala 2.12 compatible jar

Open pjfanning opened this issue 8 years ago • 12 comments

Would it be possible to do a release of scala 2.12 compatible jar? Kamon.io 0.6.5 has scala 2.12 support.

pjfanning avatar Jan 15 '17 18:01 pjfanning

I'd like to do this, but it is going to be a little bit tricky to pull off. As you noted, the Akka plug-in for Kamon hasn't been released. We'll also have to cross-compile since Spray isn't supported on 2.12. I'll need to think about it a bit to figure out the best path forward. I appreciate any ideas.

sattvik avatar Jan 18 '17 14:01 sattvik

It will be interesting to see what dependencies exist for kamon-akka_2.11 and kamon-akka_2.12 when they are published. I suspect that the 2.11 jar will depend on akka-actor_2.11 2.3.x but the 2.12 jar will depend on akka-actor_2.12 2.4.x. If this happened, then kamon-prometheus could avoid having an explicit dependency on akka and inherit it from kamon-akka. The spray-can dependency is another issue and I'm not sure what the solution to that is.

pjfanning avatar Jan 18 '17 17:01 pjfanning

Would it make sense to refactor this module into separate kamon-prometheus-spray and kamon-prometheus-akka-http modules and only the latter would support scala 2.12?

pjfanning avatar Jan 18 '17 17:01 pjfanning

Any news on this?

zifeo avatar Apr 20 '17 11:04 zifeo

Hi @zifeo I've published jar which supports scala 2.12, akka 2.5.0, kamon 0.6.6 to my bintray repo https://dl.bintray.com/milenkovicm/maven/ with coordinates: "com.github.milenkovicm" %% "kamon-prometheus" % "0.3.0" as spray does not support scala 2.12 I've removed all dependencies to it

milenkovicm avatar Apr 23 '17 15:04 milenkovicm

@milenkovicm Do you think you could submit a PR with your changes to make it 2.12 compatible? If it strips 2.11 compatibility or contains any breaking changes we might need to think through what to do about it, but if we can bring your change in mainline I'd like to do that.

bkrodgers avatar Apr 25 '17 03:04 bkrodgers

@bkrodgers I'm not sure if the changes I did are good enough to be merged to master directly. I just wanted to check how easy update scala, akka, kamon to latest would be. Also, my focus was akka-http only.

I've removed spray dependency, and all classes which used spray have been removed as the consequence. Demo submodule is empty now, probably I could convert classes from using spray to akka-http but I didn't bother.

for more details please check milenkovicm/kamon-prometheus@642578503fde2bebae89f62f576e8f0375d0c106

From what I can see project lead will have to make decision to drop support for spray or to have branch with spray support (but scala 2.11 only) and branch with scala 2.12 support (but no spray). I think it would be hard to maintain scala 2.11 and scala 2.12 version in the same branch

milenkovicm avatar Apr 25 '17 08:04 milenkovicm

Any update on this? I think it makes sense to remove Spray support per @milenkovicm branch. 2.11.11 is supposed to be the last release of Scala 2.11 so this is going to be a major blocker for users.

kevinschmidt avatar Jun 13 '17 16:06 kevinschmidt

I'm all for doing that, but don't have much time on my side to work on it. Would welcome a PR for it.

bkrodgers avatar Jun 13 '17 16:06 bkrodgers

As I said in previous comments you can cherry pick it from my branch.

milenkovicm avatar Jun 13 '17 16:06 milenkovicm

One alternative is https://github.com/Workday/prometheus-akka - if you need just the akka metrics capabilities of Kamon.

pjfanning avatar Jun 13 '17 17:06 pjfanning

Kamon are working on their own kamon-prometheus adapter - https://github.com/kamon-io/kamon-prometheus

pjfanning avatar Jun 19 '17 16:06 pjfanning