Usage Reporting
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.
Getting Started
Before proceeding, make sure you have created a registry token with write permissions on the Hive dashboard.
Next, set both environment variables:
HIVE_ACCESS_TOKEN: Your Registry Access Token with write permission.HIVE_TARGET: Target reference, either:- slug:
$organizationSlug/$projectSlug/$targetSlug(for examplethe-guild/graphql-hive/staging) - UUID:
a0f4c605-6541-4350-8cfe-b31f21a4bf80
- slug:
To send usage reports, set telemetry.hive.usage_reporting.enabled: true in router.config.yaml.
Example configuration:
router.config.yaml
telemetry:
hive:
usage_reporting:
enabled: true
# Optional: override endpoint for self-hosted Hive
# endpoint: "https://my-hive/usage"Client identification
To identify who’s calling your GraphQL API and view traffic distribution and operation volume per
client in Hive Console, set up client identification in router.config.yaml.
router.config.yaml
telemetry:
client_identification:
name_header: 'graphql-client-name' # default value
version_header: 'graphql-client-version' # default valueConfiguration reference
See the telemetry configuration reference for all
options and defaults under telemetry.hive.
Last updated on