datadog_gql_link 1.0.1 datadog_gql_link: ^1.0.1 copied to clipboard
A package for tracking GraphQL calls in Datadog compatible with 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),
]);
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'),
],
);
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.