Typed session-start and session-end records - #768
Merged
Merged
Conversation
SessionStart and SessionEnd carried Socket.toString() as an opaque info string. They now expose host, remotePort and localPort, named as in Connect and Disconnect so viewers can share one template, and SessionEnd adds the session duration measured from accept to close. ISOServer populates both from the accepted socket. No other construction site exists in jPOS or jPOS-EE. Closes #767
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #767. First slice of typed payloads for opaque audit records.
What
info(which wasSocket.toString()) is gone. Host, remote port and local port are named fields, with the same names asConnectandDisconnectso one viewer template renders all four.SessionEnd.durationis the session length, measured from anInstantcaptured when the session thread starts.hostisnull-omitted in JSON for channels that expose no socket; the ports default to 0 in that case.Tests
ISOServerTest.testSessionEventsUseStableRealmAndDynamicTagsnow asserts host127.0.0.1, local port equal to the server port and a positive remote port onSessionStart, and matching ports plus a non-negative duration onSessionEnd.KindTestconstructor calls updated.:jpos:testand:jpos:javadocpass.Release note
The
session-startandsession-endpayload shape changes:infodisappears;host,remotePort,localPortappear, andsession-endgainsduration. The Control Plane log viewer renders both records and needs to read the new fields, keeping a fallback oninfofor already-indexed events.