In AppOptics, a Metric is the variable you’re measuring. This might be little bit different from other systems you may be familiar with, where a metric is the combination of a variable you’re measuring, combined with the instance you are taking the measurement from.
If, for example, you're measuring CPU Utilization on Server1, Server2, and Server3, you might expect each measurement to be a different Metric. With tagged metrics, each unique metric name can be associated with an unlimited number of streams that can be filtered and grouped by tags. This is really handy, because it means you don’t have to individually add each data stream to make a chart; rather, you simply add the metric CPU Utilization and then use tags to filter and group to show the data streams you want to see. E.g. to see one line per server, you group by the server or instance "name" tag. If you only want to see the servers in a specific region, you can filter on a "region" tag and group on the server or instance "name" tag.
Let's take a look at how this works in practice. The metrics section is a tab in the Dashboards and Metrics page.
The metrics viewer presents a list of all metrics. You can filter this down by entering a typeglob, or even a few keywords into the filter field. Following my CPU Utilization example above, I’ve typed in the keywords ‘ec2’ and ‘cpu’. This returns three metrics, and from this shortened list, I select AWS.EC2.CPUUtilization, which is the CPU utilization metric as measured by AWS.
The viewer displays a graph containing the first 25 streams. Each stream is a distinct AWS instance which contains tags such as name, region, instancetype, az, environment and more. I can page through my streams by hitting the left and right arrow buttons, or I can click on one or more tags to filter and group by to better match my search. In this example, I chose the role tag and check the "Group on this tag" check box, and then click "Done" to group by role.
If you want to edit the attributes of a group of metrics or delete them, you can search them by typing search patterns into the search bar and then checking the check box right underneath it. That will select all the metrics found in the search and unveil two buttons: the "Set Default Attributes" and the "Delete Selected Metrics" buttons:
Any changes you make will be applied to all the metrics you selected.
In the metric list you will see the column "Type" which describes the type of metric that is created. AppOptics currently supports 3 metric types:
- Metric: A metric is any type of numerical variable used to gauge some quantifiable measure of performance of a type of object (server, application, business, sensor, etc.) that can be monitored. You can also count events using gauges as well.
- Composite: You can create a persisted composite metric in order to specify arbitrarily complex queries against your native metrics.
- Sampled: A sampled metric is gathered by requests that are sampled by distributed tracing. This can include response times, hit rates, counts, etc.
Metric attributes are used to configure default settings on the metric itself, all of which may be overridden by the stream attributes which you can set after adding the metric to a chart. Click on the Set Default Attributes to bring up the configuration dialog.
The following attributes can be configured:
- Label: Metric name displayed by the tooltip.
- Metric Color: Set the color of your metric either via hex code or the color picker.
- Units: Units label displayed by the tooltip.
- Summary function: When visualizing complex measurements or a rolled-up measurement, this allows you to choose which statistic to use. If unset, defaults to "average". Valid options are one of: [max, min, average, sum, count].
- Service-side aggregation: When enabled, measurements sent using the same tag set will be aggregated into single measurements on an interval defined by the period of the metric. If there is no period defined for the metric then all measurements will be aggregated on a 60-second interval.
- Metric reports every: Interval at which you are sending us data (otherwise knows as the period). We use this setting alonkg with the Reports Infrequently setting to properly handle gap-detection for your data. If the period is set, gaps will show for periods where no data is received. If it is not set, data points will be connected.
- Show gaps in data: Some metrics are reported opportunistically. For example, every n seconds a measurement is sent only if there is new data. This results in a sparsely populated series. We use this setting in combination with the Period to correctly handle Gap-Detection.
- Stack metric sources: Defines whether or not multiple sources for a metric should be aggregated in a visualization (e.g. stacked graphs).
Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.