---
schema_version: "1"
id: b78d0939590b66546e141d643c0ce5e765bca2e576425679c92f768f7bc9da82
title: Viewing Usage Metrics for Anypoint Datagraph
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/datagraph/usage-metrics.md
canonical_url: https://docs.mulesoft.com/datagraph/usage-metrics
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ff886a60ce282bfebe28f6e37a839a339fe9d83c1544516b59fd92e0172fe5db
description: MuleSoft Documentation Site
latest: true
---
---
product: DataGraph
---

# Viewing Usage Metrics for Anypoint Datagraph

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Datagraph provides API request metrics, and you can view additional usage metrics for
DataGraph in Anypoint Monitoring.

## View API Request Metrics

DataGraph enables you to track metrics so you’re always aware of your usage relative to the limits
specified for your business groups. Use these metrics to track the total number calls made to the
unified schema in each environment.

Usage metrics are separated by Production and Sandbox environments per business group. More
specifically, the metrics in any given environment show:

- GraphQL API requests received for that environment

- GraphQL API requests received for other environments of that type

- GraphQL API requests received for all environments of that type

> [!NOTE] These metrics are specific to Anypoint DataGraph and reflect GraphQL API requests to the
> unified schema only. They do not represent general Mule application traffic or VPC-level network
> metrics. Cross-environment aggregation here is a DataGraph-specific feature and is not available
> for general application or VPC traffic in Anypoint Monitoring.

API request usage metrics are available in the Overview section of Anypoint DataGraph.

To view usage metrics, you need the [Admin permission](https://docs.mulesoft.com/datagraph/permissions).

1.  Click Overview.

2.  Click Details and confirm you’re in the correct environment.

3.  Click Usage Metrics.

    ![DataGraph usage metrics are shown in the Overview section](/mulesoft/current/en-us/datagraph/_images/datagraph-usage-metrics.png)

4.  To see metrics for a specific time period, set the calendar parameters. The metrics query runs
    automatically and updates the data.

5.  To refresh the metrics for the current time period, click the refresh icon.

## View Usage Metrics with Anypoint Monitoring

Anypoint Monitoring enables you to view usage metrics via built-in dashboards and custom dashboards.
These metrics relate to calls made to your DataGraph application, not to calls made to APIs
federated in your unified schema.

### Built-in Dashboards

In Anypoint Monitoring, DataGraph is considered a "managed API". You select the environment and the
name of your DataGraph application when you
[view built-in dashboards](https://docs.mulesoft.com/monitoring/anypoint-insights#view-a-built-in-dashboard).

Built-in dashboards require no configuration and include various pages to view different types of
charts. For example, the overview page includes data related to:

- Request volume

- Failed requests

- Total 4xx errors

- Total 5xx errors

- Average response time

### Custom Dashboards

Custom dashboards collect the same metrics as built-in dashboards. They require additional
configuration and are useful for:

- Correlating diverse metrics

- Performing comparative analysis

- Differentiating between regular trends and anomalies

- Isolating issues quickly

The following example shows how to set up a custom dashboard to track request volume by client\_id.

1.  From Anypoint Monitoring, select **Custom dashboards**.

2.  Click **+New Dashboard**, add then select the graph option.

3.  On the new graph, click the configure menu (the vertical ellipses), and then click
    **Configure**.

4.  Switch the **Advanced Mode** toggle to activate advanced mode.

5.  Edit the query as follows:

    1.  In the **Panel Type** drop-down list, select **API Panel**. (Datagraph is an API application
        type.)

    2.  Next to **Where**, click **+**.

    3.  From the drop-down lists, select `api_id` and `api_version_id` and set the value for each to
        the Datagraph application from which you’re collecting info.

    4.  From the **Select** drop-down list, select `field(request_size.count)`.

    5.  From the **Group by** drop-down list, select `tag(client_id)`.

    6.  In the **Alias by** field, add `$tag_client_id`.

6.  Click **Apply changes**.

7.  Open the time-picker, choose a timeframe, and click **Confirm**.

The following example shows a graph tracking requests over the previous hour:

![A custom Monitoring graph showing request volume by client\_id](/mulesoft/current/en-us/datagraph/_images/datagraph-custom-graph.png)

## Additional Resources

- [https://docs.mulesoft.com/monitoring/dashboard-custom-config](https://docs.mulesoft.com/monitoring/dashboard-custom-config)

- [https://docs.mulesoft.com/monitoring/create-custom-dashboard](https://docs.mulesoft.com/monitoring/create-custom-dashboard)

- [https://docs.mulesoft.com/monitoring/app-dashboards](https://docs.mulesoft.com/monitoring/app-dashboards)
