-
Notifications
You must be signed in to change notification settings - Fork 2
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
DIRTY - Do not merge - Log failed itin checks and bus notifs #263
base: dev
Are you sure you want to change the base?
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.
👍 Good changes. I have something like the first one in my own repo (a LOG.debug()
line) but I don't check those in.
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.
Is it also worth adding a warning at the top of the method in case the otpResponse
is null?
@@ -301,7 +302,9 @@ private boolean makeOTPRequestAndUpdateMatchingItineraryInternal() { | |||
} | |||
|
|||
// If this point is reached, a matching itinerary was not found | |||
LOG.warn("No comparison itinerary found in otp response for trip"); | |||
LOG.warn("No comparison itinerary found in otp response for trip - params: {}", JsonUtils.toJson(this.trip.otp2QueryParams)); |
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.
Nit. this.
is not needed.
@@ -301,7 +302,9 @@ private boolean makeOTPRequestAndUpdateMatchingItineraryInternal() { | |||
} | |||
|
|||
// If this point is reached, a matching itinerary was not found | |||
LOG.warn("No comparison itinerary found in otp response for trip"); | |||
LOG.warn("No comparison itinerary found in otp response for trip - params: {}", JsonUtils.toJson(this.trip.otp2QueryParams)); | |||
LOG.warn("No comparison itinerary found in otp response for trip - saved itinerary: {}", JsonUtils.toJson(this.trip.itinerary)); |
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.
Nit. this.
is not needed.
LOG.warn("No comparison itinerary found in otp response for trip"); | ||
LOG.warn("No comparison itinerary found in otp response for trip - params: {}", JsonUtils.toJson(this.trip.otp2QueryParams)); | ||
LOG.warn("No comparison itinerary found in otp response for trip - saved itinerary: {}", JsonUtils.toJson(this.trip.itinerary)); | ||
LOG.warn("No comparison itinerary found in otp response for trip - OTP itineraries: {}", JsonUtils.toJson(otpResponse.plan.itineraries)); |
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.
Should this guard against a NPE in case plan is null?
I am also going to add logging for when an itinerary check fails on POSTing a monitored trip. |
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.
Changes LGTM.
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.
Change approved.
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.
Yes, these make sense. (Looked it over, now will look at other PR.)
Checklist
dev
before they can be merged tomaster
)Description
This PR adds logging to track data sent for trip monitoring to OTP and for bus notifications to respective services.