jetty/jetty.project
View on GitHubImprove ConnectionStatistics to report per-protocol information
Open
#4184 opened on Oct 11, 2019
EnhancementHelp WantedLow PriorityPinned
Description
Currently, ConnectionStatistics listens to the "connection closed" event, and when it happens it retrieves the connection information from the Connection object passed in the event.
Would be great if this information could be split per-protocol.
This would involve:
- a new
Connection.getProtocol()method so that it would be possible to know what protocol was that connection speaking - a different implementation of
ConnectionStatisticsto store per-protocol information (as well as the totals) - Possibly a
ConnectionStatisticsMBeanthat displays the per-protocol data in a JMX friendly way. JMX'sCompositeTyperepresents a struct; in this case it can have these fields:[protocol, bytesIn, bytesOut, messagesIn, messagesOut]. JMX'sCompositeDatais an instance of the struct with the actual values for those fields. JMX'sTabularDatais aMapwhere you can map aStringto aCompositeData(I think - this class is so obscure I completely forgotten it was so obscure). Point being that either via an array ofCompositeData, or viaTabularDatawe can return the connection information split by protocol.