curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-349) Expose extra metrics in TracerDriver
Date Mon, 10 Oct 2016 21:08:20 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563505#comment-15563505
] 

ASF GitHub Bot commented on CURATOR-349:
----------------------------------------

Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/165#discussion_r82682285
  
    --- Diff: curator-client/src/main/java/org/apache/curator/ConnectionState.java ---
    @@ -199,13 +202,28 @@ private synchronized void checkTimeouts() throws Exception
                         {
                             log.error(String.format("Connection timed out for connection
string (%s) and timeout (%d) / elapsed (%d)", zooKeeper.getConnectionString(), connectionTimeoutMs,
elapsed), connectionLossException);
                         }
    -                    tracer.get().addCount("connections-timed-out", 1);
    +                    new EventTrace("connections-timed-out", tracer.get(), getSessionId()).commit();
                         throw connectionLossException;
                     }
                 }
             }
         }
     
    +    /**
    +     * Return the current session id
    +     */
    +    public long getSessionId() {
    +        long sessionId = -1;
    +        if (isConnected()) {
    +            try {
    +                sessionId = getZooKeeper().getSessionId();
    --- End diff --
    
    This is an expensive call. Is it really necessary? Maybe we can get the session ID cheaper
by a direct call to `zooKeeper.getZooKeeper()` - (checking for nulls)


> Expose extra metrics in TracerDriver
> ------------------------------------
>
>                 Key: CURATOR-349
>                 URL: https://issues.apache.org/jira/browse/CURATOR-349
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Fangmin Lv
>
> Currently, the TracerDriver exposed the latency of ZK operations, in multi-tenant environment,
extra metrics are required to help tracing and monitoring:
> * the bytes being sent and received, so we can monitor the client usage scenarios.
> * which ensemble participant the client is talking to, used to find out the problematic
Zk server when the issue happened.
> * the z-node path, to easily find out which z-node caused the problem, like high load,
etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message