You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kuznetsov <ak...@apache.org> on 2019/11/06 09:37:36 UTC

Lets add measure units for metrics

Hi, All!

I'm working on a tool for metrics monitoring.
And found that Metric interface [1] has a name and description, but has not
measurement units.

When you are working on a tool that collects all metrics and shows it in
human readable format it is a very important piece of information.

Because we have a lot of different metrics, some of them in bytes, some of
them in percents, some of them are simple counters and so on and so forth.

How about to add Enum with all possible measurement units to  Metric
interface [1] ?

Thoughts?

[1]
https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java

-- 
Alexey Kuznetsov

Re: Lets add measure units for metrics

Posted by Andrey Gura <ag...@apache.org>.
Stephen,

All metrics will be local for node. Cluster wide metric is some
aggregation which could and must be done by special tools not Ignite.

We already have dozen cluster wide but meaningless metrics and a lot
of code for aggregation. It just isn't our job. All cluster wide
metrics will be removed in Apache Ignite 3.0 (or at least most of
them). Most metrics will be rethinked.

On Wed, Nov 6, 2019 at 3:44 PM Stephen Darlington
<st...@gridgain.com> wrote:
>
> Another thing that I would like to see in the metrics is the scope: is this metric cluster-wide or only for this node?
>
> Like the units of measure, this could be an extra field. Or it could be naming convention? (Currently many node-specific metrics have “local” in the name, but this is not entirely consistent.) Either way, I agree that hiding this information in a plain-text field is not a good idea; it should be possible to determine programatically.
>
> Regards,
> Stephen
>
> > On 6 Nov 2019, at 12:48, Alexey Kuznetsov <ak...@gridgain.com> wrote:
> >
> > Andrey,
> >
> > The main reason of separate field - is a simplicity of usage in tools.
> > Yes, we can have measurement units in description, but external tool will
> > be forced to parse textual representation of units.
> > Description is a text that has no special format and how we can ask
> > developers to not forget to specify units in description?
> > But with enum we can make it mandatory field. Or write a test that will
> > check all metrics for "not null" for this field.
> >
> > What do you think?
> >
> >
> > On Wed, Nov 6, 2019 at 6:28 PM Andrey Gura <ag...@apache.org> wrote:
> >
> >> Units just can be added to a metric description. What is the purpose
> >> of dedicated field for it?
> >>
> >> We doesn't provide any API for work with measurement units and should
> >> not do it. Metrics interpretation is responsibility of external
> >> systems for metrics gathering. Enum with metrics measurement doesn't
> >> bring any value for external systems and only useful thing is self
> >> documentation.
> >>
> >> On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <ni...@apache.org>
> >> wrote:
> >>>
> >>> Hello, Alexey.
> >>>
> >>> I'm +1.
> >>> Let's do it.
> >>>
> >>> В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> >>>> Hi, All!
> >>>>
> >>>> I'm working on a tool for metrics monitoring.
> >>>> And found that Metric interface [1] has a name and description, but
> >> has not
> >>>> measurement units.
> >>>>
> >>>> When you are working on a tool that collects all metrics and shows it
> >> in
> >>>> human readable format it is a very important piece of information.
> >>>>
> >>>> Because we have a lot of different metrics, some of them in bytes,
> >> some of
> >>>> them in percents, some of them are simple counters and so on and so
> >> forth.
> >>>>
> >>>> How about to add Enum with all possible measurement units to  Metric
> >>>> interface [1] ?
> >>>>
> >>>> Thoughts?
> >>>>
> >>>> [1]
> >>>>
> >> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
> >>>>
> >>
> >
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
>
>

Re: Lets add measure units for metrics

Posted by Stephen Darlington <st...@gridgain.com>.
Another thing that I would like to see in the metrics is the scope: is this metric cluster-wide or only for this node?

Like the units of measure, this could be an extra field. Or it could be naming convention? (Currently many node-specific metrics have “local” in the name, but this is not entirely consistent.) Either way, I agree that hiding this information in a plain-text field is not a good idea; it should be possible to determine programatically.

Regards,
Stephen

