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

Micrometer - Add missing metrics for cases of client errors #5592

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

adpaste
Copy link
Contributor

@adpaste adpaste commented Apr 4, 2024

@adpaste adpaste changed the title Add missing metrics for cases of client errors Micrometer - Add missing metrics for cases of client errors Apr 4, 2024
@senivam
Copy link
Contributor

senivam commented Apr 4, 2024

Thank you for the PR. Will the #5531 be fixed either?

@adpaste
Copy link
Contributor Author

adpaste commented Apr 4, 2024

No problem! #5531 is a different issue.

@adpaste adpaste marked this pull request as ready for review April 4, 2024 14:04
@senivam
Copy link
Contributor

senivam commented Apr 5, 2024

No problem! #5531 is a different issue.

yes, I'm just reminding in order not to forget about it :)

@senivam senivam added the micrometer issues/PRs related to the Micrometer extension support. label Apr 5, 2024
@senivam senivam added this to the 2.43 milestone Apr 22, 2024
@senivam senivam merged commit 75a9755 into eclipse-ee4j:2.x Apr 22, 2024
7 checks passed
@andersflemmen
Copy link

Any chance for this fix to be ported to the 3.x version as well? We are actually seeing NullPointerExceptions caused by matchingPattern being null when making a request to a non-existing URL.

@senivam
Copy link
Contributor

senivam commented Jun 28, 2024

@andersflemmen it should already be there, all fixes in the 2.x are later uptaken by 3.0, 3.1 etc.

@andersflemmen
Copy link

andersflemmen commented Jul 1, 2024

Sorry, the error actually occurs in the JerseyKeyValues class. Seems like that one had a similar fix in the micrometer repo:
micrometer-metrics/micrometer@66c1d47

Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "matchingPattern" is null
        at org.glassfish.jersey.micrometer.server.JerseyKeyValues.uri(JerseyKeyValues.java:96)
        at org.glassfish.jersey.micrometer.server.DefaultJerseyObservationConvention.getLowCardinalityKeyValues(DefaultJerseyObservationConvention.java:43)
        at org.glassfish.jersey.micrometer.server.DefaultJerseyObservationConvention.getLowCardinalityKeyValues(DefaultJerseyObservationConvention.java:30)
        at io.micrometer.observation.SimpleObservation.start(SimpleObservation.java:152)
        at io.micrometer.observation.docs.ObservationDocumentation.start(ObservationDocumentation.java:241)
        at org.glassfish.jersey.micrometer.server.ObservationRequestEventListener.startObservation(ObservationRequestEventListener.java:99)
        at org.glassfish.jersey.micrometer.server.ObservationRequestEventListener.onEvent(ObservationRequestEventListener.java:71)
        at org.glassfish.jersey.server.internal.monitoring.CompositeRequestEventListener.onEvent(CompositeRequestEventListener.java:47)
        at org.glassfish.jersey.server.internal.process.RequestProcessingContext.triggerEvent(RequestProcessingContext.java:203)
        at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:442)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:282)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:266)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:253)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:696)
        at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
        ... 128 common frames omitted

@jansupol
Copy link
Contributor

jansupol commented Jul 4, 2024

@andersflemmen I have it backported in #5690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
micrometer issues/PRs related to the Micrometer extension support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants