Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Upgrade statsd to Play 2.4 #147

Open
nemoo opened this issue Jun 4, 2015 · 6 comments
Open

Upgrade statsd to Play 2.4 #147

nemoo opened this issue Jun 4, 2015 · 6 comments

Comments

@nemoo
Copy link

nemoo commented Jun 4, 2015

Is there a timeline for the upgrade of statsd to Play 2.4.0?

@nemoo nemoo changed the title Upgrade statsd to Play 2.4.0 Upgrade statsd to Play 2.4 Jun 4, 2015
@jroper
Copy link
Member

jroper commented Jun 15, 2015

No, not really. I'm way too busy to do it myself.

@tunesmith
Copy link

The filter seems to work with 2.4 (without using GlobalSettings) if you do this:

class Filters @Inject() (stats: play.modules.statsd.api.StatsdFilter) extends HttpFilters { val filters = Seq(stats) }

(point play.http.filters to this class if it's not in your root package.)

lavrov added a commit to lavrov/play-plugins that referenced this issue Jun 8, 2016
@lautjy
Copy link

lautjy commented Sep 12, 2016

What would it require to update this for Play 2.4.x at this point? If it compiles, it works, right?

Its been over a year now. This repo doesn't seem to be very popular.
I myself am after the statsd plugin. It is just for convenience, but it would save me from bolting in a copy-pasta version.

@tunesmith
Copy link

I think the reason those integration tests don't pass is because of the changes from Play 2.2 to 2.3 .

Apparently, "dependsOn" is intended to work so that if A dependsOn B, then B is available in the classpath for A, but not vice-versa.

But before Play 2.3, it also worked the other way, which is why the project could see routes in the sample project.

As it is now, sample really does "dependsOn" root, because it needs to see the Statsd code - but nothing can see those routes.

I'm not sure it's really possible to have a subproject of this structure, where the subproject is integration tests with an Application and routes. I was only able to get most of the integration tests passing by putting them into an entirely new project.

Two of them still don't pass though - the ones that are designed to fail from the Application throwing RuntimeExceptions. I think the filter isn't properly recording all the timing data in those cases, so this is arguably a bug.

lavrov's commit to his fork looks like it works on 2.4. Although updating to 2.5 looks like a whole other project, due to how Play 2.5 streams data and responses. How else are people integrating statsd into their play projects these days?

@hmdavis
Copy link

hmdavis commented Nov 28, 2017

@tunesmith have you figured out a good way to get this plugin on more recent builds?

@phillip-peach
Copy link

As information the Routes object that the StatsdFilter is dependent on is deprecated in Play 2.4

@deprecated("Use play.api.routing.Router instead", "2.4.0")

It's gone away in 2.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants