Usage Reporting and Monitoring
Hive allow you to collect usage data from your GraphQL operations and use the data collected for the following purposes:
- Monitoring and Observability: view a list of all your GraphQL operations and their performance, error-rate, and other metrics.
- Schema Usage and Coverage: understand how your consumers are using your GraphQL schema, and what parts of the schema are not being used at all (see Schema Usage and Coverage).
- Schema Evolution: with the knowledge of what GraphQL fields are being used, you can confidently evolve your schema without breaking your consumers (see Conditional Breaking Changes).
How it works
To collect and report usage information from your GraphQL gateway, you’ll need to setup Hive Client within your GraphQL gateway, and have the metadata of your traffic reported to Hive.
Hive does not collect, process or store any data from your GraphQL operations or responses. Hive Client only transmits the metadata of your GraphQL operations to Hive: what fields were used, if there were any errors, etc.
The following information is included in usage reporting:
- Operation Name: the name of the operation, if it exists.
- Operation Type: the type of the operation (
query
,mutation
, orsubscription
). - Coordinated: a simple array-based strcuture that represents what fields, arguments, and types
were used in the operation (for example:
Query.user
,Query.user.id
User
). - Client Identifier: the identifier of the client that sent the operation. This is useful to understand the distribution of your consumers.
- Date: the date and time when the operation was executed.
For additional reading, please refer to the following resources:
Monitoring and Observability
Once you have usage reporting enabled, and shipped your usage reports to Hive, you can view the usage data in the Monitoring view of the target.
![Monitoring View](/_next/static/media/monitoring-view.c8f1dbdf.png)
This view includes the following information:
Usage Statistics
From the usage statistics view, you’ll be able to see the following metrics of your GraphQL API:
- Total amount of GraphQL executed.
- Average RPM (Requests Per Minute)
- Total count of unique GraphQL operations
- Sucess-rate of the executed operations
- Error-rate of the executed operations
- Latency (
p99
,p95
andp90
)
![Usage Statistics View](/_next/static/media/usage-stats.42e0f8b3.png)
Clients Overview
A breakdown of the clients who are using your GraphQL gateway, and the amount of operations executed by each client.
![Clients Overview](/_next/static/media/usage-clients.f1e27cf5.png)
Monitoring Statistics
A various of the charts and metrics useful for monitoring and having an overview of your GraphQL API performance:
- Operations time: the amount of GraphQL operations executed over time.
![Operations Over Time](/_next/static/media/usage-operations-over-time.a8897e72.png)
- RPM over time: the amount of GraphQL operations executed per minute over time.
![RPM Over Time](/_next/static/media/usage-rpm-over-time.8cb6f278.png)
- Latency over time: the latency of GraphQL operations over time.
![Latency Over Time](/_next/static/media/usage-latency-over-time.e057d9db.png)
Insights
A list of all the GraphQL operations executed by your consumers, their performance metrics and total count. By clicking on a specific query, you’ll be able to see the full list of fields and arguments used in the operation.
![Insights](/_next/static/media/usage-operations.5f1cbc5d.png)