dd-trace 5.97.0 → 5.98.0
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.
- package/index.d.ts +26 -2
- package/package.json +1 -1
- package/packages/datadog-instrumentations/src/cucumber.js +65 -3
- package/packages/datadog-instrumentations/src/cypress-config.js +31 -37
- package/packages/datadog-instrumentations/src/jest.js +104 -12
- package/packages/datadog-instrumentations/src/mocha/utils.js +8 -0
- package/packages/datadog-instrumentations/src/redis.js +12 -6
- package/packages/datadog-plugin-aws-sdk/src/base.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/redshift.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/sns.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +1 -0
- package/packages/datadog-plugin-cucumber/src/index.js +6 -0
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +109 -1
- package/packages/datadog-plugin-cypress/src/index.js +59 -2
- package/packages/datadog-plugin-fs/src/index.js +1 -1
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +2 -1
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +2 -7
- package/packages/datadog-plugin-http/src/client.js +1 -1
- package/packages/datadog-plugin-http/src/server.js +10 -2
- package/packages/datadog-plugin-http2/src/client.js +1 -1
- package/packages/datadog-plugin-http2/src/server.js +10 -2
- package/packages/datadog-plugin-mongodb-core/src/index.js +3 -3
- package/packages/datadog-plugin-mysql/src/index.js +1 -1
- package/packages/datadog-plugin-next/src/index.js +8 -2
- package/packages/datadog-plugin-pg/src/index.js +1 -1
- package/packages/datadog-plugin-tedious/src/index.js +1 -1
- package/packages/datadog-plugin-ws/src/close.js +1 -1
- package/packages/datadog-plugin-ws/src/receiver.js +1 -1
- package/packages/dd-trace/src/aiguard/sdk.js +22 -22
- package/packages/dd-trace/src/appsec/blocked_templates.js +4 -3
- package/packages/dd-trace/src/appsec/blocking.js +62 -34
- package/packages/dd-trace/src/appsec/sdk/set_user.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/track_event.js +5 -5
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +2 -2
- package/packages/dd-trace/src/appsec/sdk/utils.js +4 -2
- package/packages/dd-trace/src/config/defaults.js +0 -1
- package/packages/dd-trace/src/config/generated-config-types.d.ts +5 -0
- package/packages/dd-trace/src/config/index.js +55 -28
- package/packages/dd-trace/src/config/supported-configurations.json +61 -4
- package/packages/dd-trace/src/constants.js +1 -0
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +5 -2
- package/packages/dd-trace/src/encode/0.4.js +7 -6
- package/packages/dd-trace/src/encode/span-stats.js +4 -1
- package/packages/dd-trace/src/log/index.js +0 -10
- package/packages/dd-trace/src/openfeature/remote_config.js +6 -1
- package/packages/dd-trace/src/opentelemetry/context_manager.js +6 -4
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +17 -2
- package/packages/dd-trace/src/opentelemetry/otlp/protobuf_loader.js +14 -2
- package/packages/dd-trace/src/opentelemetry/otlp/trace.proto +358 -0
- package/packages/dd-trace/src/opentelemetry/otlp/trace_service.proto +78 -0
- package/packages/dd-trace/src/opentelemetry/trace/index.js +75 -0
- package/packages/dd-trace/src/opentelemetry/trace/otlp_http_trace_exporter.js +66 -0
- package/packages/dd-trace/src/opentelemetry/trace/otlp_transformer.js +332 -0
- package/packages/dd-trace/src/opentracing/tracer.js +9 -4
- package/packages/dd-trace/src/plugins/log_plugin.js +3 -0
- package/packages/dd-trace/src/plugins/plugin.js +6 -11
- package/packages/dd-trace/src/plugins/storage.js +2 -2
- package/packages/dd-trace/src/plugins/tracing.js +22 -5
- package/packages/dd-trace/src/plugins/util/test.js +2 -0
- package/packages/dd-trace/src/plugins/util/web.js +6 -88
- package/packages/dd-trace/src/profiling/profiler.js +34 -77
- package/packages/dd-trace/src/proxy.js +8 -3
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +15 -11
- package/packages/dd-trace/src/service-naming/index.js +1 -1
- package/packages/dd-trace/src/service-naming/schemas/definition.js +4 -1
- package/packages/dd-trace/src/service-naming/schemas/util.js +15 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +24 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/storage.js +60 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +17 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/websocket.js +5 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/storage.js +17 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/web.js +11 -1
- package/packages/dd-trace/src/service-naming/schemas/v1/websocket.js +6 -0
- package/packages/dd-trace/src/span_stats.js +5 -1
- package/packages/dd-trace/src/tracer.js +2 -2
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +28 -6
- package/vendor/dist/protobufjs/index.js +1 -1
- package/packages/dd-trace/src/log/utils.js +0 -16
|
@@ -30,11 +30,26 @@ function withSuffixFunction (suffix) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function optionServiceSource ({ pluginConfig, integration, connectionName }) {
|
|
34
|
+
if (pluginConfig.splitByInstance && connectionName) {
|
|
35
|
+
return 'opt.split_by_instance'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (pluginConfig.service) {
|
|
39
|
+
return 'opt.plugin'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return integration
|
|
43
|
+
}
|
|
44
|
+
|
|
33
45
|
const redisConfig = {
|
|
34
46
|
opName: () => 'redis.command',
|
|
35
47
|
serviceName: ({ tracerService, pluginConfig, system, connectionName }) => {
|
|
36
48
|
return getRedisService(pluginConfig, connectionName) || fromSystem(tracerService, system)
|
|
37
49
|
},
|
|
50
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
51
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'redis' })
|
|
52
|
+
},
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
const valkeyConfig = {
|
|
@@ -42,6 +57,9 @@ const valkeyConfig = {
|
|
|
42
57
|
serviceName: ({ tracerService, pluginConfig, system, connectionName }) => {
|
|
43
58
|
return getRedisService(pluginConfig, connectionName) || fromSystem(tracerService, system)
|
|
44
59
|
},
|
|
60
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
61
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'valkey' })
|
|
62
|
+
},
|
|
45
63
|
}
|
|
46
64
|
|
|
47
65
|
const storage = {
|
|
@@ -50,67 +68,109 @@ const storage = {
|
|
|
50
68
|
opName: () => 'aerospike.command',
|
|
51
69
|
serviceName: ({ tracerService, pluginConfig }) =>
|
|
52
70
|
pluginConfig.service || `${tracerService}-aerospike`,
|
|
71
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
72
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'aerospike' })
|
|
73
|
+
},
|
|
53
74
|
},
|
|
54
75
|
'cassandra-driver': {
|
|
55
76
|
opName: () => 'cassandra.query',
|
|
56
77
|
serviceName: ({ tracerService, pluginConfig, system }) =>
|
|
57
78
|
pluginConfig.service || fromSystem(tracerService, system),
|
|
79
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
80
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'cassandra-driver' })
|
|
81
|
+
},
|
|
58
82
|
},
|
|
59
83
|
couchbase: {
|
|
60
84
|
opName: ({ operation }) => `couchbase.${operation}`,
|
|
61
85
|
serviceName: ({ tracerService, pluginConfig }) => pluginConfig.service || `${tracerService}-couchbase`,
|
|
86
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
87
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'couchbase' })
|
|
88
|
+
},
|
|
62
89
|
},
|
|
63
90
|
elasticsearch: {
|
|
64
91
|
opName: () => 'elasticsearch.query',
|
|
65
92
|
serviceName: ({ tracerService, pluginConfig }) =>
|
|
66
93
|
pluginConfig.service || `${tracerService}-elasticsearch`,
|
|
94
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
95
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'elasticsearch' })
|
|
96
|
+
},
|
|
67
97
|
},
|
|
68
98
|
ioredis: redisConfig,
|
|
69
99
|
iovalkey: valkeyConfig,
|
|
70
100
|
mariadb: {
|
|
71
101
|
opName: () => 'mariadb.query',
|
|
72
102
|
serviceName: mysqlServiceName,
|
|
103
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
104
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'mysql' })
|
|
105
|
+
},
|
|
73
106
|
},
|
|
74
107
|
memcached: {
|
|
75
108
|
opName: () => 'memcached.command',
|
|
76
109
|
serviceName: ({ tracerService, pluginConfig, system }) =>
|
|
77
110
|
pluginConfig.service || fromSystem(tracerService, system),
|
|
111
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
112
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'memcached' })
|
|
113
|
+
},
|
|
78
114
|
},
|
|
79
115
|
'mongodb-core': {
|
|
80
116
|
opName: () => 'mongodb.query',
|
|
81
117
|
serviceName: ({ tracerService, pluginConfig }) =>
|
|
82
118
|
pluginConfig.service || `${tracerService}-mongodb`,
|
|
119
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
120
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'mongodb' })
|
|
121
|
+
},
|
|
83
122
|
},
|
|
84
123
|
mysql: {
|
|
85
124
|
opName: () => 'mysql.query',
|
|
86
125
|
serviceName: mysqlServiceName,
|
|
126
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
127
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'mysql' })
|
|
128
|
+
},
|
|
87
129
|
},
|
|
88
130
|
mysql2: {
|
|
89
131
|
opName: () => 'mysql.query',
|
|
90
132
|
serviceName: mysqlServiceName,
|
|
133
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
134
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'mysql' })
|
|
135
|
+
},
|
|
91
136
|
},
|
|
92
137
|
opensearch: {
|
|
93
138
|
opName: () => 'opensearch.query',
|
|
94
139
|
serviceName: ({ tracerService, pluginConfig }) =>
|
|
95
140
|
pluginConfig.service || `${tracerService}-opensearch`,
|
|
141
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
142
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'opensearch' })
|
|
143
|
+
},
|
|
96
144
|
},
|
|
97
145
|
oracledb: {
|
|
98
146
|
opName: () => 'oracle.query',
|
|
99
147
|
serviceName: withSuffixFunction('oracle'),
|
|
148
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
149
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'oracledb' })
|
|
150
|
+
},
|
|
100
151
|
},
|
|
101
152
|
pg: {
|
|
102
153
|
opName: () => 'pg.query',
|
|
103
154
|
serviceName: withSuffixFunction('postgres'),
|
|
155
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
156
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'pg' })
|
|
157
|
+
},
|
|
104
158
|
},
|
|
105
159
|
prisma: {
|
|
106
160
|
opName: ({ operation }) => `prisma.${operation}`,
|
|
107
161
|
serviceName: withSuffixFunction('prisma'),
|
|
162
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
163
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'prisma' })
|
|
164
|
+
},
|
|
108
165
|
},
|
|
109
166
|
redis: redisConfig,
|
|
110
167
|
tedious: {
|
|
111
168
|
opName: () => 'tedious.request',
|
|
112
169
|
serviceName: ({ tracerService, pluginConfig, system }) =>
|
|
113
170
|
pluginConfig.service || fromSystem(tracerService, system),
|
|
171
|
+
serviceSource: ({ tracerService, pluginConfig, connectionName }) => {
|
|
172
|
+
return optionServiceSource({ tracerService, pluginConfig, connectionName, integration: 'tedious' })
|
|
173
|
+
},
|
|
114
174
|
},
|
|
115
175
|
},
|
|
116
176
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const {
|
|
4
|
+
identityService, httpPluginClientService, awsServiceV0,
|
|
5
|
+
optionServiceSource, awsServiceSource,
|
|
6
|
+
} = require('../util')
|
|
4
7
|
|
|
5
8
|
const web = {
|
|
6
9
|
client: {
|
|
@@ -15,56 +18,69 @@ const web = {
|
|
|
15
18
|
http: {
|
|
16
19
|
opName: () => 'http.request',
|
|
17
20
|
serviceName: httpPluginClientService,
|
|
21
|
+
serviceSource: optionServiceSource,
|
|
18
22
|
},
|
|
19
23
|
fetch: {
|
|
20
24
|
opName: () => 'http.request',
|
|
21
25
|
serviceName: httpPluginClientService,
|
|
26
|
+
serviceSource: optionServiceSource,
|
|
22
27
|
},
|
|
23
28
|
http2: {
|
|
24
29
|
opName: () => 'http.request',
|
|
25
30
|
serviceName: httpPluginClientService,
|
|
31
|
+
serviceSource: optionServiceSource,
|
|
26
32
|
},
|
|
27
33
|
genai: {
|
|
28
34
|
opName: () => 'google_genai.request',
|
|
29
35
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
36
|
+
serviceSource: optionServiceSource,
|
|
30
37
|
},
|
|
31
38
|
aws: {
|
|
32
39
|
opName: () => 'aws.request',
|
|
33
40
|
serviceName: awsServiceV0,
|
|
41
|
+
serviceSource: awsServiceSource,
|
|
34
42
|
},
|
|
35
43
|
lambda: {
|
|
36
44
|
opName: () => 'aws.request',
|
|
37
45
|
serviceName: awsServiceV0,
|
|
46
|
+
serviceSource: awsServiceSource,
|
|
38
47
|
},
|
|
39
48
|
undici: {
|
|
40
49
|
opName: () => 'undici.request',
|
|
41
50
|
serviceName: httpPluginClientService,
|
|
51
|
+
serviceSource: optionServiceSource,
|
|
42
52
|
},
|
|
43
53
|
},
|
|
44
54
|
server: {
|
|
45
55
|
'apollo.gateway.request': {
|
|
46
56
|
opName: () => 'apollo.gateway.request',
|
|
47
57
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
58
|
+
serviceSource: optionServiceSource,
|
|
48
59
|
},
|
|
49
60
|
'apollo.gateway.plan': {
|
|
50
61
|
opName: () => 'apollo.gateway.plan',
|
|
51
62
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
63
|
+
serviceSource: optionServiceSource,
|
|
52
64
|
},
|
|
53
65
|
'apollo.gateway.validate': {
|
|
54
66
|
opName: () => 'apollo.gateway.validate',
|
|
55
67
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
68
|
+
serviceSource: optionServiceSource,
|
|
56
69
|
},
|
|
57
70
|
'apollo.gateway.execute': {
|
|
58
71
|
opName: () => 'apollo.gateway.execute',
|
|
59
72
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
73
|
+
serviceSource: optionServiceSource,
|
|
60
74
|
},
|
|
61
75
|
'apollo.gateway.fetch': {
|
|
62
76
|
opName: () => 'apollo.gateway.fetch',
|
|
63
77
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
78
|
+
serviceSource: optionServiceSource,
|
|
64
79
|
},
|
|
65
80
|
'apollo.gateway.postprocessing': {
|
|
66
81
|
opName: () => 'apollo.gateway.postprocessing',
|
|
67
82
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
83
|
+
serviceSource: optionServiceSource,
|
|
68
84
|
},
|
|
69
85
|
grpc: {
|
|
70
86
|
opName: () => 'grpc.server',
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
+
const { optionServiceSource } = require('../util')
|
|
2
3
|
|
|
3
4
|
const websocket = {
|
|
4
5
|
request: {
|
|
5
6
|
ws: {
|
|
6
7
|
opName: () => 'web.request',
|
|
7
8
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
9
|
+
serviceSource: optionServiceSource,
|
|
8
10
|
},
|
|
9
11
|
},
|
|
10
12
|
producer: {
|
|
11
13
|
ws: {
|
|
12
14
|
opName: () => 'websocket.send',
|
|
13
15
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
16
|
+
serviceSource: optionServiceSource,
|
|
14
17
|
},
|
|
15
18
|
},
|
|
16
19
|
consumer: {
|
|
17
20
|
ws: {
|
|
18
21
|
opName: () => 'websocket.receive',
|
|
19
22
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
23
|
+
serviceSource: optionServiceSource,
|
|
20
24
|
},
|
|
21
25
|
},
|
|
22
26
|
close: {
|
|
23
27
|
ws: {
|
|
24
28
|
opName: () => 'websocket.close',
|
|
25
29
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
30
|
+
serviceSource: optionServiceSource,
|
|
26
31
|
},
|
|
27
32
|
},
|
|
28
33
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const { optionServiceSource } = require('../util')
|
|
4
|
+
|
|
3
5
|
function configWithFallback ({ tracerService, pluginConfig }) {
|
|
4
6
|
return pluginConfig.service || tracerService
|
|
5
7
|
}
|
|
@@ -7,11 +9,13 @@ function configWithFallback ({ tracerService, pluginConfig }) {
|
|
|
7
9
|
const redisNaming = {
|
|
8
10
|
opName: () => 'redis.command',
|
|
9
11
|
serviceName: configWithFallback,
|
|
12
|
+
serviceSource: optionServiceSource,
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
const mySQLNaming = {
|
|
13
16
|
opName: () => 'mysql.query',
|
|
14
17
|
serviceName: withFunction,
|
|
18
|
+
serviceSource: optionServiceSource,
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
function withFunction ({ tracerService, pluginConfig, params }) {
|
|
@@ -27,58 +31,71 @@ const storage = {
|
|
|
27
31
|
aerospike: {
|
|
28
32
|
opName: () => 'aerospike.command',
|
|
29
33
|
serviceName: configWithFallback,
|
|
34
|
+
serviceSource: optionServiceSource,
|
|
30
35
|
},
|
|
31
36
|
'cassandra-driver': {
|
|
32
37
|
opName: () => 'cassandra.query',
|
|
33
38
|
serviceName: configWithFallback,
|
|
39
|
+
serviceSource: optionServiceSource,
|
|
34
40
|
},
|
|
35
41
|
couchbase: {
|
|
36
42
|
opName: () => 'couchbase.query',
|
|
37
43
|
serviceName: configWithFallback,
|
|
44
|
+
serviceSource: optionServiceSource,
|
|
38
45
|
},
|
|
39
46
|
elasticsearch: {
|
|
40
47
|
opName: () => 'elasticsearch.query',
|
|
41
48
|
serviceName: configWithFallback,
|
|
49
|
+
serviceSource: optionServiceSource,
|
|
42
50
|
},
|
|
43
51
|
ioredis: redisNaming,
|
|
44
52
|
iovalkey: {
|
|
45
53
|
opName: () => 'valkey.command',
|
|
46
54
|
serviceName: configWithFallback,
|
|
55
|
+
serviceSource: optionServiceSource,
|
|
47
56
|
},
|
|
48
57
|
mariadb: {
|
|
49
58
|
opName: () => 'mariadb.query',
|
|
50
59
|
serviceName: withFunction,
|
|
60
|
+
serviceSource: optionServiceSource,
|
|
51
61
|
},
|
|
52
62
|
memcached: {
|
|
53
63
|
opName: () => 'memcached.command',
|
|
54
64
|
serviceName: configWithFallback,
|
|
65
|
+
serviceSource: optionServiceSource,
|
|
55
66
|
},
|
|
56
67
|
'mongodb-core': {
|
|
57
68
|
opName: () => 'mongodb.query',
|
|
58
69
|
serviceName: configWithFallback,
|
|
70
|
+
serviceSource: optionServiceSource,
|
|
59
71
|
},
|
|
60
72
|
mysql: mySQLNaming,
|
|
61
73
|
mysql2: mySQLNaming,
|
|
62
74
|
opensearch: {
|
|
63
75
|
opName: () => 'opensearch.query',
|
|
64
76
|
serviceName: configWithFallback,
|
|
77
|
+
serviceSource: optionServiceSource,
|
|
65
78
|
},
|
|
66
79
|
oracledb: {
|
|
67
80
|
opName: () => 'oracle.query',
|
|
68
81
|
serviceName: withFunction,
|
|
82
|
+
serviceSource: optionServiceSource,
|
|
69
83
|
},
|
|
70
84
|
pg: {
|
|
71
85
|
opName: () => 'postgresql.query',
|
|
72
86
|
serviceName: withFunction,
|
|
87
|
+
serviceSource: optionServiceSource,
|
|
73
88
|
},
|
|
74
89
|
prisma: {
|
|
75
90
|
opName: ({ operation }) => `prisma.${operation}`,
|
|
76
91
|
serviceName: configWithFallback,
|
|
92
|
+
serviceSource: optionServiceSource,
|
|
77
93
|
},
|
|
78
94
|
redis: redisNaming,
|
|
79
95
|
tedious: {
|
|
80
96
|
opName: () => 'mssql.query',
|
|
81
97
|
serviceName: configWithFallback,
|
|
98
|
+
serviceSource: optionServiceSource,
|
|
82
99
|
},
|
|
83
100
|
},
|
|
84
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const { identityService, httpPluginClientService } = require('../util')
|
|
3
|
+
const { identityService, httpPluginClientService, optionServiceSource } = require('../util')
|
|
4
4
|
|
|
5
5
|
const web = {
|
|
6
6
|
client: {
|
|
@@ -15,18 +15,22 @@ const web = {
|
|
|
15
15
|
http: {
|
|
16
16
|
opName: () => 'http.client.request',
|
|
17
17
|
serviceName: httpPluginClientService,
|
|
18
|
+
serviceSource: optionServiceSource,
|
|
18
19
|
},
|
|
19
20
|
genai: {
|
|
20
21
|
opName: () => 'google_genai.request',
|
|
21
22
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
23
|
+
serviceSource: optionServiceSource,
|
|
22
24
|
},
|
|
23
25
|
fetch: {
|
|
24
26
|
opName: () => 'http.client.request',
|
|
25
27
|
serviceName: httpPluginClientService,
|
|
28
|
+
serviceSource: optionServiceSource,
|
|
26
29
|
},
|
|
27
30
|
http2: {
|
|
28
31
|
opName: () => 'http.client.request',
|
|
29
32
|
serviceName: httpPluginClientService,
|
|
33
|
+
serviceSource: optionServiceSource,
|
|
30
34
|
},
|
|
31
35
|
aws: {
|
|
32
36
|
opName: ({ awsService }) => `aws.${awsService}.request`,
|
|
@@ -45,26 +49,32 @@ const web = {
|
|
|
45
49
|
'apollo.gateway.request': {
|
|
46
50
|
opName: () => 'apollo.gateway.request',
|
|
47
51
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
52
|
+
serviceSource: optionServiceSource,
|
|
48
53
|
},
|
|
49
54
|
'apollo.gateway.plan': {
|
|
50
55
|
opName: () => 'apollo.gateway.plan',
|
|
51
56
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
57
|
+
serviceSource: optionServiceSource,
|
|
52
58
|
},
|
|
53
59
|
'apollo.gateway.validate': {
|
|
54
60
|
opName: () => 'apollo.gateway.validate',
|
|
55
61
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
62
|
+
serviceSource: optionServiceSource,
|
|
56
63
|
},
|
|
57
64
|
'apollo.gateway.execute': {
|
|
58
65
|
opName: () => 'apollo.gateway.execute',
|
|
59
66
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
67
|
+
serviceSource: optionServiceSource,
|
|
60
68
|
},
|
|
61
69
|
'apollo.gateway.fetch': {
|
|
62
70
|
opName: () => 'apollo.gateway.fetch',
|
|
63
71
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
72
|
+
serviceSource: optionServiceSource,
|
|
64
73
|
},
|
|
65
74
|
'apollo.gateway.postprocessing': {
|
|
66
75
|
opName: () => 'apollo.gateway.postprocessing',
|
|
67
76
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
77
|
+
serviceSource: optionServiceSource,
|
|
68
78
|
},
|
|
69
79
|
grpc: {
|
|
70
80
|
opName: () => 'grpc.server.request',
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const { optionServiceSource } = require('../util')
|
|
4
|
+
|
|
3
5
|
const websocket = {
|
|
4
6
|
request: {
|
|
5
7
|
ws: {
|
|
6
8
|
opName: () => 'web.request',
|
|
7
9
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
10
|
+
serviceSource: optionServiceSource,
|
|
8
11
|
},
|
|
9
12
|
},
|
|
10
13
|
producer: {
|
|
11
14
|
ws: {
|
|
12
15
|
opName: () => 'websocket.send',
|
|
13
16
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
17
|
+
serviceSource: optionServiceSource,
|
|
14
18
|
},
|
|
15
19
|
},
|
|
16
20
|
consumer: {
|
|
17
21
|
ws: {
|
|
18
22
|
opName: () => 'websocket.receive',
|
|
19
23
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
24
|
+
serviceSource: optionServiceSource,
|
|
20
25
|
},
|
|
21
26
|
},
|
|
22
27
|
close: {
|
|
23
28
|
ws: {
|
|
24
29
|
opName: () => 'websocket.close',
|
|
25
30
|
serviceName: ({ pluginConfig, tracerService }) => pluginConfig.service || tracerService,
|
|
31
|
+
serviceSource: optionServiceSource,
|
|
26
32
|
},
|
|
27
33
|
},
|
|
28
34
|
}
|
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
HTTP_ROUTE,
|
|
12
12
|
HTTP_METHOD,
|
|
13
13
|
} = require('../../../ext/tags')
|
|
14
|
-
const { ORIGIN_KEY, TOP_LEVEL_KEY } = require('./constants')
|
|
14
|
+
const { ORIGIN_KEY, TOP_LEVEL_KEY, SVC_SRC_KEY } = require('./constants')
|
|
15
15
|
const { version } = require('./pkg')
|
|
16
16
|
const processTags = require('./process-tags')
|
|
17
17
|
|
|
@@ -60,6 +60,7 @@ class SpanAggStats {
|
|
|
60
60
|
synthetics,
|
|
61
61
|
method,
|
|
62
62
|
endpoint,
|
|
63
|
+
srvSrc,
|
|
63
64
|
} = this.aggKey
|
|
64
65
|
|
|
65
66
|
return {
|
|
@@ -71,6 +72,7 @@ class SpanAggStats {
|
|
|
71
72
|
Synthetics: synthetics,
|
|
72
73
|
HTTPMethod: method,
|
|
73
74
|
HTTPEndpoint: endpoint,
|
|
75
|
+
srv_src: srvSrc,
|
|
74
76
|
Hits: this.hits,
|
|
75
77
|
TopLevelHits: this.topLevelHits,
|
|
76
78
|
Errors: this.errors,
|
|
@@ -91,6 +93,7 @@ class SpanAggKey {
|
|
|
91
93
|
this.synthetics = span.meta[ORIGIN_KEY] === 'synthetics'
|
|
92
94
|
this.endpoint = span.meta[HTTP_ROUTE] || span.meta[HTTP_ENDPOINT] || ''
|
|
93
95
|
this.method = span.meta[HTTP_METHOD] || ''
|
|
96
|
+
this.srvSrc = span.meta[SVC_SRC_KEY] || ''
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
toString () {
|
|
@@ -103,6 +106,7 @@ class SpanAggKey {
|
|
|
103
106
|
this.synthetics,
|
|
104
107
|
this.method,
|
|
105
108
|
this.endpoint,
|
|
109
|
+
this.srvSrc,
|
|
106
110
|
].join(',')
|
|
107
111
|
}
|
|
108
112
|
}
|
|
@@ -17,8 +17,8 @@ const SERVICE_NAME = tags.SERVICE_NAME
|
|
|
17
17
|
const MEASURED = tags.MEASURED
|
|
18
18
|
|
|
19
19
|
class DatadogTracer extends Tracer {
|
|
20
|
-
constructor (config, prioritySampler) {
|
|
21
|
-
super(config, prioritySampler)
|
|
20
|
+
constructor (config, prioritySampler, exporter) {
|
|
21
|
+
super(config, prioritySampler, exporter)
|
|
22
22
|
this._dataStreamsProcessor = new DataStreamsProcessor(config)
|
|
23
23
|
this._dataStreamsManager = new DataStreamsManager(this._dataStreamsProcessor)
|
|
24
24
|
this.dataStreamsCheckpointer = new DataStreamsCheckpointer(this)
|