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

Sergey Kadaner edited comment on IGNITE-17398 at 8/2/22 12:25 PM:
------------------------------------------------------------------

I see your point about it not being free, however, they say "Each labelset is 
an additional time series". As I understand it, that means that it is the same 
cost as creating the same number of time series. I.e. _cache_MY_CACHE_NAME1_ 
and _cache_MY_CACHE_NAME2_ metrics have the same cost as 
_cache\{name="MY_CACHE_NAME1"}_ and {_}cache\{name="MY_CACHE_NAME2"}{_}. So 
basically there is no additional cost in this case.

In fact, the previous section to the one you mentioned explains [when to use 
labels|https://prometheus.io/docs/practices/instrumentation/#use-labels] and it 
matches this case exactly.

It is hard to say how it affects the GC pressure without actually measuring it, 
but AFAIK modern garbage collectors (G1 and newer) are very good with 
short-lived objects and should not have issues reclaiming them.

The issue is also not simply a convenience problem unless you can suggest how 
to draw diagrams without the tags and without knowing cache names in advance.


was (Author: sergeykad):
I see your point about it not being free, however, they say "Each labelset is 
an additional time series". As I understand it, that means that it is the same 
cost as creating the same number of time series. I.e. _cache_MY_CACHE_NAME1_ 
and _cache_MY_CACHE_NAME2_ metrics have the same cost as 
_cache\{name="MY_CACHE_NAME1"}_ and {_}cache\{name="MY_CACHE_NAME2"}{_}. So 
basically there is no additional cost in this case.

It is hard to say how it affects the GC pressure without actually measuring it, 
but AFAIK modern garbage collectors (G1 and newer) are very good with 
short-lived objects and should not have issues reclaiming them.

The issue is also not simply a convenience problem unless you can suggest how 
to draw diagrams without the tags and without knowing cache names in advance.

> Opencensus metrics do not work well with Prometheus since it do not have tags
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-17398
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17398
>             Project: Ignite
>          Issue Type: Improvement
>    Affects Versions: 2.9.1
>            Reporter: Sergey Kadaner
>            Priority: Major
>              Labels: metrics
>         Attachments: image-2022-07-20-17-51-07-217.png
>
>
> The metrics created by the [new metrics 
> system|https://ignite.apache.org/docs/latest/monitoring-metrics/new-metrics] 
> are very inconvenient to use with Prometheus since it does not use tags.
> For example, Spring metric generated for the same cache looks like the 
> following in Prometheus and is very convenient to use:  
>  
> {noformat}
> cache_gets_total{cache="MY_CACHE_NAME",name="MY_CACHE_NAME",result="hit",} 
> 1387.0{noformat}
>  
> The native Ignite metric looks like the following: 
>  
> {noformat}
> cache_MY_CACHE_NAME_CacheHits 1387.0{noformat}
> The Spring reported statistics can be easily filtered by cache name and other 
> attributes, while the build-in Ignite metrics do not provide an easy way to 
> access cache names. The only option seems to be parsing the 
> "cache_MY_CACHE_NAME_CacheHits" strings which AFAIK is not supported by 
> Grafana.
>  
> For example with tags it is very easy to get a graph in Grafana with a cache 
> hit percentage that includes every existing cache. It automatically extracts 
> the cache name from the "cache" tag. Unfortunately, it is not possible if 
> there are no tags.
> !image-2022-07-20-17-51-07-217.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to