New Composite Feature: Mapping Sources Over Expressions — Librato Blog

New Composite Feature: Mapping Sources Over Expressions


Jared Kuolt


Our composite metrics feature allows you to visualize the result of functional transformations of your existing metrics. You can think of composite metrics as a domain specific language for making arbitrarily complex queries against your native metrics. You can compare, transform and summarize native metrics in the same way a data-query language might.

Before today, the map() function was used to enumerate over metrics, aggregating by source. We are proud to announce that the map() function has been updated to allow for enumerating over sources to aggregate data from multiple metrics. For example, we use this to determine mean Garbage Collection (GC) timings for our Jackdaw service:

map({source: "jackdaw*"}, divide([
    derive(s("jackdaw.jvm.gc.G1-Young-Generation.time", "&")),
    derive(s("jackdaw.jvm.gc.G1-Young-Generation.count", "&"))
]))

This divides the time spent in GC by the number of GCs performed in a given period, and returns results broken out by source.

This also has the potential to display outliers with a relative value. For example, let’s say we want to examine the CPU usage of a single Jackdaw node vs the mean across all Jackdaw nodes:

map({source: "jackdaw*"},
    divide([
        s("AWS.EC2.CPUUtilization", "&"),
        mean(s("AWS.EC2.CPUUtilization", "jackdaw*"))
    ])
)

This results in a comparison of each node vs the others, giving us a relative value.

We can see that jackdaw-prod-7 is a consistent outlier.

If you save the above formula in a persisted composite metric, this relative value is especially useful in alerting. For example, if my Jackdaw nodes happen to handle a lot of traffic for a short period and their CPU goes above, say, 60%, that may be high traffic but isn’t necessarily a condition we would want to alert on. That is to say, alerting on the absolute value doesn’t help find an outlier. Alerting on the relative value can give us immediate, actionable insight into a single node that is acting differently than the others.

We look forward to seeing how our customers will use source-wise mapping to solve their problems. Every time we announced new composite features in the past, we also saw an influx of user ingenuity in using those features.

If you would like to learn more about composites take a look at our Composites Tutorial or the Composite Metrics Language Specification. 

All of Librato's composite metrics functionality is available at no additional cost to our users. If you're not already using Librato, give it a try for free.