Creating Metric Expressions

This page explains how to write metric expressions to use the workflow builder

With simple expressions, you can add metrics to a graph like workflow that resembles your customer's journey through your product or logic tree in your background jobs.

You can connect your external metric sources like Datadog to import metrics from them and add metrics from your events that are present in Doctor Droid's platform.

From Doctor Droid events:
Its a simple structure where you define the aggregation first, the metric object type, followed by filters. See the sample below.

  "name": "Bank Metrics",
    "metrics": [
        "name": "Bank API Throughput",
        "source": "DrDroid",
        "expr": "count:event{event_name:bank_api_called,bank_name:Citi}"
        "name": "Payment Webhook Delay",
        "source": "DrDroid",
        "expr": "avg:monitor.transaction_time{monitor_name:Webhook_Monitor,bank_name:Citi}"

In the first metric we get the count of events where event_name is bank_api_called and bank_name attribute is Citi.
In the second metric we get the the average transaction time for the transactions from monitor Webhook_Monitor, filtering for only those transactions where bank_name is Citi

From DataDog:
It follows the metric expression pattern that Datadog offers. See more details here.