Git Product home page Git Product logo

Comments (19)

ivantopo avatar ivantopo commented on August 11, 2024

Scala 2.11 is not binary compatible with Scala 2.10.x, so I guess it wont work at all.. there have been a couple requests from people trying to use Scala 2.11 so we will probably make a release in the following days. I'll let you known when it is out!

from kamon.

jahangirmohammed avatar jahangirmohammed commented on August 11, 2024

Thanks..Will be waiting on this.

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

+1 for that. Kamon is the only dependency that I have right now that doesn't play well with Scala 2.11.

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

@adrien-aubel that sounds like you are already using Kamon for some time! It would be nice if you can share a bit of you experience with us.. in the meantime, the Scala 2.11 support just gained a couple priority points, I'll get back to you guys soon.

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

@jahangirmohammed @adrien-aubel I just published Kamon 0.3.1-5a87b76817433b7d2997bcbbe3d9173a6f6a1055 for Scala 2.11 in our snapshots repository, just in case you guys want to try it out before our next release is available. From now on we will publish releases for Scala 2.11 as well. Have fun!

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

That's cool man. Testing it right now.
Yeah I've been using Kamon and watching its evolutions for a few months now, mainly to be able to monitor Spray on New Relic. It's working great for me so far.
Btw I have one suggestion about this integration:
When I see the transactions in New Relic and I have routes that have variables in it, the transactions of the same route are not grouped together.

For example I see this:

/users/12/messages
/users/13/messages

As two different transactions.

I'd love to see only one transaction showing up in New Relic, like this for example:

/users/:<Long>/messages

But I'm not sure of the changes it would imply on your side.

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

I get this exception when starting tests:

Uncaught error from thread [api-GroupsApiSpec-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[api-GroupsApiSpec]
java.lang.NoClassDefFoundError: spray/json/RootJsonWriter
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493)
        at java.lang.Class.getConstructor0(Class.java:2803)
        at java.lang.Class.getDeclaredConstructor(Class.java:2053)
        at akka.util.Reflect$$anonfun$4.apply(Reflect.scala:86)
        at akka.util.Reflect$$anonfun$4.apply(Reflect.scala:86)
        at scala.util.Try$.apply(Try.scala:191)
        at akka.util.Reflect$.findConstructor(Reflect.scala:86)
        at akka.actor.NoArgsReflectConstructor.<init>(Props.scala:356)
        at akka.actor.IndirectActorProducer$.apply(Props.scala:305)
        at akka.actor.Props.producer(Props.scala:173)
        at akka.actor.Props.<init>(Props.scala:186)
        at akka.actor.Props$.apply(Props.scala:69)
        at kamon.newrelic.NewRelicMetricsListener.<init>(NewRelic.scala:39)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:374)
        at akka.util.Reflect$.instantiate(Reflect.scala:45)
        at akka.actor.NoArgsReflectConstructor.produce(Props.scala:358)
        at akka.actor.Props.newActor(Props.scala:249)
        at akka.actor.ActorCell.newActor(ActorCell.scala:552)
        at akka.actor.ActorCell.create(ActorCell.scala:578)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)

I use spray 1.3.1-20140423 for Scala 2.11, plus this commit: spray/spray@2e97286 (copied PlayJsonSupport.scala in my project).

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

@adrien-aubel thanks for testing this out! First, regarding your web transactions name, what you currently see is the default name that Kamon sets for a "automatically generated Trace", but you can change the name if you want to. There is a traceDirective that allows you to do just that, and ideally you will give a transaction a more meaningful name.. a example based on your case might be:

get {
  path("users" / IntNumber / "messages) { userID =>
    traceName("GetUserMessages") {
      complete {
        // Get that info from somewhere
        ....
      }
    }
  }
}

That should solve your first problem, in a few minutes will try out the NCDFE.

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

@adrien-aubel I just tried to run one of our toy apps and everything is working just fine.. could you please review that your classpath contains spray-json 1.2.6? Is it possible that you excluded it from your classpath because you are using play-json and it just seemed to be unnecessary? Kamon uses it when posting data to New Relic.

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

Oh yeah you're right, I've put this in my dependencies:

    // Kamon (for metrics)
    "io.kamon" %% "kamon-core" % "0.3.1-5a87b76817433b7d2997bcbbe3d9173a6f6a1055" excludeAll ExclusionRule(organization = "io.spray"),
    "io.kamon" %% "kamon-spray" % "0.3.1-5a87b76817433b7d2997bcbbe3d9173a6f6a1055" excludeAll ExclusionRule(organization = "io.spray"),
    "io.kamon" %% "kamon-newrelic" % "0.3.1-5a87b76817433b7d2997bcbbe3d9173a6f6a1055" excludeAll ExclusionRule(organization = "io.spray"),

because otherwise the Spray version would clash with the one compatible with Scala 2.11.

They're busy at Spray / Typesafe making of Spray the new akka-http, but it's also part of a bigger plan (Reactive Streams), so the situation right now around Spray is kind of complicated.

I'll tweak the dependencies and get back to you if I don't succeed.

Thanks for the help, I really appreciate that.

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

Nice! the snapshot you are using depends on Spray 1.3.1-20140423 as well, so there should be no need to exclude the spray version pulled from Kamon. Also hope that you have fun personalizing your trace names with the directive I mentioned before, let us know if you need something else.

from kamon.

jahangirmohammed avatar jahangirmohammed commented on August 11, 2024

thanks a ton for this - @ivantopo ..Will try out..

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

Thanks @ivantopo I removed the dependency exclusion and it's working great!

Just one last thing: is there anything special to be done to have the error rates (HTTP 4xx and 5xx) correctly showing up on New Relic?
Right now it's always 0% on my NR dashboard.

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

There is a NewRelicErrorLogger that takes all Error events and sends them to New Relic.. we recently found out that even while the errors can be seen in New Relic, the way in which they are grouped is not the best and we need to provide a better support for error messages.. you can use what we have now and I'll let you know when the improved version is available.

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

I see. I'll test it, and I'm looking forward for any improvement in this class.
I was on the phone with New Relic earlier today actually, if you want me to talk to them about anything on that matter, let me know.

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

So I tested today this with a small amount of our users in production.

For some reason I see a lot of occurrences this exception, that wasn't happening with Scala 2.10:

[ERROR] [06/05/2014 15:36:21.550] [services-scheduler-1] [akka.dispatch.Dispatcher] null
java.lang.NullPointerException
    at akka.instrumentation.DispatcherTracing.afterDispatcherShutdown(DispatcherTracing.scala:85)
    at akka.dispatch.Dispatcher.shutdown(Dispatcher.scala:101)
    at akka.dispatch.MessageDispatcher$$anon$2.run(AbstractDispatcher.scala:212)
    at akka.dispatch.MessageDispatcher$$anon$3.execute(AbstractDispatcher.scala:174)
    at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(Scheduler.scala:467)
    at akka.actor.LightArrayRevolverScheduler$$anon$8.executeBucket$1(Scheduler.scala:419)
    at akka.actor.LightArrayRevolverScheduler$$anon$8.nextTick(Scheduler.scala:423)
    at akka.actor.LightArrayRevolverScheduler$$anon$8.run(Scheduler.scala:375)
    at java.lang.Thread.run(Thread.java:744)

Do you know what could cause this?
Apparently the exception occurs in one of your files: https://github.com/kamon-io/Kamon/blob/master/kamon-core/src/main/scala/akka/instrumentation/DispatcherTracing.scala#L85

from kamon.

dpsoft avatar dpsoft commented on August 11, 2024

I think that you found a bug, let me check and I'll notice you when I fix
it.

best regards.

Diego

On Thu, Jun 5, 2014 at 7:38 PM, Adrien Aubel [email protected]
wrote:

So I tested today this with a small amount of our users in production.

For some reason I see a lot of occurrences this exception, that wasn't
happening with Scala 2.10:

[ERROR] [06/05/2014 15:36:21.550] [services-scheduler-1] [akka.dispatch.Dispatcher] null
java.lang.NullPointerException
at akka.instrumentation.DispatcherTracing.afterDispatcherShutdown(DispatcherTracing.scala:85)
at akka.dispatch.Dispatcher.shutdown(Dispatcher.scala:101)
at akka.dispatch.MessageDispatcher$$anon$2.run(AbstractDispatcher.scala:212)
at akka.dispatch.MessageDispatcher$$anon$3.execute(AbstractDispatcher.scala:174)
at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(Scheduler.scala:467)
at akka.actor.LightArrayRevolverScheduler$$anon$8.executeBucket$1(Scheduler.scala:419)
at akka.actor.LightArrayRevolverScheduler$$anon$8.nextTick(Scheduler.scala:423)
at akka.actor.LightArrayRevolverScheduler$$anon$8.run(Scheduler.scala:375)
at java.lang.Thread.run(Thread.java:744)

Do you know what could cause this?


Reply to this email directly or view it on GitHub
#34 (comment).

from kamon.

adrien-aubel avatar adrien-aubel commented on August 11, 2024

Thanks. Looking forward for it! Let me know if I can help.
Btw, it seems like it doesn't happen using sbt run, but it definitely happens after sbt dist (using SBT Native packager)

from kamon.

ivantopo avatar ivantopo commented on August 11, 2024

@adrien-aubel I just created #36 to track that bug, it would be nice if you can go there and give us a bit more info, thanks for reporting!

from kamon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.