Compound metrics are a class of data point that can be emitted by your application and collected by RESTful Metrics. Compound metrics are made up of 3 components: Your application's unique identifier, the name of metric and the values. Optionally, you can submit a distinct user identifier if you want to be able to sort the metric by unique users later on.
Data points for compound metrics differ from traditional metrics in the values portion of the data point. The values for compound metrics can be one or more string type values.
Unique Application Identifiers
Each application in your account requires a unique identifier. Data points collected using this identifier will be properly attributed to the respective application. For more information about identifiers and creating applications in your account, see the Applications section.
Compound Metric Names
Each compound metric requires a name that identifies that compound metric in your account. Names are case-sensitive and are only unique to a single account. All of your applications, in the same account, can submit data points to a given compound metric. If you have multiple accounts, you will have a separate compound metric "namespace" for each account. Compound metric namespaces do not overlap those of traditional metrics.
New compound metrics are automatically created when the first compound metric of a new name is collected by RESTful Metrics.
On the dashboard, compound metric names are automatically humanized and title-cased for the convenience of the dashboard users. That means that if you name a compound metric "new_accounts", it will automatically show up on the dashboard as "New Accounts".
It's common practice to name your compound metrics in the plural form since you will more than likely have multiple data points for that compound metric. We will automatically pluralize your compound metric name on the dashboard, though. So if your compound metric is named "new_account", it will automatically show up as "New Accounts" on the dashboard.
It's important though to always submit your data points using the original compound metric name you selected. Compound metrics cannot currently be renamed.
Data Point Collection and Values
Compound metrics are always shown as a bar chart when viewed from the dashboard. Each bar in the chart is an indvidual value (string) from the compound metric. The height of the bar is calculated by adding up the frequency of that value in the specified date range. The string values for a compound metric are case-sensitive and are aggregated together only if they match identically. For example the strings "Test" and "test" would show up as two separate bars in the chart.
Please see the Sample Usage Scenarios for examples of when to use compound metrics.
Distinct User Identifiers
If you submit a distinct user identifier along with each data point, users of the dashboard will be able to aggregate compound metrics based on uniques. The distinct user identifier can be any string that distinctly identifies the user currently responsible for the specific data point being transmitted. In web applications, this might be the value of some unique cookie.