UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

19 lines (12 loc) 393 B
'use strict' const ApolloBasePlugin = require('../../../dd-trace/src/plugins/apollo') class ApolloGatewayPlanPlugin extends ApolloBasePlugin { static operation = 'plan' static prefix = 'tracing:apm:apollo:gateway:plan' onEnd (ctx) { const span = ctx?.currentStore?.span if (!span) return this.config.hooks.plan(span, ctx) } } module.exports = ApolloGatewayPlanPlugin