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

feat: support restify 8 #1250

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .readme-partials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ body: |-
* [gRPC](https://www.npmjs.com/package/grpc) server (version ^1.1)
* [hapi](https://www.npmjs.com/package/hapi) (versions 8 - 19)
* [koa](https://www.npmjs.com/package/koa) (version 1 - 2)
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 7)
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 8)

The agent will also automatically trace RPCs from the following modules:
* Outbound HTTP requests through `http`, `https`, and `http2` core modules
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The trace agent can do automatic tracing of the following web frameworks:
* [gRPC](https://www.npmjs.com/package/grpc) server (version ^1.1)
* [hapi](https://www.npmjs.com/package/hapi) (versions 8 - 19)
* [koa](https://www.npmjs.com/package/koa) (version 1 - 2)
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 7)
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 8)

The agent will also automatically trace RPCs from the following modules:
* Outbound HTTP requests through `http`, `https`, and `http2` core modules
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plugin-restify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Response = restify_5.Response;
type Next = restify_5.Next;
type CreateServerFn = (options?: restify_5.ServerOptions) => restify_5.Server;

const SUPPORTED_VERSIONS = '<=7.x';
const SUPPORTED_VERSIONS = '<=8.x';

function unpatchRestify(restify: Restify5) {
shimmer.unwrap(restify, 'createServer');
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/plugin-fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,10 @@
"dependencies": {
"restify": "^7.2.2"
}
},
"restify8": {
"dependencies": {
"restify": "^8.5.1"
}
}
}
2 changes: 2 additions & 0 deletions test/test-trace-web-frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
Restify5,
Restify6,
Restify7,
Restify8,
} from './web-frameworks/restify';

// The type of a stack trace object after being parsed from a trace span's stack
Expand Down Expand Up @@ -68,6 +69,7 @@ const FRAMEWORKS: WebFrameworkConstructor[] = [
Restify5,
Restify6,
Restify7,
Restify8,
];

/**
Expand Down
1 change: 1 addition & 0 deletions test/web-frameworks/restify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ export const Restify4 = makeRestifyClass(4);
export const Restify5 = makeRestifyClass(5);
export const Restify6 = makeRestifyClass(6);
export const Restify7 = makeRestifyClass(7);
export const Restify8 = makeRestifyClass(8);
// tslint:enable:variable-name