Kubesense GraphQL Link
A package for tracking GraphQL calls in Kubesense compatible with gql_link
Monitor your GraphQL resources with Real User Monitoring (RUM) and perform the following:
- Identify GraphQL queries and mutations
- Identify GraphQL variables used in queries and mutations
Getting started
To use the kubesense_gql_link, add it above your terminating link when using Link.from or Link.concat. For example:
final graphQlUrl = "https://example.com/graphql";
final link = Link.from([
KubesenseGqlLink(KubesenseSdk.instance, Uri.parse(graphQlUrl)),
HttpLink(graphQlUrl),
]);
If you are using kubesense_gql_link in conjunction with
kubesense_tracking_http_client, you will need to have the tracking plugin ignore
requests to your GraphQL endpoint, otherwise resources will be double reported,
and APM traces may be broken. You can ignore your GraphQL endpoint by using the
ignoreUrlPatterns parameter added to kubesense_tracking_http_client version
2.1.0.
final kubesenseConfig = KubesenseConfiguration(
// Your configuration
)..enableHttpTracking(
ignoreUrlPatterns: [
RegExp('example.com/graphql'),
],
);