Skip to content

Commit

Permalink
chore(instr-restify): fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed Apr 15, 2024
1 parent 7119f45 commit 8931e3e
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand All @@ -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'
Expand All @@ -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');
};
Expand All @@ -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');
}
}
);
Expand Down

0 comments on commit 8931e3e

Please sign in to comment.