From 8931e3e79cefff7699aaf765cb3df9026d235da3 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 15 Apr 2024 19:12:41 +0200 Subject: [PATCH] chore(instr-restify): fix lint issues --- .../test/restify.test.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts index 5702f1f353..bea8b196a0 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts @@ -493,10 +493,7 @@ describe('Restify Instrumentation', () => { describe('using requestHook in config', () => { it('calls requestHook provided function when set in config', async () => { const requestHook = (span: Span, info: RestifyRequestInfo) => { - span.setAttribute( - SEMATTRS_HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); span.setAttribute('restify.layer', info.layerType); }; @@ -518,10 +515,7 @@ describe('Restify Instrumentation', () => { // span from get const span = memoryExporter.getFinishedSpans()[2]; assert.notStrictEqual(span, undefined); - assert.strictEqual( - span.attributes[SEMATTRS_HTTP_METHOD], - 'GET' - ); + assert.strictEqual(span.attributes[SEMATTRS_HTTP_METHOD], 'GET'); assert.strictEqual( span.attributes['restify.layer'], 'request_handler' @@ -533,10 +527,7 @@ describe('Restify Instrumentation', () => { it('does not propagate an error from a requestHook that throws exception', async () => { const requestHook = (span: Span, info: RestifyRequestInfo) => { - span.setAttribute( - SEMATTRS_HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); throw Error('error thrown in requestHook'); }; @@ -559,10 +550,7 @@ describe('Restify Instrumentation', () => { // span from get const span = memoryExporter.getFinishedSpans()[2]; assert.notStrictEqual(span, undefined); - assert.strictEqual( - span.attributes[SEMATTRS_HTTP_METHOD], - 'GET' - ); + assert.strictEqual(span.attributes[SEMATTRS_HTTP_METHOD], 'GET'); } } );