Skip to content

Commit b084a8d

Browse files
authored
doc: fix API.md and index.d.ts to include the plugins (#7341)
The files were missing multiple entries as well as having too many entries. This is now fixed by adding a test that verifies the correctness.
1 parent af9056a commit b084a8d

File tree

3 files changed

+222
-49
lines changed

3 files changed

+222
-49
lines changed

docs/API.md

Lines changed: 62 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -24,111 +24,118 @@ tracer.use('pg', {
2424
<h5 id="amqplib"></h5>
2525
<h5 id="amqplib-tags"></h5>
2626
<h5 id="amqplib-config"></h5>
27+
<h5 id="aerospike"></h5>
28+
<h5 id="ai"></h5>
29+
<h5 id="amqp10"></h5>
30+
<h5 id="anthropic"></h5>
31+
<h5 id="apollo"></h5>
2732
<h5 id="avsc"></h5>
2833
<h5 id="aws-sdk"></h5>
29-
<h5 id="aws-sdk-tags"></h5>
30-
<h5 id="aws-sdk-config"></h5>
34+
<h5 id="azure-event-hubs"></h5>
3135
<h5 id="azure-functions"></h5>
36+
<h5 id="azure-service-bus"></h5>
3237
<h5 id="bullmq"></h5>
3338
<h5 id="bunyan"></h5>
39+
<h5 id="cassandra-driver"></h5>
40+
<h5 id="child_process"></h5>
3441
<h5 id="confluentinc-kafka-javascript"></h5>
42+
<h5 id="connect"></h5>
3543
<h5 id="couchbase"></h5>
3644
<h5 id="cucumber"></h5>
45+
<h5 id="cypress"></h5>
3746
<h5 id="dns"></h5>
3847
<h5 id="elasticsearch"></h5>
39-
<h5 id="elasticsearch-tags"></h5>
40-
<h5 id="elasticsearch-config"></h5>
4148
<h5 id="express"></h5>
42-
<h5 id="express-tags"></h5>
43-
<h5 id="express-config"></h5>
44-
<h5 id="generic-pool"></h5>
45-
<h5 id="google-cloud-pubsub"></h5>
4649
<h5 id="fastify"></h5>
4750
<h5 id="fetch"></h5>
51+
<h5 id="find-my-way"></h5>
52+
<h5 id="fs"></h5>
53+
<h5 id="generic-pool"></h5>
54+
<h5 id="google-cloud-pubsub"></h5>
55+
<h5 id="google-cloud-vertexai"></h5>
56+
<h5 id="google-genai"></h5>
4857
<h5 id="graphql"></h5>
49-
<h5 id="graphql-tags"></h5>
50-
<h5 id="graphql-config"></h5>
5158
<h5 id="grpc"></h5>
5259
<h5 id="hapi"></h5>
53-
<h5 id="hapi-tags"></h5>
54-
<h5 id="hapi-config"></h5>
60+
<h5 id="hono"></h5>
5561
<h5 id="http"></h5>
56-
<h5 id="http-tags"></h5>
57-
<h5 id="http-config"></h5>
62+
<h5 id="http2"></h5>
5863
<h5 id="ioredis"></h5>
59-
<h5 id="ioredis-tags"></h5>
60-
<h5 id="ioredis-config"></h5>
6164
<h5 id="iovalkey"></h5>
62-
<h5 id="iovalkey-tags"></h5>
63-
<h5 id="iovalkey-config"></h5>
6465
<h5 id="jest"></h5>
6566
<h5 id="kafkajs"></h5>
67+
<h5 id="knex"></h5>
6668
<h5 id="koa"></h5>
67-
<h5 id="koa-tags"></h5>
68-
<h5 id="koa-config"></h5>
69-
<h5 id="ldapjs"></h5>
69+
<h5 id="langchain"></h5>
7070
<h5 id="mariadb"></h5>
7171
<h5 id="memcached"></h5>
72-
<h5 id="memcached-tags"></h5>
73-
<h5 id="memcached-config"></h5>
7472
<h5 id="microgateway-core"></h5>
7573
<h5 id="mocha"></h5>
7674
<h5 id="moleculer"></h5>
7775
<h5 id="mongodb-core"></h5>
78-
<h5 id="mongodb-core-tags"></h5>
79-
<h5 id="mongodb-core-config"></h5>
76+
<h5 id="mongoose"></h5>
8077
<h5 id="mysql"></h5>
81-
<h5 id="mysql-tags"></h5>
82-
<h5 id="mysql-config"></h5>
8378
<h5 id="mysql2"></h5>
84-
<h5 id="mysql2-tags"></h5>
85-
<h5 id="mysql2-config"></h5>
8679
<h5 id="net"></h5>
8780
<h5 id="next"></h5>
81+
<h5 id="nyc"></h5>
82+
<h5 id="openai"></h5>
8883
<h5 id="opensearch"></h5>
8984
<h5 id="oracledb"></h5>
90-
<h5 id="pino"></h5>
9185
<h5 id="pg"></h5>
92-
<h5 id="pg-tags"></h5>
93-
<h5 id="pg-config"></h5>
86+
<h5 id="pino"></h5>
87+
<h5 id="playwright"></h5>
9488
<h5 id="prisma"></h5>
9589
<h5 id="protobufjs"></h5>
9690
<h5 id="redis"></h5>
97-
<h5 id="redis-tags"></h5>
98-
<h5 id="redis-config"></h5>
9991
<h5 id="restify"></h5>
100-
<h5 id="restify-tags"></h5>
101-
<h5 id="restify-config"></h5>
92+
<h5 id="rhea"></h5>
93+
<h5 id="router"></h5>
94+
<h5 id="selenium"></h5>
95+
<h5 id="sharedb"></h5>
10296
<h5 id="tedious"></h5>
10397
<h5 id="undici"></h5>
104-
<h5 id="when"></h5>
98+
<h5 id="vitest"></h5>
99+
<h5 id="web"></h5>
105100
<h5 id="winston"></h5>
106101
<h5 id="ws"></h5>
107102
<h3 id="integrations-list">Available Plugins</h3>
108103

104+
* [aerospike](./interfaces/export_.plugins.aerospike.html)
105+
* [ai](./interfaces/export_.plugins.ai.html)
109106
* [amqp10](./interfaces/export_.plugins.amqp10.html)
110107
* [amqplib](./interfaces/export_.plugins.amqplib.html)
108+
* [anthropic](./interfaces/export_.plugins.anthropic.html)
109+
* [apollo](./interfaces/export_.plugins.apollo.html)
111110
* [avsc](./interfaces/export_.plugins.avsc.html)
112111
* [aws-sdk](./interfaces/export_.plugins.aws_sdk.html)
112+
* [azure-event-hubs](./interfaces/export_.plugins.azure_event_hubs.html)
113113
* [azure-functions](./interfaces/export_.plugins.azure_functions.html)
114-
* [bluebird](./interfaces/export_.plugins.bluebird.html)
114+
* [azure-service-bus](./interfaces/export_.plugins.azure_service_bus.html)
115115
* [bullmq](./interfaces/export_.plugins.bullmq.html)
116-
* [couchbase](./interfaces/export_.plugins.couchbase.html)
117-
* [cucumber](./interfaces/export_.plugins.cucumber.html)
118116
* [bunyan](./interfaces/export_.plugins.bunyan.html)
119-
* [confluentinc-kafka-javascript](./interfaces/export_.plugins.confluentinc_kafka_javascript.html)
120117
* [cassandra-driver](./interfaces/export_.plugins.cassandra_driver.html)
118+
* [child_process](./interfaces/export_.plugins.child_process.html)
119+
* [confluentinc-kafka-javascript](./interfaces/export_.plugins.confluentinc_kafka_javascript.html)
121120
* [connect](./interfaces/export_.plugins.connect.html)
121+
* [couchbase](./interfaces/export_.plugins.couchbase.html)
122+
* [cucumber](./interfaces/export_.plugins.cucumber.html)
123+
* [cypress](./interfaces/export_.plugins.cypress.html)
122124
* [dns](./interfaces/export_.plugins.dns.html)
123125
* [elasticsearch](./interfaces/export_.plugins.elasticsearch.html)
124126
* [express](./interfaces/export_.plugins.express.html)
125127
* [fastify](./interfaces/export_.plugins.fastify.html)
126128
* [fetch](./interfaces/export_.plugins.fetch.html)
129+
* [find-my-way](./interfaces/export_.plugins.find_my_way.html)
130+
* [fs](./interfaces/export_.plugins.fs.html)
127131
* [generic-pool](./interfaces/export_.plugins.generic_pool.html)
128132
* [google-cloud-pubsub](./interfaces/export_.plugins.google_cloud_pubsub.html)
133+
* [google-cloud-vertexai](./interfaces/export_.plugins.google_cloud_vertexai.html)
134+
* [google-genai](./interfaces/export_.plugins.google_genai.html)
129135
* [graphql](./interfaces/export_.plugins.graphql.html)
130136
* [grpc](./interfaces/export_.plugins.grpc.html)
131137
* [hapi](./interfaces/export_.plugins.hapi.html)
138+
* [hono](./interfaces/export_.plugins.hono.html)
132139
* [http](./interfaces/export_.plugins.http.html)
133140
* [http2](./interfaces/export_.plugins.http2.html)
134141
* [ioredis](./interfaces/export_.plugins.ioredis.html)
@@ -137,31 +144,37 @@ tracer.use('pg', {
137144
* [kafkajs](./interfaces/export_.plugins.kafkajs.html)
138145
* [knex](./interfaces/export_.plugins.knex.html)
139146
* [koa](./interfaces/export_.plugins.koa.html)
140-
* [ldapjs](./interfaces/export_.plugins.ldapjs.html)
147+
* [langchain](./interfaces/export_.plugins.langchain.html)
141148
* [mariadb](./interfaces/export_.plugins.mariadb.html)
142-
* [microgateway--core](./interfaces/export_.plugins.microgateway_core.html)
149+
* [memcached](./interfaces/export_.plugins.memcached.html)
150+
* [microgateway-core](./interfaces/export_.plugins.microgateway_core.html)
143151
* [mocha](./interfaces/export_.plugins.mocha.html)
152+
* [moleculer](./interfaces/export_.plugins.moleculer.html)
144153
* [mongodb-core](./interfaces/export_.plugins.mongodb_core.html)
154+
* [mongoose](./interfaces/export_.plugins.mongoose.html)
145155
* [mysql](./interfaces/export_.plugins.mysql.html)
146156
* [mysql2](./interfaces/export_.plugins.mysql2.html)
147157
* [net](./interfaces/export_.plugins.net.html)
148158
* [next](./interfaces/export_.plugins.next.html)
149-
* [opensearch](./interfaces/export_.plugins.opensearch.html)
159+
* [nyc](./interfaces/export_.plugins.nyc.html)
150160
* [openai](./interfaces/export_.plugins.openai.html)
161+
* [opensearch](./interfaces/export_.plugins.opensearch.html)
151162
* [oracledb](./interfaces/export_.plugins.oracledb.html)
152-
* [pino](./interfaces/export_.plugins.pino.html)
153163
* [pg](./interfaces/export_.plugins.pg.html)
164+
* [pino](./interfaces/export_.plugins.pino.html)
165+
* [playwright](./interfaces/export_.plugins.playwright.html)
154166
* [prisma](./interfaces/export_.plugins.prisma.html)
155-
* [promise](./interfaces/export_.plugins.promise.html)
156-
* [promise-js](./interfaces/export_.plugins.promise_js.html)
157167
* [protobufjs](./interfaces/export_.plugins.protobufjs.html)
158-
* [q](./interfaces/export_.plugins.q.html)
159168
* [redis](./interfaces/export_.plugins.redis.html)
160169
* [restify](./interfaces/export_.plugins.restify.html)
170+
* [rhea](./interfaces/export_.plugins.rhea.html)
161171
* [router](./interfaces/export_.plugins.router.html)
172+
* [selenium](./interfaces/export_.plugins.selenium.html)
173+
* [sharedb](./interfaces/export_.plugins.sharedb.html)
162174
* [tedious](./interfaces/export_.plugins.tedious.html)
163175
* [undici](./interfaces/export_.plugins.undici.html)
164-
* [when](./interfaces/export_.plugins.when.html)
176+
* [vitest](./interfaces/export_.plugins.vitest.html)
177+
* [web](./interfaces/export_.plugins.web.html)
165178
* [winston](./interfaces/export_.plugins.winston.html)
166179
* [ws](./interfaces/export_.plugins.ws.html)
167180

index.d.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ interface Plugins {
241241
"express": tracer.plugins.express;
242242
"fastify": tracer.plugins.fastify;
243243
"fetch": tracer.plugins.fetch;
244+
"find-my-way": tracer.plugins.find_my_way;
245+
"fs": tracer.plugins.fs;
244246
"generic-pool": tracer.plugins.generic_pool;
245247
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
246248
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
@@ -269,6 +271,7 @@ interface Plugins {
269271
"mysql2": tracer.plugins.mysql2;
270272
"net": tracer.plugins.net;
271273
"next": tracer.plugins.next;
274+
"nyc": tracer.plugins.nyc;
272275
"openai": tracer.plugins.openai;
273276
"opensearch": tracer.plugins.opensearch;
274277
"oracledb": tracer.plugins.oracledb;
@@ -286,7 +289,9 @@ interface Plugins {
286289
"tedious": tracer.plugins.tedious;
287290
"undici": tracer.plugins.undici;
288291
"vitest": tracer.plugins.vitest;
292+
"web": tracer.plugins.web;
289293
"winston": tracer.plugins.winston;
294+
"ws": tracer.plugins.ws;
290295
}
291296

292297
declare namespace tracer {
@@ -1924,6 +1929,16 @@ declare namespace tracer {
19241929
*/
19251930
interface fetch extends HttpClient {}
19261931

1932+
/**
1933+
* This plugin patches the [find-my-way](https://github.com/delvedor/find-my-way) router.
1934+
*/
1935+
interface find_my_way extends Integration {}
1936+
1937+
/**
1938+
* This plugin automatically instruments Node.js core fs operations.
1939+
*/
1940+
interface fs extends Instrumentation {}
1941+
19271942
/**
19281943
* This plugin patches the [generic-pool](https://github.com/coopernurse/node-pool)
19291944
* module to bind the callbacks the the caller context.
@@ -2355,6 +2370,11 @@ declare namespace tracer {
23552370
};
23562371
}
23572372

2373+
/**
2374+
* This plugin integrates with [nyc](https://github.com/istanbuljs/nyc) for CI visibility.
2375+
*/
2376+
interface nyc extends Integration {}
2377+
23582378
/**
23592379
* This plugin automatically instruments the
23602380
* [openai](https://platform.openai.com/docs/api-reference?lang=node.js) module.
@@ -2541,13 +2561,51 @@ declare namespace tracer {
25412561
*/
25422562
interface vitest extends Integration {}
25432563

2564+
/**
2565+
* This plugin implements shared web request instrumentation helpers.
2566+
*/
2567+
interface web extends HttpServer {
2568+
/**
2569+
* Custom filter function used to decide whether a URL/path should be instrumented.
2570+
* Takes precedence over allowlist/blocklist.
2571+
*/
2572+
filter?: (urlOrPath: string) => boolean;
2573+
2574+
/**
2575+
* Whether (or how) to obfuscate querystring values in `http.url`.
2576+
*
2577+
* - `true`: obfuscate all values
2578+
* - `false`: disable obfuscation
2579+
* - `string`: regex string used to obfuscate matching values (empty string disables)
2580+
* - `RegExp`: regex used to obfuscate matching values
2581+
*/
2582+
queryStringObfuscation?: boolean | string | RegExp;
2583+
2584+
/**
2585+
* Whether to enable resource renaming when the framework route is unavailable.
2586+
*/
2587+
resourceRenamingEnabled?: boolean;
2588+
}
2589+
25442590
/**
25452591
* This plugin patches the [winston](https://github.com/winstonjs/winston)
25462592
* to automatically inject trace identifiers in log records when the
25472593
* [logInjection](interfaces/traceroptions.html#logInjection) option is enabled
25482594
* on the tracer.
25492595
*/
25502596
interface winston extends Integration {}
2597+
2598+
/**
2599+
* This plugin automatically instruments the
2600+
* [ws](https://github.com/websockets/ws) module.
2601+
*/
2602+
interface ws extends Instrumentation {
2603+
/**
2604+
* Controls whether websocket messages should be traced.
2605+
* This is also configurable via `DD_TRACE_WEBSOCKET_MESSAGES_ENABLED`.
2606+
*/
2607+
traceWebsocketMessagesEnabled?: boolean;
2608+
}
25512609
}
25522610

25532611
export namespace opentelemetry {

0 commit comments

Comments
 (0)