Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface graphql

This plugin automatically instruments the graphql module.

The graphql integration uses the operation name as the span resource name. If no operation name is set, the resource name will always be just query, mutation or subscription.

For example:

# good, the resource name will be `query HelloWorld`
query HelloWorld {
  hello
  world
}

# bad, the resource name will be `query`
{
  hello
  world
}

Hierarchy

  • Instrumentation
    • graphql

Index

Properties

Optional analytics

analytics: boolean | number | object

Whether to enable App Analytics. Can also be set to a number instead to control the sample rate, or to an key-value pair with span names as keys and booleans or sample rates as values for more granular control.

Optional collapse

collapse: boolean

Whether to collapse list items into a single element. (i.e. single users.*.name span instead of users.0.name, users.1.name, etc)

default

true

Optional depth

depth: number

The maximum depth of fields/resolvers to instrument. Set to 0 to only instrument the operation or to -1 to instrument all fields/resolvers.

default

-1

Optional enabled

enabled: boolean

Whether to enable the plugin.

default

true

Optional service

service: string

The service name to be used for this plugin.

Optional signature

signature: boolean

Whether to enable signature calculation for the resource name. This can be disabled if your GraphQL operations always have a name.

default

true

Optional variables

variables: string[] | function

An array of variable names to record. Can also be a callback that returns the key/value pairs to record. For example, using variables => variables would record all variables.

Generated using TypeDoc