> On 6 Nov 2019, at 12:48, Alexey Kuznetsov <ak...@gridgain.com> wrote:
> 
> Andrey,
> 
> The main reason of separate field - is a simplicity of usage in tools.
> Yes, we can have measurement units in description, but external tool will
> be forced to parse textual representation of units.
> Description is a text that has no special format and how we can ask
> developers to not forget to specify units in description?
> But with enum we can make it mandatory field. Or write a test that will
> check all metrics for "not null" for this field.
> 
> What do you think?
> 
> 
> On Wed, Nov 6, 2019 at 6:28 PM Andrey Gura <ag...@apache.org> wrote:
> 
>> Units just can be added to a metric description. What is the purpose
>> of dedicated field for it?
>> 
>> We doesn't provide any API for work with measurement units and should
>> not do it. Metrics interpretation is responsibility of external
>> systems for metrics gathering. Enum with metrics measurement doesn't
>> bring any value for external systems and only useful thing is self
>> documentation.
>> 
>> On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <ni...@apache.org>
>> wrote:
>>> 
>>> Hello, Alexey.
>>> 
>>> I'm +1.
>>> Let's do it.
>>> 
>>> В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
>>>> Hi, All!
>>>> 
>>>> I'm working on a tool for metrics monitoring.
>>>> And found that Metric interface [1] has a name and description, but
>> has not
>>>> measurement units.
>>>> 
>>>> When you are working on a tool that collects all metrics and shows it
>> in
>>>> human readable format it is a very important piece of information.
>>>> 
>>>> Because we have a lot of different metrics, some of them in bytes,
>> some of
>>>> them in percents, some of them are simple counters and so on and so
>> forth.
>>>> 
>>>> How about to add Enum with all possible measurement units to  Metric
>>>> interface [1] ?
>>>> 
>>>> Thoughts?
>>>> 
>>>> [1]
>>>> 
>> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
>>>> 
>> 
> 
> 
> -- 
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com



Re: Lets add measure units for metrics

Posted by Andrey Gura <ag...@apache.org>.
> Yes, we can have measurement units in description, but external tool will
be forced to parse textual representation of units.

We do not know anything about that tools. What kind of units they
support? What kind of actions can be done with measurement on the
external tool side? We can only guess about this. We can't even make
an exhaustive list of units.

So, from my point of view, it is task without formalized requirements.

And moreover, it is useless task because most tools just store and
display named values and provide user defined aggregations over that
values. It doesn't make sense to keeping measurement and transferring
measurement units between servers. Just redundant data and investing
to global warm up :) Units are about metric values interpretation. But
interpretation is out of scope for Ignite.

On Wed, Nov 6, 2019 at 2:48 PM Alexey Kuznetsov <ak...@gridgain.com> wrote:
>
> Andrey,
>
> The main reason of separate field - is a simplicity of usage in tools.
> Yes, we can have measurement units in description, but external tool will
> be forced to parse textual representation of units.
> Description is a text that has no special format and how we can ask
> developers to not forget to specify units in description?
> But with enum we can make it mandatory field. Or write a test that will
> check all metrics for "not null" for this field.
>
> What do you think?
>
>
> On Wed, Nov 6, 2019 at 6:28 PM Andrey Gura <ag...@apache.org> wrote:
>
> > Units just can be added to a metric description. What is the purpose
> > of dedicated field for it?
> >
> > We doesn't provide any API for work with measurement units and should
> > not do it. Metrics interpretation is responsibility of external
> > systems for metrics gathering. Enum with metrics measurement doesn't
> > bring any value for external systems and only useful thing is self
> > documentation.
> >
> > On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <ni...@apache.org>
> > wrote:
> > >
> > > Hello, Alexey.
> > >
> > > I'm +1.
> > > Let's do it.
> > >
> > > В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> > > > Hi, All!
> > > >
> > > > I'm working on a tool for metrics monitoring.
> > > > And found that Metric interface [1] has a name and description, but
> > has not
> > > > measurement units.
> > > >
> > > > When you are working on a tool that collects all metrics and shows it
> > in
> > > > human readable format it is a very important piece of information.
> > > >
> > > > Because we have a lot of different metrics, some of them in bytes,
> > some of
> > > > them in percents, some of them are simple counters and so on and so
> > forth.
> > > >
> > > > How about to add Enum with all possible measurement units to  Metric
> > > > interface [1] ?
> > > >
> > > > Thoughts?
> > > >
> > > > [1]
> > > >
> > https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
> > > >
> >
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com

