Business event analysis in Dynatrace
powered by Grail
Once stored in Grail, you can query your business event data interactively and analyze it using DQL. DQL is the starting point, whether you are in the Event explorer or in the API. Query results can be used interactively or pinned to a dashboard as charts, tiles, or tables.
Query and analyze your data
-
In the Dynatrace menu, go to Business Analytics > Explore business events.
-
Build and run your query.
Your queries can be used to create metrics and charts for dashboards. You can also run queries from an API to use the data externally.
For the examples on this page, the event type com.easytrade.sell-assets
includes the data fields accountid
, amount
, instrumentid
, and price
.
Metrics
You can create metrics on an ongoing basis from any measure or numeric data collected as business events, using DQL. Results can be a table or a single value.
Average trading dollar volume: Single value
The metric below is a single numerical value.
fetch bizevents, from:now()-24h, to:now()
| filter event.type == "com.easytrade.sell-assets"
| summarize dollar_volume = avg(amount*price)
Search results
dollar_volume |
---|
390.3207406001167 |
Average trading dollar volume in time intervals: Table
You can create tabular metrics based on an average trading dollar volume in the last 30 days in 24-hour intervals.
fetch bizevents, from:now()-30d, to:now()
| filter event.type == "com.easytrade.sell-assets"
| summarize average_dollar_volume = avg(amount*price), by:{selltime = bin(timestamp, 24h)}
| sort average_dollar_volume, direction:"ascending"
Results table
average_dollar_volume | selltime |
---|---|
375.4867231862885 | 2022-09-27T00:00:00.000000000Z |
376.7265117797414 | 2022-09-28T00:00:00.000000000Z |
385.71953070866886 | 2022-09-25T00:00:00.000000000Z |
388.46526469795805 | 2022-09-24T00:00:00.000000000Z |
391.17192948130923 | 2022-09-26T00:00:00.000000000Z |
Charts
There are two types of charts that can be used to visualize your results: a bar chart and a line chart. Only tabular data can be displayed as charts.
Bar
Bar charts are available on the condition that the query contains two mandatory components: a function (for example, summarize count()
) and a parameter.
The following is a bar chart of the results from the above query.
Line
The following is a line chart of the results from the above query.
Dashboards
You can pin your table and single-value results to a dashboard:
- In the Search results tab, select Actions on the right side of the screen.
- Select Pin to dashboard.
- Choose the dashboard where you would like to pin your tile or create a new dashboard.
- Add a title to your tile and select Pin.
Single-value dashboard tile
The following is a single-value dashboard tile for average trading dollar volume.
Table dashboard tile
The following is a table dashboard tile for trading dollar volume in intervals.