Skip to content
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

Observability for JMS, Messaging and other templates/integration points #30094

Closed
mdeinum opened this issue Mar 9, 2023 · 5 comments
Closed
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: observability An issue related to observability and tracing

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Mar 9, 2023

Currently observability has been added, mainly, to the web related parts of the framework. Other portfolio projects implement observability as well (like Spring Integration, Spring Batch etc.). However there are some places in the framework like the JmsTemplate, MessagingTemplate etc. which might/could also benefit from metrics/tracing. Especially when used in combination with the web.

The same might apply/be useful for the DispatcherServlet (or the reactive variant) to include some metrics/tracing as well.

How far should the observability/metrics story go in the framework itself?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 9, 2023
@bclozel bclozel self-assigned this Mar 9, 2023
@bclozel bclozel added the theme: observability An issue related to observability and tracing label Mar 9, 2023
@bclozel
Copy link
Member

bclozel commented Mar 9, 2023

Hey @mdeinum

There's no general rule and we're considering this on a case by case basis.

  1. is there metrics/tracing support in similar libraries or semantic conventions in other instrumentations (like OTel) for this?
  2. Framework primarily relies on the Observation API which drives timers (but not gauges or other types); is this compatible with the data we would like?
  3. Tracing is an important part of the story; is context propagation possible there, especially for remote calls (i.e. is there a way to contribute tracing information to outgoing/from incoming messages?).
  4. We want to keep the instrumentation useful and concise, and avoid overwhelming developers with more data than necessary for observability. Typically we don't want to step into the world of profilers or debuggers.

*Template instrumentation can be all considered in my opinion. We have to tackle them one by one and make sure to get actionable feedback from real world usage as for these features, operational aspects are key. Once infrastructure is out, we must ensure that we don't break APIs, and that we don't break existing dashboards.

I'm not sure about DispatcherServlet instrumentation - what would you like to see there?

I would be in favor of creating dedicated issues for each instrumentation so that each has a place for discussing the KeyValues, observation name, convention, behavior, etc. I think we should close this issue in favor of others once this conversation has reached a good place. What do you think?

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Mar 9, 2023
@mdeinum
Copy link
Contributor Author

mdeinum commented Mar 13, 2023

Not sure if the DispatcherServlet needs any, when looking at Spring Boot there is already metrics etc. available for incoming requests for both the Servlet as well the Reactive support.

For the different messaging templates I was think something analogous to the web observability? Like messages/timing per destination. Looking at the OTel it falls between the HTTP and RPC stuff (as that seems mostly web related). Depending on the messaging in use it might be doable to support tracing through message headers, but that might be dipping into Spring Cloud messaging support as well (or this could serve as a basis for that in the long run)?

Creating dedicated issues for each instrumentation seems like a good fit, that also seems like to be how things are handled currently.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 13, 2023
@rstoyanchev rstoyanchev added the in: messaging Issues in messaging modules (jms, messaging) label Mar 27, 2023
@vpavic
Copy link
Contributor

vpavic commented Apr 13, 2023

Are there plans to add observability for JMS in 6.1?

I'm asking because issues like #29883 and #30089 are in the 6.1.x milestone and this one is not.

Perhaps this is because there are several topics that have been brought up here, and maybe some of them should be tracked in separate issues and have this one track only observability for JMS?

@bclozel
Copy link
Member

bclozel commented Apr 13, 2023

Indeed @vpavic, we should create dedicated issues for each technology. If you've got knowledge and uses cases in the JMS space, please create a new issue.

I'm closing this issue as it's too general right now. If you're reading this issue and would like to get observability support in Spring Framework for a particular technology and you have concrete use cases to test that support - same process applies: please create a new issue.

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2023
@bclozel bclozel added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on in: messaging Issues in messaging modules (jms, messaging) status: feedback-provided Feedback has been provided labels Apr 13, 2023
@bclozel bclozel removed their assignment Apr 13, 2023
@vpavic
Copy link
Contributor

vpavic commented Apr 13, 2023

I've opened #30335.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: observability An issue related to observability and tracing
Projects
None yet
Development

No branches or pull requests

5 participants