dd-trace 4.0.0-pre-1ac80f8 → 4.0.0-pre-60b4fde

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/package.json +1 -1
  2. package/packages/datadog-instrumentations/src/playwright.js +2 -2
  3. package/packages/datadog-plugin-amqp10/src/consumer.js +1 -1
  4. package/packages/datadog-plugin-amqp10/src/index.js +1 -1
  5. package/packages/datadog-plugin-amqp10/src/producer.js +1 -1
  6. package/packages/datadog-plugin-amqplib/src/client.js +1 -1
  7. package/packages/datadog-plugin-amqplib/src/consumer.js +1 -1
  8. package/packages/datadog-plugin-amqplib/src/index.js +1 -1
  9. package/packages/datadog-plugin-amqplib/src/producer.js +1 -1
  10. package/packages/datadog-plugin-aws-sdk/src/base.js +3 -1
  11. package/packages/datadog-plugin-aws-sdk/src/index.js +1 -1
  12. package/packages/datadog-plugin-aws-sdk/src/services/cloudwatchlogs.js +2 -0
  13. package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +2 -0
  14. package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +2 -0
  15. package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +2 -0
  16. package/packages/datadog-plugin-aws-sdk/src/services/lambda.js +2 -0
  17. package/packages/datadog-plugin-aws-sdk/src/services/redshift.js +2 -0
  18. package/packages/datadog-plugin-aws-sdk/src/services/s3.js +2 -0
  19. package/packages/datadog-plugin-aws-sdk/src/services/sns.js +2 -0
  20. package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +2 -0
  21. package/packages/datadog-plugin-bunyan/src/index.js +1 -1
  22. package/packages/datadog-plugin-cassandra-driver/src/index.js +1 -1
  23. package/packages/datadog-plugin-connect/src/index.js +1 -1
  24. package/packages/datadog-plugin-couchbase/src/index.js +1 -1
  25. package/packages/datadog-plugin-cucumber/src/index.js +3 -3
  26. package/packages/datadog-plugin-cypress/src/index.js +1 -1
  27. package/packages/datadog-plugin-cypress/src/plugin.js +0 -2
  28. package/packages/datadog-plugin-dns/src/index.js +1 -1
  29. package/packages/datadog-plugin-dns/src/lookup.js +1 -1
  30. package/packages/datadog-plugin-dns/src/lookup_service.js +1 -1
  31. package/packages/datadog-plugin-dns/src/resolve.js +1 -1
  32. package/packages/datadog-plugin-dns/src/reverse.js +1 -1
  33. package/packages/datadog-plugin-elasticsearch/src/index.js +1 -1
  34. package/packages/datadog-plugin-express/src/index.js +1 -1
  35. package/packages/datadog-plugin-fastify/src/index.js +1 -1
  36. package/packages/datadog-plugin-find-my-way/src/index.js +1 -1
  37. package/packages/datadog-plugin-fs/src/index.js +1 -1
  38. package/packages/datadog-plugin-google-cloud-pubsub/src/client.js +1 -1
  39. package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +1 -1
  40. package/packages/datadog-plugin-google-cloud-pubsub/src/index.js +1 -1
  41. package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +1 -1
  42. package/packages/datadog-plugin-graphql/src/execute.js +1 -1
  43. package/packages/datadog-plugin-graphql/src/index.js +1 -1
  44. package/packages/datadog-plugin-graphql/src/parse.js +1 -1
  45. package/packages/datadog-plugin-graphql/src/resolve.js +1 -1
  46. package/packages/datadog-plugin-graphql/src/validate.js +1 -1
  47. package/packages/datadog-plugin-grpc/src/client.js +1 -1
  48. package/packages/datadog-plugin-grpc/src/index.js +1 -1
  49. package/packages/datadog-plugin-grpc/src/server.js +1 -1
  50. package/packages/datadog-plugin-hapi/src/index.js +1 -1
  51. package/packages/datadog-plugin-http/src/client.js +2 -2
  52. package/packages/datadog-plugin-http/src/index.js +1 -1
  53. package/packages/datadog-plugin-http/src/server.js +2 -2
  54. package/packages/datadog-plugin-http2/src/client.js +2 -2
  55. package/packages/datadog-plugin-http2/src/index.js +1 -1
  56. package/packages/datadog-plugin-http2/src/server.js +2 -2
  57. package/packages/datadog-plugin-ioredis/src/index.js +1 -1
  58. package/packages/datadog-plugin-jest/src/index.js +2 -2
  59. package/packages/datadog-plugin-kafkajs/src/consumer.js +1 -1
  60. package/packages/datadog-plugin-kafkajs/src/index.js +1 -1
  61. package/packages/datadog-plugin-kafkajs/src/producer.js +1 -1
  62. package/packages/datadog-plugin-koa/src/index.js +1 -1
  63. package/packages/datadog-plugin-mariadb/src/index.js +1 -1
  64. package/packages/datadog-plugin-memcached/src/index.js +1 -1
  65. package/packages/datadog-plugin-microgateway-core/src/index.js +1 -1
  66. package/packages/datadog-plugin-mocha/src/index.js +2 -2
  67. package/packages/datadog-plugin-moleculer/src/client.js +1 -1
  68. package/packages/datadog-plugin-moleculer/src/index.js +1 -1
  69. package/packages/datadog-plugin-moleculer/src/server.js +1 -1
  70. package/packages/datadog-plugin-mongodb-core/src/index.js +1 -1
  71. package/packages/datadog-plugin-mysql/src/index.js +1 -1
  72. package/packages/datadog-plugin-mysql2/src/index.js +1 -1
  73. package/packages/datadog-plugin-net/src/index.js +1 -1
  74. package/packages/datadog-plugin-net/src/ipc.js +1 -1
  75. package/packages/datadog-plugin-net/src/tcp.js +1 -1
  76. package/packages/datadog-plugin-next/src/index.js +3 -3
  77. package/packages/datadog-plugin-opensearch/src/index.js +1 -1
  78. package/packages/datadog-plugin-oracledb/src/index.js +1 -1
  79. package/packages/datadog-plugin-paperplane/src/index.js +1 -1
  80. package/packages/datadog-plugin-paperplane/src/logger.js +1 -1
  81. package/packages/datadog-plugin-paperplane/src/server.js +1 -1
  82. package/packages/datadog-plugin-pg/src/index.js +1 -1
  83. package/packages/datadog-plugin-pino/src/index.js +1 -1
  84. package/packages/datadog-plugin-playwright/src/index.js +3 -3
  85. package/packages/datadog-plugin-redis/src/index.js +1 -1
  86. package/packages/datadog-plugin-restify/src/index.js +1 -1
  87. package/packages/datadog-plugin-rhea/src/consumer.js +1 -1
  88. package/packages/datadog-plugin-rhea/src/index.js +1 -1
  89. package/packages/datadog-plugin-rhea/src/producer.js +1 -1
  90. package/packages/datadog-plugin-router/src/index.js +8 -8
  91. package/packages/datadog-plugin-sharedb/src/index.js +1 -1
  92. package/packages/datadog-plugin-tedious/src/index.js +1 -1
  93. package/packages/datadog-plugin-web/src/index.js +1 -1
  94. package/packages/datadog-plugin-winston/src/index.js +1 -1
  95. package/packages/dd-trace/src/plugin_manager.js +7 -7
  96. package/packages/dd-trace/src/plugins/ci_plugin.js +13 -15
  97. package/packages/dd-trace/src/plugins/log_plugin.js +1 -1
  98. package/packages/dd-trace/src/plugins/tracing.js +1 -1
  99. package/packages/dd-trace/src/plugins/util/test.js +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dd-trace",
3
- "version": "4.0.0-pre-1ac80f8",
3
+ "version": "4.0.0-pre-60b4fde",
4
4
  "description": "Datadog APM tracing client for JavaScript",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -76,7 +76,7 @@ function getRootDir (playwrightRunner) {
76
76
  }
77
77
 
78
78
  function testBeginHandler (test) {
79
- const { title: testName, location: { file: testSuiteAbsolutePath }, _type } = test
79
+ const { _requireFile: testSuiteAbsolutePath, title: testName, _type } = test
80
80
 
81
81
  if (_type === 'beforeAll' || _type === 'afterAll') {
82
82
  return
@@ -101,7 +101,7 @@ function testBeginHandler (test) {
101
101
  }
102
102
 
103
103
  function testEndHandler (test, testStatus, error) {
104
- const { location: { file: testSuiteAbsolutePath }, results, _type } = test
104
+ const { _requireFile: testSuiteAbsolutePath, results, _type } = test
105
105
 
106
106
  if (_type === 'beforeAll' || _type === 'afterAll') {
107
107
  return
@@ -4,7 +4,7 @@ const ConsumerPlugin = require('../../dd-trace/src/plugins/consumer')
4
4
  const { getAddress, getShortName } = require('./util')
5
5
 
6
6
  class Amqp10ConsumerPlugin extends ConsumerPlugin {
7
- static get name () { return 'amqp10' }
7
+ static get id () { return 'amqp10' }
8
8
  static get system () { return 'amqp' }
9
9
 
10
10
  start ({ link }) {
@@ -5,7 +5,7 @@ const ConsumerPlugin = require('./consumer')
5
5
  const CompositePlugin = require('../../dd-trace/src/plugins/composite')
6
6
 
7
7
  class Amqp10Plugin extends CompositePlugin {
8
- static get name () { return 'amqp10' }
8
+ static get id () { return 'amqp10' }
9
9
  static get plugins () {
10
10
  return {
11
11
  producer: ProducerPlugin,
@@ -5,7 +5,7 @@ const { CLIENT_PORT_KEY } = require('../../dd-trace/src/constants')
5
5
  const { getAddress, getShortName } = require('./util')
6
6
 
7
7
  class Amqp10ProducerPlugin extends ProducerPlugin {
8
- static get name () { return 'amqp10' }
8
+ static get id () { return 'amqp10' }
9
9
  static get operation () { return 'send' }
10
10
  static get system () { return 'amqp' }
11
11
 
@@ -6,7 +6,7 @@ const ClientPlugin = require('../../dd-trace/src/plugins/client')
6
6
  const { getResourceName } = require('./util')
7
7
 
8
8
  class AmqplibClientPlugin extends ClientPlugin {
9
- static get name () { return 'amqplib' }
9
+ static get id () { return 'amqplib' }
10
10
  static get operation () { return 'command' }
11
11
 
12
12
  start ({ channel = {}, method, fields }) {
@@ -5,7 +5,7 @@ const ConsumerPlugin = require('../../dd-trace/src/plugins/consumer')
5
5
  const { getResourceName } = require('./util')
6
6
 
7
7
  class AmqplibConsumerPlugin extends ConsumerPlugin {
8
- static get name () { return 'amqplib' }
8
+ static get id () { return 'amqplib' }
9
9
  static get operation () { return 'command' }
10
10
 
11
11
  start ({ method, fields, message }) {
@@ -7,7 +7,7 @@ const CompositePlugin = require('../../dd-trace/src/plugins/composite')
7
7
 
8
8
  // TODO: Consider splitting channels for publish/receive in the instrumentation.
9
9
  class AmqplibPlugin extends CompositePlugin {
10
- static get name () { return 'amqplib' }
10
+ static get id () { return 'amqplib' }
11
11
  static get plugins () {
12
12
  return {
13
13
  producer: ProducerPlugin,
@@ -6,7 +6,7 @@ const ProducerPlugin = require('../../dd-trace/src/plugins/producer')
6
6
  const { getResourceName } = require('./util')
7
7
 
8
8
  class AmqplibProducerPlugin extends ProducerPlugin {
9
- static get name () { return 'amqplib' }
9
+ static get id () { return 'amqplib' }
10
10
  static get operation () { return 'command' }
11
11
 
12
12
  start ({ channel = {}, method, fields }) {
@@ -6,8 +6,10 @@ const { storage } = require('../../datadog-core')
6
6
  const { isTrue } = require('../../dd-trace/src/util')
7
7
 
8
8
  class BaseAwsSdkPlugin extends Plugin {
9
+ static get id () { return 'aws' }
10
+
9
11
  get serviceIdentifier () {
10
- const id = this.constructor.name.toLowerCase()
12
+ const id = this.constructor.id.toLowerCase()
11
13
  Object.defineProperty(this, 'serviceIdentifier', {
12
14
  configurable: true,
13
15
  writable: true,
@@ -5,7 +5,7 @@ const Plugin = require('../../dd-trace/src/plugins/plugin')
5
5
  const services = require('./services')
6
6
 
7
7
  class AwsSdkPlugin extends Plugin {
8
- static get name () {
8
+ static get id () {
9
9
  return 'aws-sdk'
10
10
  }
11
11
 
@@ -3,6 +3,8 @@
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class CloudwatchLogs extends BaseAwsSdkPlugin {
6
+ static get id () { return 'cloudwatchlogs' }
7
+
6
8
  generateTags (params, operation) {
7
9
  const tags = {}
8
10
 
@@ -3,6 +3,8 @@
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class DynamoDb extends BaseAwsSdkPlugin {
6
+ static get id () { return 'dynamodb' }
7
+
6
8
  generateTags (params, operation, response) {
7
9
  const tags = {}
8
10
 
@@ -3,6 +3,8 @@ const log = require('../../../dd-trace/src/log')
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class EventBridge extends BaseAwsSdkPlugin {
6
+ static get id () { return 'eventbridge' }
7
+
6
8
  generateTags (params, operation, response) {
7
9
  if (!params || !params.source) return {}
8
10
 
@@ -2,6 +2,8 @@
2
2
  const log = require('../../../dd-trace/src/log')
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
  class Kinesis extends BaseAwsSdkPlugin {
5
+ static get id () { return 'kinesis' }
6
+
5
7
  generateTags (params, operation, response) {
6
8
  if (!params || !params.StreamName) return {}
7
9
 
@@ -4,6 +4,8 @@ const log = require('../../../dd-trace/src/log')
4
4
  const BaseAwsSdkPlugin = require('../base')
5
5
 
6
6
  class Lambda extends BaseAwsSdkPlugin {
7
+ static get id () { return 'lambda' }
8
+
7
9
  generateTags (params, operation, response) {
8
10
  const tags = {}
9
11
 
@@ -3,6 +3,8 @@
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class Redshift extends BaseAwsSdkPlugin {
6
+ static get id () { return 'redshift' }
7
+
6
8
  generateTags (params, operation, response) {
7
9
  const tags = {}
8
10
 
@@ -3,6 +3,8 @@
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class S3 extends BaseAwsSdkPlugin {
6
+ static get id () { return 's3' }
7
+
6
8
  generateTags (params, operation, response) {
7
9
  const tags = {}
8
10
 
@@ -3,6 +3,8 @@ const log = require('../../../dd-trace/src/log')
3
3
  const BaseAwsSdkPlugin = require('../base')
4
4
 
5
5
  class Sns extends BaseAwsSdkPlugin {
6
+ static get id () { return 'sns' }
7
+
6
8
  generateTags (params, operation, response) {
7
9
  if (!params) return {}
8
10
 
@@ -5,6 +5,8 @@ const BaseAwsSdkPlugin = require('../base')
5
5
  const { storage } = require('../../../datadog-core')
6
6
 
7
7
  class Sqs extends BaseAwsSdkPlugin {
8
+ static get id () { return 'sqs' }
9
+
8
10
  constructor (...args) {
9
11
  super(...args)
10
12
  //
@@ -3,7 +3,7 @@
3
3
  const LogPlugin = require('../../dd-trace/src/plugins/log_plugin')
4
4
 
5
5
  class BunyanPlugin extends LogPlugin {
6
- static get name () {
6
+ static get id () {
7
7
  return 'bunyan'
8
8
  }
9
9
  }
@@ -4,7 +4,7 @@ const { CLIENT_PORT_KEY } = require('../../dd-trace/src/constants')
4
4
  const DatabasePlugin = require('../../dd-trace/src/plugins/database')
5
5
 
6
6
  class CassandraDriverPlugin extends DatabasePlugin {
7
- static get name () { return 'cassandra-driver' }
7
+ static get id () { return 'cassandra-driver' }
8
8
  static get system () { return 'cassandra' }
9
9
 
10
10
  start ({ keyspace, query, connectionOptions = {} }) {
@@ -3,7 +3,7 @@
3
3
  const RouterPlugin = require('../../datadog-plugin-router/src')
4
4
 
5
5
  class ConnectPlugin extends RouterPlugin {
6
- static get name () {
6
+ static get id () {
7
7
  return 'connect'
8
8
  }
9
9
 
@@ -5,7 +5,7 @@ const { storage } = require('../../datadog-core')
5
5
  const analyticsSampler = require('../../dd-trace/src/analytics_sampler')
6
6
 
7
7
  class CouchBasePlugin extends Plugin {
8
- static get name () {
8
+ static get id () {
9
9
  return 'couchbase'
10
10
  }
11
11
 
@@ -15,7 +15,7 @@ const { RESOURCE_NAME } = require('../../../ext/tags')
15
15
  const { COMPONENT, ERROR_MESSAGE } = require('../../dd-trace/src/constants')
16
16
 
17
17
  class CucumberPlugin extends CiPlugin {
18
- static get name () {
18
+ static get id () {
19
19
  return 'cucumber'
20
20
  }
21
21
 
@@ -52,7 +52,7 @@ class CucumberPlugin extends CiPlugin {
52
52
  this.testSuiteSpan = this.tracer.startSpan('cucumber.test_suite', {
53
53
  childOf: this.testModuleSpan,
54
54
  tags: {
55
- [COMPONENT]: this.constructor.name,
55
+ [COMPONENT]: this.constructor.id,
56
56
  ...this.testEnvironmentMetadata,
57
57
  ...testSuiteMetadata
58
58
  }
@@ -94,7 +94,7 @@ class CucumberPlugin extends CiPlugin {
94
94
  const span = this.tracer.startSpan('cucumber.step', {
95
95
  childOf,
96
96
  tags: {
97
- [COMPONENT]: this.constructor.name,
97
+ [COMPONENT]: this.constructor.id,
98
98
  'cucumber.step': resource,
99
99
  [RESOURCE_NAME]: resource
100
100
  }
@@ -3,7 +3,7 @@ const Plugin = require('../../dd-trace/src/plugins/plugin')
3
3
  // Cypress plugin does not patch any library. This is just a placeholder to
4
4
  // follow the structure of the plugins
5
5
  class CypressPlugin extends Plugin {
6
- static get name () {
6
+ static get id () {
7
7
  return 'cypress'
8
8
  }
9
9
  }
@@ -15,7 +15,6 @@ const {
15
15
  TEST_MODULE_ID,
16
16
  TEST_SESSION_ID,
17
17
  TEST_COMMAND,
18
- TEST_BUNDLE,
19
18
  TEST_MODULE,
20
19
  finishAllTraceSpans
21
20
  } = require('../../dd-trace/src/plugins/util/test')
@@ -168,7 +167,6 @@ module.exports = (on, config) => {
168
167
  const testSuiteTags = {
169
168
  [TEST_COMMAND]: command,
170
169
  [TEST_COMMAND]: command,
171
- [TEST_BUNDLE]: TEST_FRAMEWORK_NAME,
172
170
  [TEST_MODULE]: TEST_FRAMEWORK_NAME
173
171
  }
174
172
  if (testSuiteSpan) {
@@ -9,7 +9,7 @@ const DNSReversePlugin = require('./reverse')
9
9
  // TODO: Are DNS spans really client spans?
10
10
 
11
11
  class DNSPlugin extends CompositePlugin {
12
- static get name () { return 'dns' }
12
+ static get id () { return 'dns' }
13
13
  static get plugins () {
14
14
  return {
15
15
  lookup: DNSLookupPlugin,
@@ -3,7 +3,7 @@
3
3
  const ClientPlugin = require('../../dd-trace/src/plugins/client')
4
4
 
5
5
  class DNSLookupPlugin extends ClientPlugin {
6
- static get name () { return 'dns' }
6
+ static get id () { return 'dns' }
7
7
  static get operation () { return 'lookup' }
8
8
 
9
9
  start ([hostname]) {
@@ -3,7 +3,7 @@
3
3
  const ClientPlugin = require('../../dd-trace/src/plugins/client')
4
4
 
5
5
  class DNSLookupServicePlugin extends ClientPlugin {
6
- static get name () { return 'dns' }
6
+ static get id () { return 'dns' }
7
7
  static get operation () { return 'lookup_service' }
8
8
 
9
9
  start ([address, port]) {
@@ -3,7 +3,7 @@
3
3
  const ClientPlugin = require('../../dd-trace/src/plugins/client')
4
4
 
5
5
  class DNSResolvePlugin extends ClientPlugin {
6
- static get name () { return 'dns' }
6
+ static get id () { return 'dns' }
7
7
  static get operation () { return 'resolve' }
8
8
 
9
9
  start ([hostname, maybeType]) {
@@ -3,7 +3,7 @@
3
3
  const ClientPlugin = require('../../dd-trace/src/plugins/client')
4
4
 
5
5
  class DNSReversePlugin extends ClientPlugin {
6
- static get name () { return 'dns' }
6
+ static get id () { return 'dns' }
7
7
  static get operation () { return 'reverse' }
8
8
 
9
9
  start ([ip]) {
@@ -3,7 +3,7 @@
3
3
  const DatabasePlugin = require('../../dd-trace/src/plugins/database')
4
4
 
5
5
  class ElasticsearchPlugin extends DatabasePlugin {
6
- static get name () { return 'elasticsearch' }
6
+ static get id () { return 'elasticsearch' }
7
7
 
8
8
  start ({ params }) {
9
9
  const body = getBody(params.body || params.bulkBody)
@@ -3,7 +3,7 @@
3
3
  const RouterPlugin = require('../../datadog-plugin-router/src')
4
4
 
5
5
  class ExpressPlugin extends RouterPlugin {
6
- static get name () {
6
+ static get id () {
7
7
  return 'express'
8
8
  }
9
9
 
@@ -3,7 +3,7 @@
3
3
  const RouterPlugin = require('../../datadog-plugin-router/src')
4
4
 
5
5
  class FastifyPlugin extends RouterPlugin {
6
- static get name () {
6
+ static get id () {
7
7
  return 'fastify'
8
8
  }
9
9
 
@@ -4,7 +4,7 @@ const Plugin = require('../../dd-trace/src/plugins/plugin')
4
4
  const web = require('../../dd-trace/src/plugins/util/web')
5
5
 
6
6
  class FindMyWayPlugin extends Plugin {
7
- static get name () {
7
+ static get id () {
8
8
  return 'find-my-way'
9
9
  }
10
10
 
@@ -3,7 +3,7 @@
3
3
  const TracingPlugin = require('../../dd-trace/src/plugins/tracing')
4
4
 
5
5
  class FsPlugin extends TracingPlugin {
6
- static get name () { return 'fs' }
6
+ static get id () { return 'fs' }
7
7
  static get operation () { return 'operation' }
8
8
 
9
9
  configure (...args) {
@@ -3,7 +3,7 @@
3
3
  const ClientPlugin = require('../../dd-trace/src/plugins/client')
4
4
 
5
5
  class GoogleCloudPubsubClientPlugin extends ClientPlugin {
6
- static get name () { return 'google-cloud-pubsub' }
6
+ static get id () { return 'google-cloud-pubsub' }
7
7
  static get operation () { return 'request' }
8
8
 
9
9
  start ({ request, api, projectId }) {
@@ -3,7 +3,7 @@
3
3
  const ConsumerPlugin = require('../../dd-trace/src/plugins/consumer')
4
4
 
5
5
  class GoogleCloudPubsubConsumerPlugin extends ConsumerPlugin {
6
- static get name () { return 'google-cloud-pubsub' }
6
+ static get id () { return 'google-cloud-pubsub' }
7
7
  static get operation () { return 'receive' }
8
8
 
9
9
  start ({ message }) {
@@ -7,7 +7,7 @@ const CompositePlugin = require('../../dd-trace/src/plugins/composite')
7
7
 
8
8
  // TODO: Consider splitting channels for publish/receive in the instrumentation.
9
9
  class GoogleCloudPubsubPlugin extends CompositePlugin {
10
- static get name () { return 'google-cloud-pubsub' }
10
+ static get id () { return 'google-cloud-pubsub' }
11
11
  static get plugins () {
12
12
  return {
13
13
  producer: ProducerPlugin,
@@ -3,7 +3,7 @@
3
3
  const ProducerPlugin = require('../../dd-trace/src/plugins/producer')
4
4
 
5
5
  class GoogleCloudPubsubProducerPlugin extends ProducerPlugin {
6
- static get name () { return 'google-cloud-pubsub' }
6
+ static get id () { return 'google-cloud-pubsub' }
7
7
  static get operation () { return 'request' }
8
8
 
9
9
  start ({ request, api, projectId }) {
@@ -5,7 +5,7 @@ const TracingPlugin = require('../../dd-trace/src/plugins/tracing')
5
5
  let tools
6
6
 
7
7
  class GraphQLExecutePlugin extends TracingPlugin {
8
- static get name () { return 'graphql' }
8
+ static get id () { return 'graphql' }
9
9
  static get operation () { return 'execute' }
10
10
 
11
11
  start ({ operation, args, docSource }) {
@@ -8,7 +8,7 @@ const GraphQLValidatePlugin = require('./validate')
8
8
  const GraphQLResolvePlugin = require('./resolve')
9
9
 
10
10
  class GraphQLPlugin extends CompositePlugin {
11
- static get name () { return 'graphql' }
11
+ static get id () { return 'graphql' }
12
12
  static get plugins () {
13
13
  return {
14
14
  execute: GraphQLExecutePlugin,
@@ -3,7 +3,7 @@
3
3
  const TracingPlugin = require('../../dd-trace/src/plugins/tracing')
4
4
 
5
5
  class GraphQLParsePlugin extends TracingPlugin {
6
- static get name () { return 'graphql' }
6
+ static get id () { return 'graphql' }
7
7
  static get operation () { return 'parser' }
8
8
 
9
9
  start () {
@@ -5,7 +5,7 @@ const TracingPlugin = require('../../dd-trace/src/plugins/tracing')
5
5
  const collapsedPathSym = Symbol('collapsedPaths')
6
6
 
7
7
  class GraphQLResolvePlugin extends TracingPlugin {
8
- static get name () { return 'graphql' }
8
+ static get id () { return 'graphql' }
9
9
  static get operation () { return 'resolve' }
10
10
 
11
11
  start ({ info, context }) {
@@ -3,7 +3,7 @@
3
3
  const TracingPlugin = require('../../dd-trace/src/plugins/tracing')
4
4
 
5
5
  class GraphQLValidatePlugin extends TracingPlugin {
6
- static get name () { return 'graphql' }
6
+ static get id () { return 'graphql' }
7
7
  static get operation () { return 'validate' }
8
8
 
9
9
  start ({ docSource, document }) {
@@ -5,7 +5,7 @@ const { TEXT_MAP } = require('../../../ext/formats')
5
5
  const { addMetadataTags, getFilter, getMethodMetadata } = require('./util')
6
6
 
7
7
  class GrpcClientPlugin extends ClientPlugin {
8
- static get name () { return 'grpc' }
8
+ static get id () { return 'grpc' }
9
9
  static get operation () { return 'client:request' }
10
10
 
11
11
  start ({ metadata, path, type }) {
@@ -5,7 +5,7 @@ const GrpcClientPlugin = require('./client')
5
5
  const CompositePlugin = require('../../dd-trace/src/plugins/composite')
6
6
 
7
7
  class GrpcPlugin extends CompositePlugin {
8
- static get name () { return 'grpc' }
8
+ static get id () { return 'grpc' }
9
9
  static get plugins () {
10
10
  return {
11
11
  server: GrpcServerPlugin,
@@ -5,7 +5,7 @@ const { TEXT_MAP } = require('../../../ext/formats')
5
5
  const { addMetadataTags, getFilter, getMethodMetadata } = require('./util')
6
6
 
7
7
  class GrpcServerPlugin extends ServerPlugin {
8
- static get name () { return 'grpc' }
8
+ static get id () { return 'grpc' }
9
9
  static get operation () { return 'server:request' }
10
10
 
11
11
  constructor (...args) {
@@ -5,7 +5,7 @@ const RouterPlugin = require('../../datadog-plugin-router/src')
5
5
  const web = require('../../dd-trace/src/plugins/util/web')
6
6
 
7
7
  class HapiPlugin extends RouterPlugin {
8
- static get name () {
8
+ static get id () {
9
9
  return 'hapi'
10
10
  }
11
11
 
@@ -16,7 +16,7 @@ const HTTP_REQUEST_HEADERS = tags.HTTP_REQUEST_HEADERS
16
16
  const HTTP_RESPONSE_HEADERS = tags.HTTP_RESPONSE_HEADERS
17
17
 
18
18
  class HttpClientPlugin extends Plugin {
19
- static get name () {
19
+ static get id () {
20
20
  return 'http'
21
21
  }
22
22
 
@@ -39,7 +39,7 @@ class HttpClientPlugin extends Plugin {
39
39
  const span = this.tracer.startSpan('http.request', {
40
40
  childOf,
41
41
  tags: {
42
- [COMPONENT]: this.constructor.name,
42
+ [COMPONENT]: this.constructor.id,
43
43
  'span.kind': 'client',
44
44
  'service.name': getServiceName(this.tracer, this.config, options),
45
45
  'resource.name': method,
@@ -5,7 +5,7 @@ const HttpClientPlugin = require('./client')
5
5
  const CompositePlugin = require('../../dd-trace/src/plugins/composite')
6
6
 
7
7
  class HttpPlugin extends CompositePlugin {
8
- static get name () { return 'http' }
8
+ static get id () { return 'http' }
9
9
  static get plugins () {
10
10
  return {
11
11
  server: HttpServerPlugin,
@@ -7,7 +7,7 @@ const { incomingHttpRequestStart, incomingHttpRequestEnd } = require('../../dd-t
7
7
  const { COMPONENT } = require('../../dd-trace/src/constants')
8
8
 
9
9
  class HttpServerPlugin extends Plugin {
10
- static get name () {
10
+ static get id () {
11
11
  return 'http'
12
12
  }
13
13
 
@@ -20,7 +20,7 @@ class HttpServerPlugin extends Plugin {
20
20
  const store = storage.getStore()
21
21
  const span = web.startSpan(this.tracer, this.config, req, res, 'web.request')
22
22
 
23
- span.setTag(COMPONENT, this.constructor.name)
23
+ span.setTag(COMPONENT, this.constructor.id)
24
24
 
25
25
  this._parentStore = store
26
26
  this.enter(span, { ...store, req, res })
@@ -25,7 +25,7 @@ const HTTP2_HEADER_STATUS = ':status'
25
25
  const HTTP2_METHOD_GET = 'GET'
26
26
 
27
27
  class Http2ClientPlugin extends Plugin {
28
- static get name () {
28
+ static get id () {
29
29
  return 'http2'
30
30
  }
31
31
 
@@ -45,7 +45,7 @@ class Http2ClientPlugin extends Plugin {
45
45
  const span = this.tracer.startSpan('http.request', {
46
46
  childOf,
47
47
  tags: {
48
- [COMPONENT]: this.constructor.name,
48
+ [COMPONENT]: this.constructor.id,
49
49
  [CLIENT_PORT_KEY]: parseInt(sessionDetails.port),
50
50
  [SPAN_KIND]: CLIENT,
51
51
  'service.name': getServiceName(this.tracer, this.config, sessionDetails),
@@ -5,7 +5,7 @@ const Http2ClientPlugin = require('./client')
5
5
  const CompositePlugin = require('../../dd-trace/src/plugins/composite')
6
6
 
7
7
  class Http2Plugin extends CompositePlugin {
8
- static get name () { return 'http2' }
8
+ static get id () { return 'http2' }
9
9
  static get plugins () {
10
10
  return {
11
11
  server: Http2ServerPlugin,