Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for undici tracing #1642

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ jobs:
environment:
- PLUGINS=sharedb

node-undici:
<<: *node-plugin-base
docker:
- image: node:<< parameters.node-version >>

node-when: *node-plugin-base

node-winston: *node-plugin-base
Expand Down Expand Up @@ -818,6 +823,10 @@ workflows:
- node-router: *matrix-supported-node-versions
- node-sharedb: *matrix-supported-node-versions
- node-tedious: *matrix-supported-node-versions
- node-undici:
matrix:
parameters:
node-version: ["14"]
- node-when: *matrix-supported-node-versions
- node-winston: *matrix-supported-node-versions
- codecov:
Expand Down Expand Up @@ -873,6 +882,7 @@ workflows:
- node-router
- node-sharedb
- node-tedious
- node-undici
- node-when
- node-winston
bench: &bench-jobs
Expand Down
1 change: 1 addition & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require,retry,MIT,Copyright 2011 Tim Koschützki Felix Geisendörfer
require,semver,ISC,Copyright Isaac Z. Schlueter and Contributors
require,source-map,BSD-3-Clause,Copyright 2009-2011 Mozilla Foundation and contributors
require,source-map-resolve,MIT,Copyright 2014-2020 Simon Lydell 2019 Jinxiang
dev,abort-controller,MIT,Copyright (c) 2017 Toru Nagashima
dev,autocannon,MIT,Copyright 2016 Matteo Collina
dev,axios,MIT,Copyright 2014-present Matt Zabriskie
dev,benchmark,MIT,Copyright 2010-2016 Mathias Bynens Robert Kieffer John-David Dalton
Expand Down
2 changes: 2 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ tracer.use('pg', {
<h5 id="restify-tags"></h5>
<h5 id="restify-config"></h5>
<h5 id="tedious"></h5>
<h5 id="undici"></h5>
<h5 id="when"></h5>
<h5 id="winston"></h5>
<h3 id="integrations-list">Available Plugins</h3>
Expand Down Expand Up @@ -138,6 +139,7 @@ tracer.use('pg', {
* [restify](./interfaces/plugins.restify.html)
* [router](./interfaces/plugins.router.html)
* [tedious](./interfaces/plugins.tedious.html)
* [undici](./interfaces/plugins.undici.html)
* [when](./interfaces/plugins.when.html)
* [winston](./interfaces/plugins.winston.html)

Expand Down
1 change: 1 addition & 0 deletions docs/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ tracer.use('rhea');
tracer.use('router');
tracer.use('sharedb', sharedbOptions);
tracer.use('tedious');
tracer.use('undici', httpClientOptions);
tracer.use('winston');

tracer.use('express', false)
Expand Down
7 changes: 7 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ interface Plugins {
"router": plugins.router;
"sharedb": plugins.sharedb;
"tedious": plugins.tedious;
"undici": plugins.undici;
"winston": plugins.winston;
}

Expand Down Expand Up @@ -1282,6 +1283,12 @@ declare namespace plugins {
*/
interface tedious extends Instrumentation {}

/**
* This plugin automatically instruments
* [undici](https://github.com/nodejs/undici/)
*/
interface undici extends HttpClient {}

/**
* This plugin patches the [winston](https://github.com/winstonjs/winston)
* to automatically inject trace identifiers in log records when the
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"source-map-resolve": "^0.6.0"
},
"devDependencies": {
"abort-controller": "^3.0.0",
"autocannon": "^4.5.2",
"axios": "^0.21.2",
"benchmark": "^2.1.4",
Expand Down
Loading