Newer Version Available
MetricsDataFile
Fields
| Field Name | Details |
|---|---|
| MetricsDataFile |
|
| MetricsDataFileContentType |
|
| MetricsDataFileLength |
|
| MetricsRunDate |
|
| MetricsEndDate |
|
| MetricsStartDate |
|
| MetricsType |
|
| NamespacePrefix |
|
| SendingInstance |
|
Usage
Use this object to access customer usage metrics for a managed package. Each record contains one day’s data, on either custom objects or Visualforce pages, for all organizations in a Salesforce instance that have the package installed. The following data is collected each day.
- Custom objects — the number of records stored in each custom object.
- Visualforce pages — the number of times each Visualforce page was accessed, the number of unique users who accessed it, and the average loading time (in milliseconds).
The custom objects data is a snapshot that reflects the state of the organization at the time the database was sampled, while the Visualforce data covers usage over a 24-hour period.
This feature is intended for API access only. The owner of the package must write a secondary process to retrieve the metrics data from the reporting organization, and export it to another system for analysis.
The usage metrics data for all production organizations in a given instance is merged and written into a text file, in a specified format, once a day. If an instance doesn’t have any organizations with the package installed or any organizations that accessed Visualforce pages in the package, a blank record is created for that day, with MetricsDataFileLength set to zero.
- Organization ID
- Organization name
- Organization edition
- Organization status
- Name of the custom object
- Number of records of the custom object on the specified day
1"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","Alpha", "3500"
2"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","Beta", "1500"- Organization ID
- Organization name
- Organization edition
- Organization status
- Package version number
- Name of the Visualforce page
- Number of times the page was accessed
- Number of unique users who accessed the page
- Average loading time of the page, in milliseconds
The Visualforce counts for each organization measure the number of times the page was viewed in the duration between the start and end times. Here’s a section of a sample data file for Visualforce pages.
1"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f1","1","1","66.0"
2"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f2","1","1","128.0"
3"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f3","1","1","107.0"
4"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f1","5","1","73.6"
5"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f2","1","1","72.0"
6"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f3","7","1","50.8"