0 purchases
datadog gql link
Datadog GraphQL Link #
A package for tracking GraphQL calls in Datadog 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 datadog_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([
DatadogGqlLink(DatadogSdk.instance, Uri.parse(graphQlUrl)),
HttpLink(graphQlUrl),
]);
copied to clipboard
If you are using datadog_gql_link in conjunction with
datadog_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 datadog_tracking_http_client version
2.1.0.
final datadogConfig = DatadogConfiguration(
// Your configuration
)..enableHttpTracking(
ignoreUrlPatterns: [
RegExp('example.com/graphql'),
],
);
copied to clipboard
Contributing #
Pull requests are welcome. First, open an issue to discuss what you would like
to change. For more information, read the Contributing
guide in the root repository.
License #
Apache License, v2.0
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.