-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Handle RuntimeException when getting/setting JMS headers #5746
base: main
Are you sure you want to change the base?
Handle RuntimeException when getting/setting JMS headers #5746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
I'm thinking about the consequences of doing this: since this can happen if a propagation format that contains -
is used, this can hide the underlying problem and propagation still won't work.
I'm wondering if we should log a warning (maybe a warning first then debug using WarnThenDebugLogger
). What do you think?
f007427
to
d8fbfc7
Compare
Good idea. Pushed fix. |
...karta9/src/main/java/io/micrometer/jakarta9/instrument/jms/JmsProcessObservationContext.java
Outdated
Show resolved
Hide resolved
...karta9/src/main/java/io/micrometer/jakarta9/instrument/jms/JmsPublishObservationContext.java
Outdated
Show resolved
Hide resolved
...karta9/src/main/java/io/micrometer/jakarta9/instrument/jms/JmsProcessObservationContext.java
Outdated
Show resolved
Hide resolved
I think we should do this against |
Currently JMSException is handled when getting/setting JMS headers. Some JMS providers will throw RuntimeException instead of JMSException when failing to get/set JMS headers. This change adds so that all exceptions are handled.
d8fbfc7
to
0c40732
Compare
Pushed fixes. 👍 |
Currently JMSException is handled when getting/setting JMS headers. Some JMS providers will throw RuntimeException instead of JMSException when failing to get/set JMS headers. This change adds so that RuntimeException is also handled.
For example, Qpid JMS throws IllegalArgumentException which leads to similar issue as #4202.