Skip to content

Commit f92279f

Browse files
authored
feat: add tracer (#107)
* WIP - Tracer basic implementation * Reorder Tracer methods * Added stub methods for captureAWS & Clients * Removed lodash * Fixed SAM & Chalice variable comparison * Added tracing provider * Added capture lambda decorator * Unit tests + format * Removed package-lock, added npm-shrinkwrap * WIP: capture clients * Updated license in package * Simplified unit tests * Added more tests * WIP examples * WIP method decorator * Enable tracing only when running in Lambda * Removed redundant env restore commands in tests * Fixed ERR_UNHANDLED_REJECTION * Removed debug logs * Updated packages & config * Documentation * Typing & Tests * Updated package & config * Added capture method * Changed TracerInterface * Removed Chalice references * Sorted imports * Fixed type for return of captureLambdaHandler * Linting tests * Fixed linting & added TODOs * Applied fix to PowertoolLogFormatter see #304
1 parent 064c2e2 commit f92279f

31 files changed

+13991
-1
lines changed

packages/logger/tests/unit/formatter/PowertoolLogFormatter.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,13 @@ describe('Class: PowertoolLogFormatter', () => {
251251
try {
252252
shouldThrow();
253253
} catch (error) {
254+
// TODO: review message content assertion (see Issue #304)
254255
// Assess
255256
expect(error).toBeInstanceOf(Error);
256257
const formattedTypeError = formatter.formatError(<Error>error);
257258
expect(formattedTypeError).toEqual({
258259
location: expect.stringMatching(/PowertoolLogFormatter.test.ts:[0-9]+/),
259-
message: 'Cannot read property \'foo\' of null',
260+
message: expect.stringMatching(/Cannot read propert/),
260261
name: 'TypeError',
261262
stack: expect.stringMatching(/PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/),
262263
});

0 commit comments

Comments
 (0)