-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Provide more finely grained metrics for Spring Data REST repositories #14872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. It's an interesting problem. I'm not sure that there's much we can do about it in Spring Boot alone as it would require detailed understanding of Spring Data REST's URI structure and knowing the likely cardinality of each parameter in the path. For example, you would want separate stats for We currently get the matching path pattern ( What do you think @olivergierke and @mp911de? |
The usage of We also use the Another reason that moving off that model might not be as easy is that users can currently use the I'll consult @rstoyanchev but I'm afraid this – if possible at all – will not be a quick fix. I wonder if in the meantime there's a hook in the metrics APIs that some component registered by the auto-configuration for Spring Data REST could use to create different buckets. I.e. something similar to what @high-stakes has in place but that can be more focussed using Spring Data REST internal metadata. |
Thanks for taking a look, @olivergierke. I wasn't proposing a changing to any of Spring Data REST's mappings. I was wondering if it would be possible if Spring Data REST could, during request handling, set a request attribute with a path pattern in it after it's resolved the repository. That pattern could contains a little more information than Spring MVC's as it could replace the |
To put that another way, I am proposing that this:
Could be done by Spring Data REST and the result placed in a request attribute. |
Not sure if this helps or not but as of 5.1, it possible to assign a base path to a controller, through external configuration (via Also since 4.2 there has been a public API to register and unregister controller methods programmatically, see SPR-11541 and docs. |
…tribute. We now expose a partially resolved PathPattern to contain the explicit repository base path so that the subpaths can be grouped around the individual repositories exposed. Related ticket: spring-projects/spring-boot#14872
…tribute. We now expose a partially resolved PathPattern to contain the explicit repository base path so that the subpaths can be grouped around the individual repositories exposed. Related ticket: spring-projects/spring-boot#14872
…tribute. We now expose a partially resolved PathPattern to contain the explicit repository base path so that the subpaths can be grouped around the individual repositories exposed. Related ticket: spring-projects/spring-boot#14872
I've filed, fixed and back-ported DATAREST-1294 into Lovelace and Kay maintenance branches. We now expose a As per @rstoyanchev's suggestion I also filed DATAREST-1295 to investigate if we can drop our own base path handling in favor of Spring MVCs. |
Great stuff. Thank you, @olivergierke. We'll need to wait a little while to implement this as there's no release of the Spring Data release train planned before Boot 2.1.0.RELEASE. |
If you'd be willing to upgrade to a bugfix release even after RC1 we can easily ship one in time. |
Yeah, we'd be happy to do that. Bug fixes are fine post-RC. Would you be able to ship a Kay release train too? That would allow us to do this in 2.0.x at the same time. I think a change in 2.0.x is warranted as it's low-risk and it's a bit arguable whether the current behaviour could actually be considered as a bug due to the metrics being rather useless. |
I'll schedule a Kay and Lovelace service release for Friday next week then. /cc @mp911de |
I'll defer to @olivergierke on that one. Any change to support it would be in Spring Data REST so |
Uh oh!
There was an error while loading. Please reload this page.
No description provided.
The text was updated successfully, but these errors were encountered: