Experience Running with Scala / Play Framework?

toml

Posted on
Jan 14 2014

While I expect Raygun would get on just fine in my Scala Play Framework app because it supports Java, does anyone have experience doing so?


John-Daniel Trask

Raygun

Posted on
Jan 17 2014

Just letting you know toml that I've been looking into this today, and have the environment set up. I foresee no reason why this wouldn't work, but I'll get back to you in three days (long weekend coming up where we are) with the results of this.

If there's any further work needed on Raygun4Java to support Scala/Play I will perform this next week.

Regards,

Callum Gavin
Software Developer
Mindscape


toml

Posted on
Jan 18 2014

We have it running in Play 2 now with the following addition to Build.scala dependencies:

 // raygun
"com.mindscapehq" % "raygun4java" % "1.3",
"com.mindscapehq" % "core" % "1.3",

and the following hook in Global.scala's onError:

current.configuration.getString("incrowdapi.raygun.key").fold({
              Logger.error("Raygun key not found!!! Fix this now!")
            })({ key =>
          val client:RaygunClient = new RaygunClient(key)
          client.Send(error)
            })

John-Daniel Trask

Raygun

Posted on
Jan 21 2014

Beat me to it! Glad you've had success in sending errors with it. I noticed the provider could support transmitting the data available on Play's Http.Request object, as in the webprovider module, which I believe will be a reasonable and valuable addition given Play's focus. This will naturally need to be a separate module, however, but it shouldn't take too much work. I will let you know when this is released and available from Maven.

Regards,

Callum Gavin
Mindscape Limited


John-Daniel Trask

Raygun

Posted on
Jan 29 2014

For those that are interested in the future, Raygun4Java now contains a dedicated Play 2 provider in the com.mindscapehq.raygun4java.play2 package. It is currently released as alpha v0.4.2, and allows your Play 2 web app to send HTTP request data. It can be used from both Scala and Java projects. Usage instructions are found at the Raygun4Java GitHub repository readme.

As this is an alpha, any comments or issues will be gladly accepted, either in these forums or via GitHub.


Reply