From dev-return-105771-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Tue Jul 16 16:58:52 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 86E7D18064E for ; Tue, 16 Jul 2019 18:58:52 +0200 (CEST) Received: (qmail 1164 invoked by uid 500); 16 Jul 2019 16:58:50 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 1150 invoked by uid 99); 16 Jul 2019 16:58:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2019 16:58:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 04A4A1825A7 for ; Tue, 16 Jul 2019 16:58:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.199 X-Spam-Level: X-Spam-Status: No, score=-0.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=confluent.io Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K5NEA5T9qfkz for ; Tue, 16 Jul 2019 16:58:47 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::336; helo=mail-wm1-x336.google.com; envelope-from=john@confluent.io; receiver= Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E2F277E20D for ; Tue, 16 Jul 2019 16:58:46 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id p74so19375869wme.4 for ; Tue, 16 Jul 2019 09:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=confluent.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Atbvryt238cvCbg9tCEYWL4rclSpRpjY4d9j3i9ScIk=; b=bkw2wesNKabn1ZcZcY01Z5V/jtwv4FtnwMeh7jAwr0Ye5JOJC8DXmgZGGsBHD4Q06S mwAESuMh10Sge2iIgzn7EwBGWP/8/oRKEfoJagYq9F1/oh3v05SP2Qt5PCjhfxy/kgFT Tbm9Q8F8Q5pAVrm7JYsbUGhOlZHagOEFCNVfdTOa+hrTuleRlzKPvMSVlegNcpVqfT3j 3LY4aDVrRdZ7wuz4SPz0JLSWga5o1+iGIGT//cY6tVrgK868Ml4AG3POB/YhTrT3eKNe yG69bnnd8q6xKZP7CyycneL/uFX+fT7zO7BJOuvQj+C9POvlzmvkfOXFFHFd1YANvnQt y6nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Atbvryt238cvCbg9tCEYWL4rclSpRpjY4d9j3i9ScIk=; b=uapksQgnJh7cJB1g0IBQROuBLE/vgdYTDPTUFNG2/aL0gW+NA4Yb23he8d/ZTOlkJy vLLqMFS+Ovd+ZXFEPqcrvQb0IY8t/amUgSgDBBQN3ro28f1YMA2TQ1o3CsUvUz//JhOt vEE4mx7YtLa8f5Ibq/02/H9D9yMtjU+HFNHH3M2doeFk5g3x0LYB1zhPNsV9Nz+i6xc0 hZuYmiEwLcTiAPq0MePKBEfAd7m476JlEpOnvz86rzFFzXZpSOuXXgDx72VJ5zJAL2gl LxNit6wxxBiyengf60/nY/yEehztDix/MR/LGXLVEHib+DXMJmGOKoNmP8H3cQA347w8 pojA== X-Gm-Message-State: APjAAAWvg3LAvQLzA4ZoRRJqaxm9fWSVeR/vdX6SpqBDvuRPOO6teHHg qAKijYIkEii/RFnrFCa4HAC4oWdqx72wJWK/2YXwMxo5 X-Google-Smtp-Source: APXvYqx7OeOdsZhrdre9GjTJZrt5WTZSbaV4m179IKXbqD8aYs2KXr2EAYa+U98FIC7hOipyIzNGaUJexzohiJwJ70k= X-Received: by 2002:a05:600c:23d2:: with SMTP id p18mr30535389wmb.108.1563296325996; Tue, 16 Jul 2019 09:58:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John Roesler Date: Tue, 16 Jul 2019 11:58:34 -0500 Message-ID: Subject: Re: [DISCUSS] KIP-488: Clean up Sum,Count,Total Metrics To: dev@kafka.apache.org Content-Type: text/plain; charset="UTF-8" Thanks for raising this concern, Ryanne, "Sampled" indicates that the metrics is sampled, namely that we maintain a set of samples from recent value measurements, which decay/expire over time. So, the metric value is only representative of the recent past. "Total" indicates that the metric value contains all the information from the creation of the metric. For example., the total sum would include all measurements since the app started up. It seems like your concern is that the word "total" doesn't really pinpoint this meaning, which is true. It's especially confusing that another meaning of "total" is synonymous with "sum", rendering the name "TotalSum" sort of absurd. We previously considered "cumulative", which was rejected as a mouthful (it's four syllables) . You mentioned "running", which might be a more appropriate modifier (RunningSum and RunningCount). What would everyone think about that? Thanks, -John On Tue, Jul 16, 2019 at 11:27 AM Ryanne Dolan wrote: > > John, I mentioned on the VOTE thread that the proposed names are a bit > confusing, > > > given that "sum", "total", and "count" are roughly synonymous... > > In particular, TotalSum is, I think, a "running total", though the naming > doesn't really capture that. > > I think to avoid confusion, we should define exactly what "total" and > "sampled" are supposed to indicate, and perhaps pick appropriate naming > from there. > > Ryanne > > > On Fri, Jul 12, 2019 at 1:42 PM John Roesler wrote: > > > Hey, thanks Matthias and Bruno, > > > > I agree, "Cumulative" is a mouthful. "TotalX" sounds fine to me. > > > > Also, yes, I would have liked to not have any modifier for > > "non-sampled", but there is a name conflict with Sum. > > > > I'll update the KIP to reflect "TotalX" and then start the vote thread. > > > > Thanks again, > > -John > > > > On Fri, Jul 12, 2019 at 11:27 AM Bruno Cadonna wrote: > > > > > > OK, makes sense. Then, I am in favour of TotalCount and TotalSum. > > > > > > Best, > > > Bruno > > > > > > On Fri, Jul 12, 2019 at 12:57 AM Matthias J. Sax > > wrote: > > > > > > > > `Sum` is an existing name, for the "sampled sum" metric, that gets > > > > deprecated. Hence, we cannot use it. > > > > > > > > If we cannot use `Sum` and use `TotalSum`, we should also not use > > > > `Count` but `TotalCount` for consistency. > > > > > > > > > > > > -Matthias > > > > > > > > > > > > > > > > On 7/11/19 12:58 PM, Bruno Cadonna wrote: > > > > > Hi John, > > > > > > > > > > Thank you for the KIP. > > > > > > > > > > LGTM > > > > > > > > > > I also do not like CumulativeSum/Count so much. I propose to just > > call > > > > > it Sum and Count. > > > > > > > > > > I understand that you want to unequivocally distinguish the two > > metric > > > > > functions by their names, but I have the feeling the names become > > > > > artificially complex. The exact semantics can also be documented in > > > > > the javadocs, which btw could also be improved in those classes. > > > > > > > > > > Best, > > > > > Bruno > > > > > > > > > > > > > > > > > > > > On Thu, Jul 11, 2019 at 8:25 PM Matthias J. Sax < > > matthias@confluent.io> wrote: > > > > >> > > > > >> Thanks for the KIP. Overall LGTM. > > > > >> > > > > >> The only though I have is, if we may want to use `TotalSum` and > > > > >> `TotalCount` instead of `CumulativeSum/Count` as names? > > > > >> > > > > >> > > > > >> -Matthias > > > > >> > > > > >> > > > > >> On 7/11/19 9:31 AM, John Roesler wrote: > > > > >>> Hi Kafka devs, > > > > >>> > > > > >>> I'd like to propose KIP-488 as a minor cleanup of some of our > > metric > > > > >>> implementations. > > > > >>> > > > > >>> KIP-488: https://cwiki.apache.org/confluence/x/kkAyBw > > > > >>> > > > > >>> Over time, iterative updates to these metrics has resulted in a > > pretty > > > > >>> confusing little collection of classes, and I've personally been > > > > >>> involved in three separate moderately time-consuming iterations of > > me > > > > >>> or someone else trying to work out which metrics are available, and > > > > >>> which ones are desired for a given use case. One of these was > > actually > > > > >>> a long-running bug in Kafka Streams' metrics, so not only has this > > > > >>> confusion been a time sink, but it has also led to bugs. > > > > >>> > > > > >>> I'm hoping this change won't be too controversial. > > > > >>> > > > > >>> Thanks, > > > > >>> -John > > > > >>> > > > > >> > > > > > >