Files
OpenSearch-Docs-Cn/_observability-plugin/app-analytics.md
T

66 lines
2.7 KiB
Markdown
Raw Normal View History

---
layout: default
title: Application analytics
nav_order: 80
---
# Application analytics
2022-03-21 14:14:41 -07:00
You can use application analytics to create custom observability applications to view the availability status of your systems, where you can combine log events with trace and metric data into a single view of overall system health. This lets you quickly pivot between logs, traces, and metrics to dig into the source of any issues.
## Get started with application analytics
2022-03-21 14:14:41 -07:00
To get started, choose **Observability** in OpenSearch Dashboards, and then choose **Application analytics**.
### Create an application
2022-03-21 14:14:41 -07:00
1. Choose **Create application**.
2. Enter a name for your application and optionally add a description.
3. Do at least one of the following:
- Use [PPL]({{site.url}}{{site.baseurl}}/observability-plugin/ppl/index) to specify the base query.
2022-03-15 11:45:43 -07:00
You can't change the base query after the application is created.
{: .note }
2022-03-15 11:45:43 -07:00
- Select services & entities from the dropdown or the service map.
- Select trace groups from the dropdown or the table.
2022-03-21 14:14:41 -07:00
4\. Choose **Create**.
### Create a visualization
2022-03-21 14:14:41 -07:00
1. Choose the **Log Events** tab.
1. Use [PPL]({{site.url}}{{site.baseurl}}/observability-plugin/ppl/index) to build upon your base query.
1. Choose the **Visualizations** tab to see your visualizations.
1. Expand the **Save** dropdown menu, enter a name for your visualization, then choose **Save**.
2022-03-21 14:14:41 -07:00
To see your visualizations, choose the **Panel** tab.
### Configure availability
2022-03-21 14:14:41 -07:00
Availability is the status of your application determined by availability levels set on a [time series metric]({{site.url}}{{site.baseurl}}/observability-plugin/app-analytics/#time-series-metric).
2022-03-21 14:14:41 -07:00
To create an availability level, you must configure the following:
- color: The color of the availability badge on the home page.
- name: The text in the availability badge on the home page.
2022-03-21 14:14:41 -07:00
- expression: Comparison operator to determine the availability.
- value: Value to use when calculating availability.
![Configuring availability]({{site.url}}{{site.baseurl}}/images/app_availability_level.gif)
2022-03-21 14:37:41 -07:00
By default, application analytics shows results from the last 24 hours of your data. To see data from a different time frame, use the date and time selector.
#### Time series metric
2022-03-21 14:37:41 -07:00
A time series metric is any visualization that has a query that spans over a timestamp and is a line chart. You can then use PPL to define arbitrary conditions on your logs to create a visualization over time.
##### Example
```
source = <index_name> | ... | ... | stats ... by span(<timestamp_field>, 1h)
```
2022-03-21 14:14:41 -07:00
Choose **Line** in visualization configurations to create a time series metric.
2022-03-21 14:14:41 -07:00
![Changing visualization to line chart]({{site.url}}{{site.baseurl}}/images/visualization-line-type.gif)