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

Carsten Ziegeler commented on SLING-11192:
------------------------------------------

[~stefanegli] Thanks, yes, the contract for getNumberOfProcessedJobs is now a 
little bit weaker - but I don't think that this is a problem as Statistics is 
not immutable and therefore calling two methods in it have no consistency 
guarantees. And yes, that mutability is the underlying problem. The state might 
change between any two method calls,
I was wondering if we should fix this - which would mean deprecating the 
current approach and providing a way to get an immutable state object. On the 
other hand, we have this inconsistency from the beginning and it doesn't seem 
to be a real world problem.

> Calculating metrics takes too long
> ----------------------------------
>
>                 Key: SLING-11192
>                 URL: https://issues.apache.org/jira/browse/SLING-11192
>             Project: Sling
>          Issue Type: Improvement
>          Components: Event
>    Affects Versions: Event 4.2.24
>            Reporter: Joerg Hoh
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: Event 4.3.2
>
>
> we use the prometheus exporter to export Sling Metrics / Dropwizard metrics, 
> and we often see messages like this:
> {noformat}
> 10.03.2022 08:50:15.333 [...] *WARN* [qtp568481508-1779] 
> io.prometheus.client.dropwizard.DropwizardExports Gauge has been blacklisted 
> for 300000 ms due timeout:  Generated from Dropwizard metric import 
> (metric=sling_event.jobs.cancelled.count, 
> type=org.apache.sling.event.impl.jobs.stats.GaugeSupport$2) 
> {noformat}
> This means that calculating the metric took too long. We should make sure 
> that the calculation is done asnychronously and just pre-computed values are 
> returned.
> For at least these values the handling needs to be improved:
> * sling_event.jobs.active.count
> * sling_event.jobs.averageProcessingTime
> * sling_event.jobs.averageWaitingTime
> * sling_event.jobs.cancelled.count



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to