Optional
collapseWhether to collapse list items into a single element. (i.e. single
users.*.name
span instead of users.0.name
, users.1.name
, etc)
true
Optional
depthThe maximum depth of fields/resolvers to instrument. Set to 0
to only
instrument the operation or to -1
to instrument all fields/resolvers.
-1
Optional
enabledWhether to enable the plugin.
true
Optional
hooksAn object of optional callbacks to be executed during the respective phase of a GraphQL operation. Undefined callbacks default to a noop function.
Optional
execute?: ((span?, args?, res?) => void)Optional
parse?: ((span?, source?, document?) => void)Optional
validate?: ((span?, document?, errors?) => void){}
Optional
measuredWhether to measure the span. Can also be set to a key-value pair with span names as keys and booleans as values for more granular control.
Optional
serviceThe service name to be used for this plugin.
Optional
signatureWhether to enable signature calculation for the resource name. This can be disabled if your GraphQL operations always have a name. Note that when disabled all queries will need to be named for this to work properly.
true
Optional
sourceWhether to include the source of the operation within the query as a tag on every span. This may contain sensitive information and sould only be enabled if sensitive data is always sent as variables and not in the query text.
false
Optional
variablesAn 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
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 justquery
,mutation
orsubscription
.For example: