We have installed the UsageMetrics App and want to be able to see the usage of our package components. However, we have been having issues with the app because when we try to query the MetricsDataFile using something like:
system.debug([SELECT id,metricstype,metricsdatafile FROM Metricsdatafile order by createddate desc limit 1]);
The value of the blob returned is 0. A sample is shown below:
{Id=0MR2A000000cFFRWA2, MetricsType=Visualforce, MetricsDataFile=Blob[0]})
The only thing I have found so far is this., which is very similar to the ISVForce guide here but none of them have solved the problem. I must be missing something but not sure what?
system.debug([SELECT metricsdatafile FROM Metricsdatafile where MetricsDataFileLength > 0 order by createddate desc limit 1].metricsdatafile.size());