Skip to content

Automatic metrics configuration for WebMvc in non-boot environments #27277

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

Closed
stolsvik opened this issue Aug 13, 2021 · 2 comments
Closed

Automatic metrics configuration for WebMvc in non-boot environments #27277

stolsvik opened this issue Aug 13, 2021 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue theme: observability An issue related to observability and tracing

Comments

@stolsvik
Copy link

Spring Boot has WebMvcMetricsFilter and WebMvcMetricsAutoConfiguration that "magically" instruments all RequestMappings and similar with Micrometer metrics.

It would be great if this was possible to do in a core Spring project too.

(On a general note, I find this happens often now: Boot gets new tricks and features which just as well could have been introduced in core Spring, and benefit both types of projects. This is sad.)

PS: I find the solution for this instrumenting to be a bit .. high level? One would maybe have thought that Spring easily could have instrumented this on a lower level - directly on the mappings - thereby directly taking advantage of the knowledge of the path with path variables etc.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 13, 2021
@sbrannen sbrannen added the theme: observability An issue related to observability and tracing label Sep 6, 2021
@rstoyanchev rstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Sep 21, 2021
@bclozel
Copy link
Member

bclozel commented Sep 21, 2021

As announced at SpringOne 2021, the Spring team is working on new observability efforts across the portfolio. Possibly coming up with a high level API that would allow to instrument projects without depending on actual implementations.

This problem can be split into several parts:

  1. Instrumenting Framework code in specific places
  2. Configuring the broader metrics ecosystem (Micrometer, Sleuth, monitoring system, etc)
  3. Instrumenting for metrics that are specific to the deployment arrangement
  4. Configuring the entire infrastructure

We can only look into 1) in Spring Framework.
2) 3) and 4) require way more opinions on the choice of dependencies and deployment. This is really tied to how Spring Boot applications are deployed and set up. Shipping a generic implementation that is applicable to many deployment opinions is way more challenging.

@bclozel bclozel self-assigned this Apr 14, 2022
@bclozel bclozel added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 27, 2022
@bclozel
Copy link
Member

bclozel commented Jul 27, 2022

Closing in favor of #28880

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue theme: observability An issue related to observability and tracing
Projects
None yet
Development

No branches or pull requests

5 participants