A Time Series analysis allows you to view aggregate trends for your API traffic over a time period. You can use all of your favourite search filters to create a time series chart.
To create a Time Series chart in Moesif, you’ll need to navigate to the Events screen and select Time Series from the Chart Type selector.
Filters enable you to filter data by specific properties such as a certain _User Id_or only a particular route of interest. As a filter is created, Moesif will parse through your data to assist in building the query. An example would be if you filtered by URI Route, Moesif would find all of the URI routes within your data and present you with those options to more easily create the filter.
For example, you can filter traffic for a specific route such as
GET /items, or even from a specific User Agent such as only including requests from Python clients.
All the filters that work on Live API Log also work for filtering events on Time Series charts as well.
Time series analysis also supports Group By to aggregate the data in your Time Series analyis around a specific property. An example of common Group By clauses include grouping events by Response Status Code or Company Domain.
On the Time Series screen, you can configure which metrics to group by via the Group By input.
The above example shows us grouping data by Company Domain. You’ll also see that we are displaying the Top 10 terms to limit the data displayed on the chart.
If the chart gets cluttered when plotting many time series, you can select the key name in legend underneath chart to toggle hiding/showing a time series.
Metric to plot
By default, time series will plot metrics based on event count. if you want to derive additional metrics, such as plotting the average latency, you can click one of the predefined options under Metrics or create a customized metric to plot.
Available options include being able to plot metrics by:
- Event Count (default)
- Event Accumulation
- Unique Users
- Unique Companies
- Unique Sessions/API Keys
- Avg Latency
- Max Latency
- P90 Latency
- Req Body Count
- Res Body Count
- Sum Req Content-Length
- Custom Metric
To plot multiple metrics on the chart, you can use the Custom options. You can plot additional metrics on the same chart by clicking the button + Add Metric again.
So we can plot both
max duration via the following:
Fields that are numeric type such as Elapsed Time supports average, sum, min, max, distinct, percentiles. Fields that are string types such as HTTP headers supports distinct.
Changing Chart Style
To change how a Time Series chart is rendered to the screen, you can toggle between different styles. These styles include:
- and Table
To select a chart style, click the option displayed in the top left of the Time Series rendering. This gives users multiple ways to view their data in a Time Series format.
A Line style rending will display a plotted-line chart. This is the default when the page is loaded.
A Bar style rending will display a bar chart.
A Table style rending will display a spreadsheet-style breakdown.
You can select Download to download a CSV of your time series data. This can be used if you need to create custom charts or want to play with the data more.
How are intervals calculated
Moesif will align the intervals to the top and bottom of the interval. So if you select and interval of Daily, then each metric equals the time from 12:00 AM to 11:59pm per day in your chosen timezone.
By default, the browser time is used as the timezone, but you can change your global time zone by going to Apps and Team settings.
Because Moesif always aligns to the calendar interval, the very last one may not be fully complete. For example if the current time is 5:55pm and you select an interval of Daily, then the last interval will only contain partial data from 12:00 AM to 5:55pm.