Re: Lets add measure units for metrics

Posted by Alexey Kuznetsov <ak...@gridgain.com>.
Andrey,

The main reason of separate field - is a simplicity of usage in tools.
Yes, we can have measurement units in description, but external tool will
be forced to parse textual representation of units.
Description is a text that has no special format and how we can ask
developers to not forget to specify units in description?
But with enum we can make it mandatory field. Or write a test that will
check all metrics for "not null" for this field.

What do you think?


On Wed, Nov 6, 2019 at 6:28 PM Andrey Gura <ag...@apache.org> wrote:

> Units just can be added to a metric description. What is the purpose
> of dedicated field for it?
>
> We doesn't provide any API for work with measurement units and should
> not do it. Metrics interpretation is responsibility of external
> systems for metrics gathering. Enum with metrics measurement doesn't
> bring any value for external systems and only useful thing is self
> documentation.
>
> On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <ni...@apache.org>
> wrote:
> >
> > Hello, Alexey.
> >
> > I'm +1.
> > Let's do it.
> >
> > В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> > > Hi, All!
> > >
> > > I'm working on a tool for metrics monitoring.
> > > And found that Metric interface [1] has a name and description, but
> has not
> > > measurement units.
> > >
> > > When you are working on a tool that collects all metrics and shows it
> in
> > > human readable format it is a very important piece of information.
> > >
> > > Because we have a lot of different metrics, some of them in bytes,
> some of
> > > them in percents, some of them are simple counters and so on and so
> forth.
> > >
> > > How about to add Enum with all possible measurement units to  Metric
> > > interface [1] ?
> > >
> > > Thoughts?
> > >
> > > [1]
> > >
> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
> > >
>


-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: Lets add measure units for metrics

Posted by Andrey Gura <ag...@apache.org>.
Units just can be added to a metric description. What is the purpose
of dedicated field for it?

We doesn't provide any API for work with measurement units and should
not do it. Metrics interpretation is responsibility of external
systems for metrics gathering. Enum with metrics measurement doesn't
bring any value for external systems and only useful thing is self
documentation.

On Wed, Nov 6, 2019 at 12:42 PM Nikolay Izhikov <ni...@apache.org> wrote:
>
> Hello, Alexey.
>
> I'm +1.
> Let's do it.
>
> В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> > Hi, All!
> >
> > I'm working on a tool for metrics monitoring.
> > And found that Metric interface [1] has a name and description, but has not
> > measurement units.
> >
> > When you are working on a tool that collects all metrics and shows it in
> > human readable format it is a very important piece of information.
> >
> > Because we have a lot of different metrics, some of them in bytes, some of
> > them in percents, some of them are simple counters and so on and so forth.
> >
> > How about to add Enum with all possible measurement units to  Metric
> > interface [1] ?
> >
> > Thoughts?
> >
> > [1]
> > https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
> >

Re: Lets add measure units for metrics

Posted by Nikolay Izhikov <ni...@apache.org>.
Hello, Alexey.

I'm +1.
Let's do it.

В Ср, 06/11/2019 в 16:37 +0700, Alexey Kuznetsov пишет:
> Hi, All!
> 
> I'm working on a tool for metrics monitoring.
> And found that Metric interface [1] has a name and description, but has not
> measurement units.
> 
> When you are working on a tool that collects all metrics and shows it in
> human readable format it is a very important piece of information.
> 
> Because we have a lot of different metrics, some of them in bytes, some of
> them in percents, some of them are simple counters and so on and so forth.
> 
> How about to add Enum with all possible measurement units to  Metric
> interface [1] ?
> 
> Thoughts?
> 
> [1]
> https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/spi/metric/Metric.java
>