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

Harsh Chiki commented on SLING-9389:
------------------------------------

Hi [~marett], 

Please consider this a gentle reminder.

I worked out some basic changes to capture the queue item creation time, to be 
put in the {{AGENT_PACKAGE_DISTRIBUTED}} and {{AGENT_PACKAGE_DROPPED}}. From 
other paths, have sent out null. PFA SCD API and Core patches which of course 
are very rough at the moment.

May I request your views, in general from this requirement pov, essentially:
 * Whether we should add a new parameter in this internal API and internal 
implementation, or a new method to capture time stamp as well. (Prior one is 
done in the patch shared)
 * Is it fine to send null in the other event topic cases?
 * For scheduled import export cases.
 * In our local experiments, we identified the queue item creation time stamp 
is what one would need from an enqueue (first time creation, not on retries) 
time stamp pov, so we intend to use 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/429f6bc225970c34e948d0ad41c38fe4c0ef9ef9/src/main/java/org/apache/sling/distribution/queue/impl/resource/ResourceQueueUtils.java#L219]
 
 ** Figured that 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/QueueingDistributionPackageProcessor.java#L119]
 which is later used for getting {{globalStartTime}} here - 
[https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L115.|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L115]
 ** But, relied on the queue item creation time - generated in 
`ResourceQueueUtils` linked above (in this comment)

 

Kindly have a look, and advise.

Thanks!

 

\cc: [~ashishc], [~shgu...@adobe.com]

 

 

 

 

 

> Distribution Event Packages should contain queue item creation time
> -------------------------------------------------------------------
>
>                 Key: SLING-9389
>                 URL: https://issues.apache.org/jira/browse/SLING-9389
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>            Reporter: Harsh Chiki
>            Assignee: Timothee Maret
>            Priority: Major
>         Attachments: scdapi.patch, scdcore.patch
>
>
> Currently the Dsitribution Event package contains the following details:
>  * Distribution Component Name
>  * Distribution Component Kind
>  * Distribution Type
>  * Distribution Paths
>  
> Improvement aims at adding the queue item creation time, essentially when the 
> the item was creation for the first time, and enqueue into the queue. The 
> value does not change over retries (on failure).
>  
> The purpose to get this detail is to be able to capture metrics at the 
> consumer level. The consumers could have an event handler, which can capture 
> the duration which turns out to be (NOW MINUS queue item creation time thrown 
> in the distribution event package); NOW being the current time in the event 
> handler (consumer).
>  
> \cc: [~shgu...@adobe.com], [~ashishc]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to