You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by pgfox <gi...@git.apache.org> on 2017/11/23 14:12:03 UTC
[GitHub] activemq-artemis pull request #1665: ARTEMIS-1520 add connection ID to the t...
GitHub user pgfox opened a pull request:
https://github.com/apache/activemq-artemis/pull/1665
ARTEMIS-1520 add connection ID to the trace logging for reading/writing packets.
This helps correlate the packets read/written to an individual tcp connection
By setting
``
logger.org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.level=TRACE
logger.org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.level=TRACE
``
The output will contain an association between RemotingConnectionID and the local/remote tcp connection. Also, logging for the packets received and sent will have RemotingConnectionID associated making it easier to track the interaction on an individual connection.
``
RemotingConnectionImpl created: RemotingConnectionImpl [ID=2a27fbff, clientID=null, nodeID=e3635a94-d036-11e7-8bca-a860b60c8b30, transportConnection=org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection@460561df[ID=2a27fbff, local= /127.0.0.1:61616, remote=/127.0.0.1:55729]]
...
RemotingConnectionID=2a27fbff handling packet PACKET(CreateSessionMessage)[type=30, channelID=1, packetObject=CreateSessionMessage, autoCommitAcks=false,
...
RemotingConnectionID=2a27fbff Sending packet nonblocking PACKET(SessionBindingQueryResponseMessage_V4)[type=-15, channelID=11,
``
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pgfox/activemq-artemis connection_logging
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1665.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1665
----
commit 6f785de3d8afdf26da3cb56309b07e5b21feec32
Author: Pat Fox <pa...@gmail.com>
Date: 2017-11-13T19:03:17Z
ARTEMIS-1520 add connection ID to the trace logging output dealing with reading/writing packets.
This helps correlate the packets read/written to an individual tcp connection
----
---
[GitHub] activemq-artemis pull request #1665: ARTEMIS-1520 add connection ID to the t...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1665#discussion_r153621262
--- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java ---
@@ -656,17 +672,15 @@ private void addResendPacket(Packet packet) {
resendCache.add(packet);
if (logger.isTraceEnabled()) {
- logger.trace("ChannelImpl::addResendPacket adding packet " + packet + " stored commandID=" + firstStoredCommandID + " possible commandIDr=" + (firstStoredCommandID + resendCache.size()));
+ logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::addResendPacket adding packet " + packet + " stored commandID=" + firstStoredCommandID + " possible commandIDr=" + (firstStoredCommandID + resendCache.size()));
}
}
private void clearUpTo(final int lastReceivedCommandID) {
final int numberToClear = 1 + lastReceivedCommandID - firstStoredCommandID;
if (logger.isTraceEnabled()) {
- logger.trace("ChannelImpl::clearUpTo lastReceived commandID=" + lastReceivedCommandID +
- " first commandID=" + firstStoredCommandID +
- " number to clear " + numberToClear);
+ logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::clearUpTo lastReceived commandID=" + lastReceivedCommandID + " first commandID=" + firstStoredCommandID + " number to clear " + numberToClear);
--- End diff --
@pgfox I have already merged.. not a big deal.. but if you could avoid long lines on future PRs? :)
that might apply to myself as well :) so I will be more careful as well.
---
[GitHub] activemq-artemis pull request #1665: ARTEMIS-1520 add connection ID to the t...
Posted by pgfox <gi...@git.apache.org>.
Github user pgfox commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1665#discussion_r153641817
--- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java ---
@@ -656,17 +672,15 @@ private void addResendPacket(Packet packet) {
resendCache.add(packet);
if (logger.isTraceEnabled()) {
- logger.trace("ChannelImpl::addResendPacket adding packet " + packet + " stored commandID=" + firstStoredCommandID + " possible commandIDr=" + (firstStoredCommandID + resendCache.size()));
+ logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::addResendPacket adding packet " + packet + " stored commandID=" + firstStoredCommandID + " possible commandIDr=" + (firstStoredCommandID + resendCache.size()));
}
}
private void clearUpTo(final int lastReceivedCommandID) {
final int numberToClear = 1 + lastReceivedCommandID - firstStoredCommandID;
if (logger.isTraceEnabled()) {
- logger.trace("ChannelImpl::clearUpTo lastReceived commandID=" + lastReceivedCommandID +
- " first commandID=" + firstStoredCommandID +
- " number to clear " + numberToClear);
+ logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::clearUpTo lastReceived commandID=" + lastReceivedCommandID + " first commandID=" + firstStoredCommandID + " number to clear " + numberToClear);
--- End diff --
@clebertsuconic Thanks Clebert. I will try to avoid those long lines in the future.
---
[GitHub] activemq-artemis pull request #1665: ARTEMIS-1520 add connection ID to the t...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/1665
---