Skip to content

Commit

Permalink
fixup! node.js v14 compatibility and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Apr 12, 2023
1 parent 9dbbd3d commit 9ebae5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Expand Up @@ -405,7 +405,10 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
}
responseFinished = true;
utils.setSpanWithError(span, error);
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
span.setStatus({
code: SpanStatusCode.ERROR,
message: error.message,
});
this._closeHttpSpan(
span,
SpanKind.CLIENT,
Expand Down
Expand Up @@ -871,7 +871,7 @@ describe('HttpInstrumentation', () => {
});

it('should have 2 ended span when client prematurely close', async () => {
const promise = new Promise<void>((resolve) => {
const promise = new Promise<void>(resolve => {
const req = http.get(
`${protocol}://${hostname}:${serverPort}/hang`,
res => {
Expand Down Expand Up @@ -948,10 +948,10 @@ describe('HttpInstrumentation', () => {
},
res => {
res.on('end', () => {});
res.on('close', () => {});
res.on('error', () => {
res.on('close', () => {
resolve();
});
res.on('error', () => {});
}
);
// force flush http request header to trigger client response callback
Expand Down

0 comments on commit 9ebae5e

Please sign in to comment.