Now that you’ve sent metrics to Lightstep, it’s time to build a dashboard and chart to monitor that data.

Run Your Service or App

The first step is to run your app so that it starts generating metrics you can see immediately in Lightstep. Let it run for a few minutes before you start building the dashboard.

Create a Metric Dashboard

Dashboards contain charts that are built on queries of your metric data.

  1. From the navigation bar, click Dashboards.

  2. Click Create a dashboard.Create Dashboard button

  3. Click Create a Metrics dashboard from the modal. Create a dashboard modal A new blank dashboard displays. Blank dashboard

  4. Click in the title to rename your dashboard.

    You’re now ready to add a chart to the dashboard.

Add a Metric Chart

  1. In your dashboard, click Add a Chart. Add a metrics chart

  2. In the Chart Builder window, click into the title to name your chart. Enter chart name

  3. Build the query for your chart

    • Search for a metric to plot: Click into the search field. Lightstep displays all metrics that it’s currently ingesting. Choose one, or to search, start typing the name of a metric. Lightstep starts auto-completing to match available metrics.

      Metric search

      When you select a metric, Lightstep expands the query builder and begins to chart the metric.

    • Choose an operator for the data:

      • Latest: Graphs the latest value in a time series for a point in time.

      The latest operator can only be used with gauge-type metrics.

      • Count: Graphs the total number of counter increments as whole numbers. Counts are most useful for infrequent events and are best visualized as stacked bar charts.

      • Rate: Graphs the number of operations per second. Rates are most useful for ongoing operations and are best visualized as line charts.

        For example, this chart uses Count and shows there are a total of 364.474 requests at 11:45 am. Count used

        This chart has the same query but uses Rate, and shows there are 8.099 requests per second at 11:45 am. Rate used

    • Filter the data: By default, all data for the metric is displayed. You can filter the data using metric tags found on the data. You can include or exclude data with a given tag and value. You can add more than one tag to a filter where it makes sense (Lightstep prunes the available list as you add tags).

    Multiple selections use AND to join filters.

    Change Intelligence works best when it can focus on a single service and its dependencies. If your query includes metrics coming from many services, use filters to choose one service to focus on.

    Filter data with tags

    By default, Lightstep displays tags that it’s seen in the last three days. But you can type in a tag not in the dropdown and Lightstep will find it.

    • Group the data: By default, Lightstep aggregates the data from the metric into one line.Group all by default Instead, you can show lines for each available tag value (group by). Select a tag to display lines for each of the tag’s values. In this example, by choosing to group by the method tag, you can see the metrics for the individual tag values. Grouped by method

      Grouping isn’t available on big number charts.

    • Aggregation method: Choose how you want the data aggregated into the chart.

      • Count (non-null): The number of values found that are not null. For example, given the values of [10, 15, null, 50] the count is 3.
        • Count (non-zero): The number of values found that are not zero (null is counted). For example, given the values of [10, 15, null, 0 50] the count is 4.
        • Mean: The average (sum of the data divided by the count) of the data.
          For example, given the values of [10, 15, 50] the mean is 25.
        • Min: The lowest point in the data.
          For example, given the values of [10, 15, 50] the min is 10.
        • Max: The highest point in the data.
          For example, given the values of [10, 15, 50] the max is 50.
        • Sum: The total of all points in the data.
          For example, given the values of [10, 15, 50] the sum is 75.
  4. Click Save to save your changes. The chart now displays on the dashboard. New chart on dashboard

You can add as many charts as you need for the dashboard.

Now that you have your metric data reporting and displayed in Lightstep, it’s time to see how that data and data from trace instrumentation work together to find root causes of metric deviations deep in your stack.

What Did We Learn?

  • Dashboards can contain any number of charts.
  • Charts are built from queries to your metric data. You can aggregate, filter, and group that data so that the chart reports just the data you need.