Usage Reporting
Hive Router can send usage reports to Hive Console to provide insights into the operations being executed against your GraphQL API. This includes details such as operation names, client information, and field-level usage statistics.
The Hive Router can report usage metrics to the Hive schema registry, giving you insights for executed GraphQL operations, and field level usage information, but also enabling conditional breaking changes.
For additional information about the usage reporting process in Hive Router, see Usage Reporting page.
Before proceeding, make sure you have created a registry token with write permissions on the Hive dashboard.
You can either provide the usage reporting configuration via environment variables or the
router.config.yaml file.
-
HIVE_TARGET: The target ID, this can either be a slug following the format$organizationSlug/$projectSlug/$targetSlug(e.gthe-guild/graphql-hive/staging) or an UUID (e.g.a0f4c605-6541-4350-8cfe-b31f21a4bf80). To be used when the token is configured with an organization access token. -
HIVE_ACCESS_TOKEN: Your Registry Access Token with write permission.
HIVE_ACCESS_TOKEN="<hive_usage_access_token>" \
HIVE_TARGET="<hive_usage_target>" \
hive-routerIf you want to control the usage reporting to the Hive Console like client_name_header,
client_version_header or sample_rate etc, please look at the configuration documentation to
learn more about other options.
See more in the configuration reference.