• Home
  • Platform modules
  • Business Analytics in Dynatrace
  • Business event metric extraction

Business event metric extraction

powered by Grail

Business event metric extraction is a convenient way to create your own business metrics. It enables you to:

  • Create custom alerts, such as when a certain value surges or drops. Alerts can be based on attribute values or specific business events occurrences.
  • Reduce your DDU consumption and lower your costs.

You need to create your business metrics before ingesting your business events data.

Configure business events metric extraction

To add a business event metric

  1. In the Dynatrace menu, go to Settings > Business Analytics > Metric extraction.

  2. Select Add business event metric and name your metric by adding a Key starting with the bizevents. prefix (for example, bizevents.EasyTrade.TradingVolume).

  3. Add a Matcher to your rule by pasting your matcher-specific DQL query. In the above example, to calculate your trading volume metric, you need to extract only buy transactions, so the matcher query is:

    dql
    matchesValue(event.type, "com.easytrade.buy-assets")
  4. Choose the Measure on which your metric will be based. There are two options:

    • Occurrence of business events records—A count of events that match your DQL query.
    • Attribute value—A collection of measures for the attribute value of business events that match your DQL query. Specify your attribute name in the Attribute field. Matching of attribute names is not case-sensitive. For example, if you choose Trading_Volume, the specified attribute name for the metric extraction should be trading_volume.
  5. Select Add dimension. Adding dimensions allows you to split the business event occurrences by a specific business events attribute such as a host name. If the attribute contains more than one value, the first attribute value acts as the metric dimension. The maximum number of dimensions is 50.

  6. Select Save changes.

Extract your metrics

You can extract and visualize your metrics to use them further in your analysis. You can also create metrics-based alerts tailored to your needs.

Display your metrics

  1. In the Dynatrace menu, go to Observe and explore > Data explorer

  2. Find your metric in the search window, select Run query and display your results.

    You can also:

    • Visualize your metric on a dashboard by selecting Pin to dashboard
    • Export your data to a CSV file
    • Share a link
    • Copy the request

Example visualization:

Visualization of business events metric, bizevents.EasyTrade.TradingVolume

Create alert with your metrics

  1. In the Dynatrace menu, go to Settings > Anomaly detection > Metric event.
  2. Select Add metric event and create a custom event based on your Key (for example, bizevents.EasyTrade.TradingVolume).
    To create a metric key event (for a single metric), see Metric key events.
    To create a metric selector event (for multiple metrics), see Metric selector events.

Unrecognized timestamp handling

If the event's timestamp does not fall within the allowed range, it will be replaced by a metric written with the .failed suffix to the metric key. This new metric will have a recent timestamp, (now()), and the dimension that would have been attached to the metric you wanted to extract.

Related topics
  • Metric ingestion protocol

    Learn how the data ingestion protocol for Dynatrace Metrics API works.