What is a source?

A source can be thought of as a single member in a population that you are capturing the metric for. Think of it as a second identifying dimension we support in addition to ‘name’ for a metric.

For example the number of requests/second serviced by an application (metric) could be broken up amongst a group of server instances in a scale-out tier (source) by setting the hostname as the value of source in the measurement properties.

Hostname is probably the most common use-case but we make no assumption about “source” except that it distinguishes multiple homogenous “things” that all have the same metric, so instead of “hostname” you could use things like customer_id or sensor_id if you wanted.

Sources in the Metrics view

When you click on a metric in your metrics list, it will open the chart for the metric and below it will list all its sources. As an example, we have a metric called api.measures.gets.reqs.total. Under the graph of the metric I can see all its sources:

metrics-web-prod-802
metrics-web-prod-804
... etc.

I can drill down into specific sources or groups of sources by using the stream filter. For example if I type *prod* into the stream filter it shows me all production servers.

image0

If no source is defined we default it to unassigned.

Stream Composition

Whenever you have selected to show more than one source for a metric, the stream composition let’s you define how the data is grouped (across sources) and summarized over time.

image1

When you are editing a chart, you can define the grouping and summarization for each metric.

The left box defines how you display the sources. BREAKOUT allows you to display all sources as separate lines on the graph. If you don’t want separate lines you can show the average, sum, min, or max. The right box defines how you summarize across time. This allows you, for example, to show one line that represents the the max of the averages across all sources.

Sources can be very powerful, particularly when used with a well designed naming convention. Read more about how to use sources in Dynamic Source.