Hi Ashan, As I've seen from the PCA testing recently, the timestamp is added to every ThriftEvent before publishing. Are you working on PCA or the Mock IaaS? I took a look at the Mock IaaS and the WSO2CEPStatisticsPublisher as well, and found out that the latter indeed doesn't add the timestamp to the ThriftEvents. This means that the JCA also publishes Thrift Events with empty timestamp fields.
Following is the simple fix for that. I've attached the patch herewith. Could you quickly verify with the patch applied build also? chamilad@chamilad-ThinkPad-T530:~/dev/stratos[master *]$ git diff diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java b/c index 653288d..f1fe426 100644 --- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java +++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java @@ -29,6 +29,7 @@ import org.wso2.carbon.databridge.agent.thrift.exception.AgentException; import org.wso2.carbon.databridge.commons.Event; import org.wso2.carbon.databridge.commons.StreamDefinition; +import java.util.Date; import java.util.HashMap; /** @@ -98,6 +99,7 @@ public class WSO2CEPStatisticsPublisher implements StatisticsPublisher { Event event = new Event(); event.setPayloadData(payload); *+ event.setTimeStamp(new Date().getTime());* event.setArbitraryDataMap(new HashMap<String, String>()); try { Regards, Chamila de Alwis Committer and PMC Member - Apache Stratos Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Mon, Jul 6, 2015 at 2:09 PM, Ashan Dhananjaya <dhananjay...@gmail.com> wrote: > Hi Paranavan, > > Thank you for the information. > > On Mon, Jul 6, 2015 at 10:35 PM, Pranavan Theivendiram < > pranavan...@cse.mrt.ac.lk> wrote: > >> Hi Ashan, >> >> You have to embed time stamp with the event that is related with CA. That >> is a possible solution. >> >> Thanks >> >> *T. Pranavan* >> *BSc Eng Undergraduate| Department of Computer Science & Engineering >> ,University of Moratuwa* >> *Mobile| *0775136836 >> >> On 6 July 2015 at 22:24, Ashan Dhananjaya <dhananjay...@gmail.com> wrote: >> >>> Hi All, >>> >>> I'm experiencing that the python cartridge agent doesn't publish the >>> timestamp with the health statistics. Working with the python cartridge >>> agent health publisher to get the timestamp publish enable. >>> >>> Thank You! >>> Best Regards, >>> Ashan >>> >> >> >
Index: components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java (date 1435993470000) +++ components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java (revision ) @@ -29,6 +29,7 @@ import org.wso2.carbon.databridge.commons.Event; import org.wso2.carbon.databridge.commons.StreamDefinition; +import java.util.Date; import java.util.HashMap; /** @@ -98,6 +99,7 @@ Event event = new Event(); event.setPayloadData(payload); + event.setTimeStamp(new Date().getTime()); event.setArbitraryDataMap(new HashMap<String, String>()); try {