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

Make logging of MQTT realtime updater more uniform #5642

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

abyrd
Copy link
Member

@abyrd abyrd commented Jan 24, 2024

Summary

This makes the messages output by the MQTT GTFS Realtime updater more similar to those produced by other updaters. It just makes the logs more uniform and slightly more informative.

It has been tested in local usage with a connection to the Digitransit MQTT RT feeds.

The code formatting rules make the toString method harder to read, so maybe this should be converted to a StringBuilder or equivalent.

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 67.78%. Comparing base (5edc5ae) to head (c80651c).
Report is 2 commits behind head on dev-2.x.

Files Patch % Lines
...pplanner/updater/trip/MqttGtfsRealtimeUpdater.java 0.00% 7 Missing ⚠️
...anner/updater/alert/GtfsRealtimeAlertsUpdater.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5642      +/-   ##
=============================================
- Coverage      67.79%   67.78%   -0.01%     
+ Complexity     16524    16521       -3     
=============================================
  Files           1904     1904              
  Lines          72267    72273       +6     
  Branches        7439     7439              
=============================================
- Hits           48991    48989       -2     
- Misses         20759    20767       +8     
  Partials        2517     2517              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

abyrd added 3 commits March 14, 2024 21:05
Unfortunately the resulting toString method following formatting rules
is harder to read.
@abyrd abyrd force-pushed the abyrd/realtime-startup-logging branch from 3884b38 to c80651c Compare March 14, 2024 13:35
@abyrd
Copy link
Member Author

abyrd commented Mar 14, 2024

Tested on Finland data and updater:

21:30:37.655 INFO [main]  (GtfsRealtimeAlertsUpdater.java:54) Creating real-time alert updater running every PT30S: https://realtime.hsl.fi/realtime/service-alerts/v2/hsl
21:30:37.657 INFO [main]  (PollingVehiclePositionUpdater.java:64) Creating vehicle position updater running every PT30S: GtfsRealtimeHttpVehiclePositionSource{url: https://realtime.hsl.fi/realtime/vehicle-positions/v2/hsl}
21:30:37.675 INFO [main]  (MqttGtfsRealtimeUpdater.java:83) Creating streaming GTFS-RT TripUpdate updater subscribing to MQTT broker at tcp://pred.rt.hsl.fi
21:30:37.677 INFO [main]  (GraphUpdaterManager.java:111) Scheduling polling updater GtfsRealtimeAlertsUpdater{url: 'https://realtime.hsl.fi/realtime/service-alerts/v2/hsl'}
21:30:37.678 INFO [main]  (GraphUpdaterManager.java:111) Scheduling polling updater PollingVehiclePositionUpdater{source: GtfsRealtimeHttpVehiclePositionSource{url: https://realtime.hsl.fi/realtime/vehicle-positions/v2/hsl}}
21:30:37.678 INFO [main]  (GraphUpdaterManager.java:123) Starting new thread for updater MqttGtfsRealtimeUpdater{url: 'tcp://pred.rt.hsl.fi', topic: 'gtfsrt/v2/fi/hsl/tu', feedId: '1'}

@abyrd abyrd marked this pull request as ready for review March 14, 2024 13:36
@abyrd abyrd requested a review from a team as a code owner March 14, 2024 13:36
@leonardehrenfried leonardehrenfried merged commit 29b0010 into dev-2.x Mar 21, 2024
6 checks passed
@leonardehrenfried leonardehrenfried deleted the abyrd/realtime-startup-logging branch March 21, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants