Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
31935f0
node stackwalk for Electron
timfish Jun 20, 2021
781312e
Merge branch 'master' into feat/node-stackwalk-electron
timfish Jun 21, 2021
f143c10
Re-order params
timfish Jun 21, 2021
c890809
Merge branch 'master' into feat/node-stackwalk-electron
timfish Jun 21, 2021
8b30a9a
Move source loading to seperate file
timfish Jun 21, 2021
f1e3f31
First try
timfish Jun 22, 2021
6a03a2c
Improve logic
timfish Jun 22, 2021
7c164dd
Revert tslib change
timfish Jun 22, 2021
f362589
jsdoc
timfish Jun 22, 2021
da256ee
Merge branch 'master' into feat/separate-source-reading
timfish Jun 22, 2021
04db3fb
Merge branch 'master' into feat/separate-source-reading
timfish Jul 16, 2021
3324578
With integration
timfish Jul 20, 2021
443ea06
oops
timfish Jul 20, 2021
dcd287d
Merge branch 'master' into feat/separate-source-reading
timfish Aug 10, 2021
84155de
Make this a non-breaking change by keeping NodeOptions.frameContextLines
timfish Aug 10, 2021
285a643
Merge branch 'master' into feat/separate-source-reading
timfish Aug 24, 2021
6a8a48b
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Nov 3, 2021
c4f48ad
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Dec 1, 2021
7f5793a
Merge branch 'master' into feat/separate-source-reading
timfish Dec 1, 2021
ac4318e
Correctly handle zero lines of context
timfish Dec 1, 2021
82573f4
Merge remote-tracking branch 'origin/feat/separate-source-reading' in…
timfish Dec 1, 2021
86e2d4e
Make async
timfish Dec 1, 2021
2ff7efd
Merge branch 'master' into feat/separate-source-reading
timfish Dec 2, 2021
012eff3
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Jan 11, 2022
647999d
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Jan 21, 2022
2fe44fc
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Feb 8, 2022
af9b1d8
No longer a breaking change
timfish Feb 8, 2022
270e13e
Fix linting
timfish Feb 8, 2022
76d8998
Merge branch 'master' into feat/separate-source-reading
timfish Feb 13, 2022
ddb8406
Add docs and `@deprecated`
timfish Feb 14, 2022
83f859b
Disable warning for internal usage of deprecated field
timfish Feb 14, 2022
8bc20b0
Revert promise changes
timfish Feb 14, 2022
18c5780
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Feb 14, 2022
2266ac5
Minor improve
timfish Feb 15, 2022
bb37b6c
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Feb 16, 2022
03cb320
Fix nextjs test
timfish Feb 16, 2022
965d48f
revert
timfish Feb 16, 2022
e08bcbb
Fix nextjs test
timfish Feb 16, 2022
7cd79af
Merge branch 'feat/separate-source-reading' of https://github.com/tim…
timfish Feb 16, 2022
f278e8b
Code review changes!
timfish Feb 17, 2022
a7d61df
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Feb 17, 2022
ef7d423
Abhi code review
timfish Feb 17, 2022
a172765
Revert promisify
timfish Feb 18, 2022
bd85ce9
Add TODO comment
timfish Feb 18, 2022
d7952ea
Merge remote-tracking branch 'upstream/master' into feat/separate-sou…
timfish Feb 23, 2022
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
Prev Previous commit
Next Next commit
Minor improve
  • Loading branch information
timfish committed Feb 15, 2022
commit 2266ac5c229d905ae67e4d87f8821a46ce44bf70
1 change: 0 additions & 1 deletion packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export { NodeOptions } from './types';
export { NodeBackend } from './backend';
export { NodeClient } from './client';
export { defaultIntegrations, init, lastEventId, flush, close, getSentryRelease } from './sdk';
export { eventFromException, eventFromMessage } from './eventbuilder';
export { deepReadDirSync } from './utils';
export { SDK_NAME } from './version';

Expand Down
4 changes: 3 additions & 1 deletion packages/node/src/integrations/contextlines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LRUMap } from 'lru_map';
import { NodeClient } from '../client';

const FILE_CONTENT_CACHE = new LRUMap<string, string | null>(100);
const DEFAULT_LINES_OF_CONTEXT = 7;

function readTextFileAsync(path: string): Promise<string> {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -63,7 +64,8 @@ export class ContextLines implements Integration {

/** Processes an event and adds context lines */
public async addToEvent(event: Event): Promise<Event> {
const contextLines = this._options.frameContextLines == undefined ? 7 : this._options.frameContextLines;
const contextLines =
this._options.frameContextLines !== undefined ? this._options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;

const frames = event.exception?.values?.[0].stacktrace?.frames;

Expand Down