Skip to content

Commit 2e663b7

Browse files
konraddysputperf2711adamcronin42Adam Croninianrice07
authored
Version 0.3.2 update (#248)
* Feature/metrics (#36) * URL parsers * Command line attribute provider * Code review suggestions * Metrics support * Nullable token * Accept null | undefined * Correct import * Determines typo * Code review adjustements * Code review adjustements, test based on the variable and not random date, delay helper reject * Recursive to iterative + delay helper error on reject * Added one more test case * Rollback submission url in the test * Add debug IDs support to sdk-core, node and browser packages (#33) * sdk-core: add DebugIdProvider and DebugIdMapProvider * sdk-core: add appending debugId to frames * browser, node: use VariableDebugIdMapProvider * sdk-core: change debugId to debug_identifier * sdk-core: fix unit tests, add test for debug_identifier set * sdk core: load debugIds on DebugIdProvider construction --------- Co-authored-by: Sebastian Alex <[email protected]> * Add ZIP upload of sourcemaps. (#37) * sourcmap tools: replace SourceMapUploader with SymbolUploader * sourcmap tools: add ZipArchive * webpack plugin: change uploading of sourcemaps to ZIP upload * build: update webpack tsconfig.json path * sourcemap tools: fix ZipArchive test missing dir * webpack plugin: fix zipping sourcemaps by passing stream instead of string * sourcemap tools: minor type fixes in ZipArchive --------- Co-authored-by: Sebastian Alex <[email protected]> * Adding React Backtrace Client, ErrorBoundary, and tests (#38) * Adding React Backtrace Client, ErrorBoundary, and tests * Adding package-lock.json file * Changing props and state to use interfaces instead of type * Switching from a window variable to a static instance on BacktraceClient * Updating the static instance in BacktraceClient to use a getter as well as it's usage and tests * Making the instance param of BacktraceClient optional --------- Co-authored-by: Adam Cronin <[email protected]> * Add more robust error handling and common code for CLI. (#39) * sourcemap tools: add functions to DebugIdGenerator for retrieving values * sourcemap tools: add FileFinder * sourcemap tools: add Logger definition * sourcemap tools, webpack plugin: change process file fn to not write to disk * sourcemap tools: add sources to source map functionality * sourcemap tools: add Result and AsyncResult * cli, webpack, sourcemap tools: add Result returning for error handling --------- Co-authored-by: Sebastian Alex <[email protected]> * Add CLI for manipulating source and sourcemap files. (#40) * cli: add initial @backtrace/cli project * cli: add command-line-args and command-line-usage package * cli: add commands support * cli: add logger implementation and usage * cli: add reference to @backtrace/sourcemap-tools * cli: add common functions * cli: add process command * cli: add upload command * cli: add addSources command * cli: add archive output feature * cli: change verbosity levels * cli: add doc to find * cli: extract 'backtrace' command name to a const * cli: fix file collisions in uploaded zip archive * cli: change default Command generic param to object --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk: add 'backtrace.agent' attribute specifying submitting agent name (#41) Co-authored-by: Sebastian Alex <[email protected]> * Feature/react example app (#44) * Adding React Backtrace Client, ErrorBoundary, and tests * Creating a basic react app that uses the react sdk to send an error to Backtrace on rendering error * Adding a button to manually trigger an error/report and updating some of the wording * Updating tsconfig * Adding a format and lint script to package.json * Updating readme to show how to run the example * Removing eslintConfig from package.json * Cleaning up package.json * Cleaning up sendError(), Adding submission url const, and adding toasts * Updating README.md to be more specific to our app and removing eject and test scripts from package.json * Adding a message example and updating wording on buttons * Removing unnecessary text from readme * Adding a metrics example --------- Co-authored-by: Adam Cronin <[email protected]> * Source debug ID insertion fixes. (#43) * sourcemap tools: remove ContentAppender * sourcemap tools: fix processing source with shebang * sourcemap tools: add source comment before trailing whitespaces in source * sourcemap tools: add doc to appendBeforeWhitespaces * sourcemap tools: fix appendBeforeWhitespaces and add tests to it * sourcemap tools: update doc in appendBeforeWhitespaces --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: add glob patterns for finding files (#45) Co-authored-by: Sebastian Alex <[email protected]> * cli: add bin entry (#46) Co-authored-by: Sebastian Alex <[email protected]> * Include symbolication in the error object (#48) * node uncaught error handler (#42) * Node unhandled exceptions/rejections * Correct submission URL * Unhandled exception handler * Do not exted launch settings * Respect unhandled rejection mode in app * Improve warning messages generated on unhandled promise rejection. Added options to disable the feature * Fixed typo in node_env * Move functions to consts * Before send event support (#49) * Browser unhandler error handler (#51) * Browser unhandled error handler * Client - subscribe to event handlers * Browser unhandled error handler * Skip report callback (#50) * Before send event support * Skip report callback * Test name fix * Feature/component stack as backtracedata (#47) * Updating readme to show how to run the example * Updating README.md to be more specific to our app and removing eject and test scripts from package.json * Adding ability to send BacktraceData to the client.send(). This allows us to add the component stack as a thread to be viewed in the UI as well * Adding ability to detect and parse React 16 component stacks as well as tests * Quick cleanup * Adding check for object in isBacktraceData * Updating the react component stack parsing to better follow existing patterns. This adds a react stack trace converter and updates the BacktraceReport stackTrace to be a Record with stack trace info as the value * Fixing reference to BacktraceData * Updates based on PR feedback. The main one being adding message back as a field in BacktraceReport * Moving the React 16 component stack helpers to ReactStackTraceConverter * Adding tests for BacktraceReport.addStackTrace() * Adding a test for thread generation in BacktraceDataBuilder * Updating comment format --------- Co-authored-by: Adam Cronin <[email protected]> * Breadcrumbs support (#52) * Breadcrumbs support * Code review adjustements * Move from array to overwriting array data structure * Return if array is empty * sourcemap tools: fix doesSourceMapHaveSources with undefined sources array (#53) Co-authored-by: Sebastian Alex <[email protected]> * sourcemap tools: add common code for bundler plugins and CLI (#54) * sourcemap tools: fix doesSourceMapHaveSources with undefined sources array * sourcemap tools: add functions in AsyncResult * sourcemap tools: add common helpers from CLI to sourcemap-tools and use them * sourcemap tools: add some common functions and match functions * sourcemap tools: add common code for managing sourcemaps --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: use common sourcemap tools code in CLI and add logging (#55) * cli: use helper functions from sourcemap-tools * cli: refactor commands to add more debugging and clarity --------- Co-authored-by: Sebastian Alex <[email protected]> * webpack plugin: update plugin to use common code (#56) * sourcemap tools: fix doesSourceMapHaveSources with undefined sources array * sourcemap tools: add functions in AsyncResult * sourcemap tools: add common helpers from CLI to sourcemap-tools and use them * sourcemap tools: add some common functions and match functions * sourcemap tools: add common code for managing sourcemaps * webpack: update plugin to use common code --------- Co-authored-by: Sebastian Alex <[email protected]> * rollup: add rollup plugin (#57) * sourcemap tools: fix doesSourceMapHaveSources with undefined sources array * sourcemap tools: add functions in AsyncResult * sourcemap tools: add common helpers from CLI to sourcemap-tools and use them * sourcemap tools: add some common functions and match functions * sourcemap tools: add common code for managing sourcemaps * rollup plugin: add initial project * rollup plugin: add plugin based on Webpack plugin --------- Co-authored-by: Sebastian Alex <[email protected]> * sourcemap tools: add stripping of sourceContent by default (#58) * sourcemap tools: add stripping of sourceContent by default * cli: fix build error temporarily * webpack plugin: use common BacktracePluginOptions * update package-lock.json * workflows: use npm@8 with node 14.x --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: add stripping sourcesContent by default (#59) * cli: add stripping sourcesContent by default * cli: remove commented function in upload --------- Co-authored-by: Sebastian Alex <[email protected]> * sourcemap tools: fix invalid asset name for sourcemap upload * vite plugin based on rollup (#61) * vite plugin: add initial project * vite plugin: add re-export of rollup plugin and vite build tests --------- Co-authored-by: Sebastian Alex <[email protected]> * Database support (#62) * Database support * Do not include deduplication model yet * Code review adjustements * Handle potential errors in the storage provider * Feature/error boundary name (#63) * Adding name prop to ErrorBoundary and sending as an attribute so users can distinguish between multiple * Changing min supported version of React to 16.8.0 (hooks) and adding webpack, webpack-cli, and ts-loader to package.json * Adding an Inner ErrorBoundary to the react example app * Adding error.type when sending via the ErrorBoundary * Changing the ErrorBoundary name to be optional with a default * Updating error.type in ErrorBoundary --------- Co-authored-by: Adam Cronin <[email protected]> * Browser breadcrumbs support (#64) * Browser breadcrumbs support * Code review adjustements to the WebREquestEventSubscriber * Add text as an attribute * cli: add chmod +x after build * cli: quality of life improvements (#67) * cli: add version option * cli: add more info about missing files * cli: add .backtracejsrc config file support * cli: add jsonc support for .backtracejsrc * cli: add alternate path for package.json --------- Co-authored-by: Sebastian Alex <[email protected]> * Remove deduplication configuration * node: add node diagnostics fatal error crash storage (#65) * sdk core: add option of adding stackframes to BacktraceReport * sdk-core: option of overriding timestamp and classifiers in BacktraceReport * sdks: add initialize method in all sdks * node: add node diagnostic reports support * node: add more information to node diagnostic report * node: move NodeDiagnosticReportRecord funcionality to NodeDiagnosticReportConverter, change error.type to Crash * node: loading and capturing of node diagnostic reports * node: use process.report.directory if available * chore: fix unit tests * sdk-core, node: add captureNativeCrashes option to database and use it in node --------- Co-authored-by: Sebastian Alex <[email protected]> * node example: add OOM crash example (#66) * sdk core: add option of adding stackframes to BacktraceReport * sdk-core: option of overriding timestamp and classifiers in BacktraceReport * sdks: add initialize method in all sdks * node: add node diagnostic reports support * node: add more information to node diagnostic report * node: move NodeDiagnosticReportRecord funcionality to NodeDiagnosticReportConverter, change error.type to Crash * node: loading and capturing of node diagnostic reports * node: use process.report.directory if available * chore: fix unit tests * sdk-core, node: add captureNativeCrashes option to database and use it in node * node sdk example: change options to an array * node sdk example: add oom example * node example: move OOM option below promise rejection --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: add subdomain and token options to upload (#68) Co-authored-by: Sebastian Alex <[email protected]> * Database send operations (#70) * Release setup (#71) * Release setup * Use prepublishOnly instead of prepare to avoid potential npm install issues * Include CLI basic configuration * cli: add README.md (#69) * cli: add README.md --------- Co-authored-by: Sebastian Alex <[email protected]> * Doc start (#60) * Initial documentation --------- Co-authored-by: Ian Rice <[email protected]> Co-authored-by: Rick Foster <[email protected]> * Properly making @backtrace/browser a dependency (#72) * Properly making @backtrace/browser and @backtrace/sdk-core dependencies * Removing dependency on @backtrace/sdk-core --------- Co-authored-by: Adam Cronin <[email protected]> * Include OOM/native crash handler in the demo project * Fix possible circular reference in the annotation object (#75) * Fix possible circular reference in the annotation object * Fixed prettier code style * Prettier formatting * Handle reference to the jsonEscaper function * Provide more detailed error-data information in the report object (#76) * Backtrace report unhandled error/crash overrides (#77) * Provide more detailed error-data information in the report object * Backtrace report unhandled error/crash overrides * Browser UnhandledPromiseRejection classifier * Add classifiers to the beginning of the array and merge existing classifiers with the old ones * BacktraceReport changes + undo previous commit * Allow to use only one client via user-friendly API (#78) * Allow to use only one client via user-friendly API * initialize documentation --------- Co-authored-by: kdysput <[email protected]> * Lazy load debug ids (#80) Co-authored-by: kdysput <[email protected]> * Release files (#79) Co-authored-by: kdysput <[email protected]> * Package export (#81) * Package export * instruct packages to not use old fake timers package * instruct packages to not use old fake timers package --------- Co-authored-by: kdysput <[email protected]> * Breadcrumb interceptor (#82) Co-authored-by: kdysput <[email protected]> * Feature/react redux middleware (#74) * Adding a backtrace middleware for redux that saves a breadcrumb when an action is dispatched * Adding tests * Updating redux imports to just import the type * Removing test for breadcrumbs when disabled. The updates to allow for one client breaks it and I don't really need to test it here. * Disabling unused variable linting errors --------- Co-authored-by: Adam Cronin <[email protected]> * Feature/browser readme (#84) * Changing client init to use initialize() instead of builder().build() * Fixing typos * Adding info for Breadcrumbs * Adding Metrics details * Updating BacktraceClientOptions (and removing database stuff as it shouldn't be relevant for browser * Updating Table of Contents, and adding Sending an Error details * Adding link to Sauce source maps docs and updating ToC * Fit 'n finish --------- Co-authored-by: Adam Cronin <[email protected]> Co-authored-by: Rick Foster <[email protected]> Co-authored-by: Rick Foster <[email protected]> * Feature/redux example (#83) * Adding a redux example * Updating package-lock.json --------- Co-authored-by: Adam Cronin <[email protected]> * Adding react README.md (#86) * Adding react README.md * Moving Error Boundary section above source maps section --------- Co-authored-by: Adam Cronin <[email protected]> * Default true promise rejection * Browser (#87) * Added note to install package * Add direction to install packgage in react --------- Co-authored-by: Rick Foster <[email protected]> * Fallback to default log function if the util function is not available (#89) * Detect missing information about the agent and fallback to the default (#88) * Scope rename (#90) * Scope rename * Removed npmrc * Invoke directly the console method to not generate an error in our code * Source map tools README (#92) * SDK Core README (#91) * SDK Core README * Document format * Update packages/sdk-core/README.md * Backtrace node readme (#93) * Backtrace node readme * Fit 'n finish on node readme (#96) * Fit 'n finish on node readme * Modify enabled option to enable * Fix tests --------- Co-authored-by: Konrad Dysput <[email protected]> --------- Co-authored-by: Rick Foster <[email protected]> * Add webpack readme * Add rollup, vite readmes. Fix instructions for url * Updating target in base tsconfig to be es2015 (#98) Co-authored-by: Adam Cronin <[email protected]> * Builder Api improvements (#95) * Builder Api improvements * Export single session provider * initialize in the constructor - allow builder to also initialize * Make the initialize method private * Use database enable * Client dispose (#94) * Backtrace node readme * Client dispose * Client dispose * Do not send reports via disposed client * Close metrics * Rename close to dispose * Squashed commit of the following: commit a6408e44cccbe0a4a5182ac3cd4b6a7b3f8092f6 Merge: 2ab4feb 184ab33 Author: Rick Foster <[email protected]> Date: Fri Aug 25 11:29:43 2023 -0700 Merge pull request #97 from backtrace-labs/rick/sourcemap-readmes Add webpack readme commit 184ab33b74bed028a0177f746085f5a3967004f0 Author: Rick Foster <[email protected]> Date: Fri Aug 25 11:22:34 2023 -0700 Add rollup, vite readmes. Fix instructions for url commit 3c392f3781756bb82ab39c9ff39c6ee23b08214a Author: Rick Foster <[email protected]> Date: Fri Aug 25 11:01:19 2023 -0700 Add webpack readme commit 2ab4febb33c2ea070d6d9d2df26b5dc96122b455 Author: Konrad Dysput <[email protected]> Date: Fri Aug 25 19:44:22 2023 +0200 Backtrace node readme (#93) * Backtrace node readme * Fit 'n finish on node readme (#96) * Fit 'n finish on node readme * Modify enabled option to enable * Fix tests --------- Co-authored-by: Konrad Dysput <[email protected]> --------- Co-authored-by: Rick Foster <[email protected]> commit 41fb8fc89c686570abbae43714889fcedcab33ac Author: Konrad Dysput <[email protected]> Date: Fri Aug 25 19:15:04 2023 +0200 SDK Core README (#91) * SDK Core README * Document format * Update packages/sdk-core/README.md commit ea111f199d62ca9ee434d81e2e5cb27cb8f8bacb Author: Konrad Dysput <[email protected]> Date: Fri Aug 25 17:11:29 2023 +0200 Source map tools README (#92) commit 6e9659d04b4a6d7fe9a8d20cbae6142f3032cf91 Author: Konrad Dysput <[email protected]> Date: Fri Aug 25 14:59:50 2023 +0200 Invoke directly the console method to not generate an error in our code * Enable in the end * Drop the instance on dispose * Client docs update (#100) * Bin starting path (#99) * Bin starting path * Refactor code - do not check if the path is nullable * Allow to define process envs via parameter * Browser - simplify the Form data usage, export BacktraceBrowserRequestHandler, fix the issue with ignoring jsonEscape in the formatter function * Do not pass formdata content-type * SDK-core: Version update 0.0.2 * Update SDK-Core package-lock.json * Update SDK-Core package-lock.json * NodeJS version update (#103) * Browser update 0.0.2 (#104) * React update 0.0.2 (#105) * cli: do not filter out direct glob paths (#101) Co-authored-by: Sebastian Alex <[email protected]> * cli: fix sourcemap upload issues (#102) * cli: replace ZipArchive archiver implementation with tar-stream and zlib * sourcemap tools: refactor archiving to allow for piping before adding assets * cli: refactor cli to pipe before adding assets in upload * rollup, vite, webpack: use new logging method * sourcemap-tools: fix ZipArchive tests * sourcemap tools: remove unused function * sourcemap tools, cli: minor PR changes --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: fix skipping stack frame with message reports (#106) * sdk-core: always skip first line in stack in V8 * sdk-core: make send not an async function --------- Co-authored-by: Sebastian Alex <[email protected]> * add deferred user attributes (#110) * sdk-core: add deferred user attributes * sdk-core: fix attribute provider order in case of static and dynamic providers * sdk-core: move AttributeManager to BacktraceDataGenerator * browser: fix UserIdentifierAttributeProvider to not reference user attributes * node: fix ApplicationInformationAttributeProvider to not reference user attributes * sdk-core: add option of adding deferred attributes via addAttribute * sdk-core: PR suggestions * docs: add userAttributes and addAttribute deferred docs --------- Co-authored-by: Sebastian Alex <[email protected]> * Missing library name (#111) * Detect unexpected message type and convert it to string (#112) * Handle non error, but object error message * Handle non error, but object error message * Error test case * Test case with overriden error message * SDK-core 0.0.3 release (#114) * SDK-core 0.0.3 release * package-lock refresh * browser: version 0.0.3, add dependency for sdk-core package (#108) * add examples packages as workspaces, remove package-lock.json from browser example * browser: version 0.0.3, add dependency for sdk-core package * Browser update * Bring back package-lock.json --------- Co-authored-by: Sebastian Alex <[email protected]> Co-authored-by: Konrad Dysput <[email protected]> * react: version 0.0.3 (#109) * add examples packages as workspaces, remove package-lock.json from browser example * browser: version 0.0.3, add dependency for sdk-core package * react: externalize react * react: version 0.0.3, include browser dependency * Clean up packagejson * package-lock.json update --------- Co-authored-by: Sebastian Alex <[email protected]> Co-authored-by: Konrad Dysput <[email protected]> * Node: Version 0.0.3 (#115) * Feature/error boundary fallback function (#116) * Updating the ErrorBoundary to make the error available to the fallback component * Updating example app to utilize the error in the fallback component --------- Co-authored-by: Adam Cronin <[email protected]> * cli: add `run` command executing everything in one go (#117) * cli: removes 'this' from execute function * cli: consolidate execute args into context * cli: extract command functions to separate functions * cli: cache loaded options in memory * cli: add logger to CommandContext, allow for returning other type than number in execute * sourcemap tools: add getting source map path function to SourceProcessor * cli: add logger prefix option * cli: change subcommand functions to not print output by themselves * cli: add run command which executes everything * cli: add more information to upload info, change order of command execution * cli: fix pass-with-no-files taking files inside cwd * cli: update README with run * cli: fix run not taking path from config * cli: fix resolution of paths relative to config --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: add possibility of specifying source files for upload and add-sources (#118) Co-authored-by: Sebastian Alex <[email protected]> * Source map tools 0.0.2 (#120) * Source map tools 0.0.2 * Release: CLI 0.0.2 (#121) * Release: CLI 0.0.2 * fix sourcemap-tools dependeny in plugins * fix sourcemap-tools tar-stream dependency --------- Co-authored-by: Sebastian Alex <[email protected]> --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: fix missing sourcesContent after addSources * Source map 0.0.3 release (#122) * sourcemap tools: fix sourcemap invalid sourcesContent and shebang offset (#123) * sourcemap tools: fix offset sourcemap sourcesContent and shebang offsetting * sourcemap tools: move source-map package to dev dependencies * sourcemap tools: add unit test for checking if offsetSourceMap changes only mappings --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: add asset error behavior (#124) * sourcemap tools: fix offset sourcemap sourcesContent and shebang offsetting * sourcemap tools: move source-map package to dev dependencies * sourcemap tools: add unit test for checking if offsetSourceMap changes only mappings * cli: add errorBehavior helpers * sourcemap tools: change errorm essage for getSourceMapPathFromSource * cli: add fatal log level * cli: add errorBehavior to add-sources * cli: add errorBehavior to process * cli: add errorBehavior to upload * cli: add errorBehavior to run * cli: fix loading asset-error-behavior from config file * cli: rename FailedElement to BehaviorSkippedElement * cli: update asset-error-behavior options --------- Co-authored-by: Sebastian Alex <[email protected]> * Fixing typo (#126) Co-authored-by: Adam Cronin <[email protected]> * Combining the error and string overloads in BacktraceCoreClient.send() (#127) Co-authored-by: Adam Cronin <[email protected]> * Updating version in sourcemap-tol and updating monorepo package-lock.… (#128) * Updating version in sourcemap-tol and updating monorepo package-lock.json * Updating package-lock.json --------- Co-authored-by: Adam Cronin <[email protected]> * Updating tools/cli (#129) * Updating version in sourcemap-tol and updating monorepo package-lock.json * Updating package-lock.json * Updating tools/cli --------- Co-authored-by: Adam Cronin <[email protected]> * cli: add integration tests for commands (#125) * cli: add jest and test files * cli: add test helpers * cli: add add-sources tests * cli: add process tests * cli: add upload tests, fix issues with errors * cli: move run execute to separate function * cli: add run tests --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: optimization of `run` and simplification of code (#130) * sourcemap tools: add flow and pipe * sourcemap tools: change FileFinder to not return a Result * sourcemap tools: add filterAsync and not common functions * cli: add include and exclude functionality into commands * sourcemap tools: remove AsyncResult, add Result functions * sourcemap tools: add createUploadRequest to SymbolUpload * cli: refactor to use pipe/flow and reduce file loads * cli: print asset info before processing * cli: use trace for include/exclude --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: remove duplicate debugIds before uploading (#131) Co-authored-by: Sebastian Alex <[email protected]> * cli: add finding sourcemap by {filename.js}.map (#132) Co-authored-by: Sebastian Alex <[email protected]> * CLI Release (#137) * cli: fix unit tests (#138) * cli: disable output messages in logger when silent is enabled * cli: add missing await in mockOptions * sourcemap tools: change error embedding in messages in common --------- Co-authored-by: Sebastian Alex <[email protected]> * Adding sourcemap support to react example (#133) Co-authored-by: Adam Cronin <[email protected]> * Single client instance (#134) * Native Submission URLs (#136) * Native Submission URLs * Fix plcrashreporter submission url and modify submit url based on the expected format position * Use split to recognize valid path * Unit test * Allow Backtrace client to use core client attributes for any use cases (#139) * Single client instance * Allow Backtrace client to use core client attributes for any use cases * Feature/attachment management (#140) * Single client instance * Attachment management * Extended attachment support * Return readonly attachment type * Tests fix * Expose parsers from react client * Sdk-Core release 0.0.4 (#141) * Browser release 0.0.4 (#142) * Sdk-Core release 0.0.4 * Browser release 0.0.4 * Node release 0.0.4 (#143) * React release 0.0.4 (#144) * Landing page readme * Update image to support light and dark modes. * Set max header image width. * add events and modules to core client (#146) * sdk-core: add Events class, a simple event emitter * sdk-core: add reportEvents, move database, metrics, breadcrumbs to modules with event usage * sdk-core, node, browser, react: move initialize out of the constructor * sdk-core: add bind method to BacktraceModule, move initialization logic with client there * sdk-core: PR suggestions * sdk-core, node, browser, react: remove returning "this" from initialize * sdk-core: find record via uuid * sdk-core: add BacktraceModuleBindData to expose protected stuff to modules --------- Co-authored-by: Sebastian Alex <[email protected]> * node build and node example improvements (#148) * node: change webpack to not include sources in sourcemaps and to point to actual sources * node example: add breadcrumb option * node example: fix database ignore * node example: add @backtrace-labs/node dependency from file --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: various fixes (#149) * cli: bring back subdomain and token options * cli: display process and add-sources messages only if enabled * cli: fix loading config for subcommands * cli: update README * cli: fix dry-run for upload in run * cli: use uploadOptions for pass-with-no-files for upload in run * cli: add note about subdomain not working on on-premise --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core, node: add file system abstractions (#147) * sdk-core, node: add BacktraceFileAttachment interface to sdk-core * sdk-core, node: add FileSystem and node implementation * sdk-core, node: move database file storage to core, with usage of FileSystem * node: fix crash on loadNodeCrashes without database directory * sdk-core, node: move fileSystem to builder * sdk-core: remove database provider from CoreClientSetup * sdk-core: fix database tests --------- Co-authored-by: Sebastian Alex <[email protected]> * BT-700 Added feature descriptions and light/dark images. * Copy edit * Update header image light/dark display * node: breadcrumbs from previous session in database (#150) * sdk-core: add getAttachments from BreadcrumbStorage, move initialization to BreadcrumbsManager * sdk-core: add SessionFiles * node: add FileBreadcrumbsStorage with AlternatingFileWriter * sdk-core: export Breacrumb type and TimeHelper * sdk-core: make generateSubmissionData protected * node: load breadcrumbs from previous session with native crashes * sdk-core: add session locking to database * sdk-core: add limit of maximum previous locked sessions * node: add sessionId to loaded native crashes * sdk-core: add SessionFiles tests, remove clearSession without marker * sdk-core: add maximumOldSessions option to database configuration * sdk-core: unlock sessions in database on remove * node: add _testOutput to .gitignore * sdk-core: fix breadcrumbs manager tests * node: fix _testOutput dir not creating in tests * sdk-core, node: PR changes * sdk-core: dont filter sessionMarkers if currentSessionMarker is undefined * sdk-core: remove addAttributeProvider from client * sdk-core: fix unit tests --------- Co-authored-by: Sebastian Alex <[email protected]> * node: attributes from previous session in native crashes (#152) * sdk-core: add AttributeEvents to AttributeManager * sdk-core: make initialize method in module optional, add AttributeManager to module bind, add addModule method * sdk-core: add FileAttributeManager * node: use FileAttributeManager for native crashes * node example: add random attribute option to showcase attributes from previous session * sdk-core: PR changes in FileAttributeManager --------- Co-authored-by: Sebastian Alex <[email protected]> * Error event callback if the error object is not available (#154) * Do not use unsupported URL API in the react-native API (#153) * add NestJS library for handling NestJS errors (#151) * nestjs: add initial package code * nestjs: add nestjs package as peerDependency * nestjs: add packages required for unit tests * nestjs: change tsconfig of webpack build * nestjs: add Backtrace interceptor for errors * node: export BacktraceClientBuilder * nestjs: add BacktraceModule * nestjs: add additional attributes to intercepted errors * sdk-core: add use static method for global clients, fix builder returning this * nestjs: use global instance in BacktraceInterceptor * nestjs: add jsdocs * nestjs: add e2e tests * nestjs: add default options to BacktraceInterceptor * nestjs: add README * set explicit workspace order for building * nestjs: change Nest.JS to NestJS * nestjs: update tsconfig.json * nestjs: change module to use global or passed client * nestjs: update README * sdk-core: remove use function * nestjs: add express attributes to http interceptor * nestjs: add buildAttributes function to interceptor options --------- Co-authored-by: Sebastian Alex <[email protected]> * Bigint serialization * SDK-Core version bump to 0.0.5 (#156) * SDK-Core version bump to 0.0.5 * Updating package-lock * Including node --------- Co-authored-by: Adam Cronin <[email protected]> * Adding jsonEscaper to JSON.stringify() and not assuming action exists (#157) * SDK-Core version bump to 0.0.5 * Updating package-lock * Including node * Adding jsonEscaper to JSON.stringify() and not assuming action exists --------- Co-authored-by: Adam Cronin <[email protected]> * Browser release 0.0.5 (#158) * SDK-Core version bump to 0.0.5 * Updating package-lock * Including node * Adding jsonEscaper to JSON.stringify() and not assuming action exists * Browser release 0.0.5 --------- Co-authored-by: Adam Cronin <[email protected]> * React release 0.0.5 (#159) * SDK-Core version bump to 0.0.5 * Updating package-lock * Including node * Adding jsonEscaper to JSON.stringify() and not assuming action exists * Browser release 0.0.5 * React release 0.0.5 --------- Co-authored-by: Adam Cronin <[email protected]> * Adding real dependencies to example apps (#160) * SDK-Core version bump to 0.0.5 * Updating package-lock * Including node * Adding jsonEscaper to JSON.stringify() and not assuming action exists * Browser release 0.0.5 * React release 0.0.5 * Adding real dependencies to example apps --------- Co-authored-by: Adam Cronin <[email protected]> * React native support (#119) React native support * Feature/react native demo (#155) * React native support * React native support * react-native: externalize react packages * react: externalize react package * browser: fix invalid type in XMLHttpRequest open override * React backtrace client * React-native library * Repair package-lock and remove unnecessary packages * React native demo * React native debugging task * Builder Api improvements * Export single session provider * React native react integration via builder * Path to the react library * Path to the react library * Dev updates * React demo * React example app * React native api improvements * Do not use multipart content type * Dependency update * update package-lock * Update package-lock.json * Basic attributes * Update demo with symlinks * Native attributes Android * Clean up the branch * Squashed commit of the following: commit 9d76c4741b4c9a3d41dfcb78b65aec0151725783 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 18:01:30 2023 +0200 Source map 0.0.3 release (#122) commit c5b6dbd61bcc0be9af78971986a0f9909de18e2a Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 15:55:04 2023 +0000 cli: fix missing sourcesContent after addSources commit f39a3cfde6217dcdddf12bd49f16b51442aa77c8 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 17:03:35 2023 +0200 Source map tools 0.0.2 (#120) * Source map tools 0.0.2 * Release: CLI 0.0.2 (#121) * Release: CLI 0.0.2 * fix sourcemap-tools dependeny in plugins * fix sourcemap-tools tar-stream dependency --------- Co-authored-by: Sebastian Alex <[email protected]> --------- Co-authored-by: Sebastian Alex <[email protected]> commit 87803544e3e475f1573cbea16e9a6120c006496e Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 11:17:39 2023 +0200 cli: add possibility of specifying source files for upload and add-sources (#118) Co-authored-by: Sebastian Alex <[email protected]> commit 5327496f108edb485669992c78d5c68d29acb9dd Author: Sebastian Alex <[email protected]> Date: Fri Sep 1 21:47:08 2023 +0200 cli: add `run` command executing everything in one go (#117) * cli: removes 'this' from execute function * cli: consolidate execute args into context * cli: extract command functions to separate functions * cli: cache loaded options in memory * cli: add logger to CommandContext, allow for returning other type than number in execute * sourcemap tools: add getting source map path function to SourceProcessor * cli: add logger prefix option * cli: change subcommand functions to not print output by themselves * cli: add run command which executes everything * cli: add more information to upload info, change order of command execution * cli: fix pass-with-no-files taking files inside cwd * cli: update README with run * cli: fix run not taking path from config * cli: fix resolution of paths relative to config --------- Co-authored-by: Sebastian Alex <[email protected]> commit aeb482e3715f7ad1db2dcbd01fec253072827adb Author: adamcronin42 <[email protected]> Date: Fri Sep 1 11:19:35 2023 -0400 Feature/error boundary fallback function (#116) * Updating the ErrorBoundary to make the error available to the fallback component * Updating example app to utilize the error in the fallback component --------- Co-authored-by: Adam Cronin <[email protected]> * Android attribute provider and unhandled error handler * Add missing import * Do not use symlinks for demo experiments * Start using hermes for unhandled promise rejections * Error boundary adjustements to reuse the code in react-native * iOS Attribute providers * Updated metro and use experimental linking * NatiVe attributes support + crash support on iOS * Update * Remove prepare command and use workspace definition to define the package build order * Use code from dev * Use code from dev * update package-lock.json * Demo update * Library update * Use submission URL from Backtrace client * Do not use async/await in the unhandled exception hanler * Remove redundant type * Adjust unhandled exception handler code * Disable database operations * Re-indent file * Re-indent file * database file attachments * Adjust hermes types + unhandled promise rejection types * Use cached pretty formatter * Adjust the demo project - remove testing files/code * Fixed formatting issue * Use actions in all platforms * Changed console log message --------- Co-authored-by: Sebastian Alex <[email protected]> * BT-720 Initial draft * BT-720: Clean up some wording * add methods to BacktraceBreadcrumbs interface and limit BacktraceManager visibility (#162) * sdk-core, browser: change BreadcrumbsEventSubscriber start to accept BacktraceBreadcrumbs * sdk-core: add addEventSubscriber to BacktraceBreadcrumbs * sdk-core: enable BreadcrumbsManager after initialize * sdk-core: fix unit tests * sdk-core: rename breadcrumbsManager variables to backtraceBreadcrumbs --------- Co-authored-by: Sebastian Alex <[email protected]> * Update packages/browser/README.md Co-authored-by: Konrad Dysput <[email protected]> * Update packages/browser/README.md Co-authored-by: Konrad Dysput <[email protected]> * Add breadcrumb attribute to the file (#165) * sync versions script (#163) * add ts-node package for Typescript scripts * scripts: add syncVersions script * syncVersions: fix lint errors --------- Co-authored-by: Sebastian Alex <[email protected]> * node: Remove overflowed records on the database startup and replace foreach with for to iterate over all records rather than jump between them (#167) * node: Remove overflowed records on the database startup and replace foreach with for to iterate over all records rather than jump between them * Use database remove method instead of direcrly using storage provider * Use foreach instead of for * Use single remove method * sdk-core, browser, node, react, react-native: builder changes (#173) * sdk-core: change builder to accept only CoreClientSetup in the constructor, remove build method * browser: update to work with sdk-core changes * node: update to work with sdk-core changes * react: update to work with sdk-core and browser changes * react-native: update to work with sdk-core and react changes * node: change builder method options interface type * node: change options interface in initialize function * react-native: bring back missing attribute providers --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: version 0.0.6 (#168) Co-authored-by: Sebastian Alex <[email protected]> * node: version 0.0.5 (#169) Co-authored-by: Sebastian Alex <[email protected]> * nestjs: version 0.0.1 (#171) * nestjs: version 0.0.1 --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: remove const from Events for tsc <5 compatibility (#175) Co-authored-by: Sebastian Alex <[email protected]> * cli: test and upload improvements (#179) * cli: move stripping content out of uploading * cli: (hopefully) fix random upload test failures * sourcemap tools: fix tests --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: version 0.0.7 (#181) Co-authored-by: Sebastian Alex <[email protected]> * browser, node, react, react-native: update sdk-core dependency * node: version 0.0.6 (#183) Co-authored-by: Sebastian Alex <[email protected]> * nestjs: update node dependency to 0.0.6 * BT-734: React native readme * react-native: android database support (#164) * React native support * React native support * react-native: externalize react packages * react: externalize react package * browser: fix invalid type in XMLHttpRequest open override * React backtrace client * React-native library * Repair package-lock and remove unnecessary packages * React native demo * React native debugging task * Builder Api improvements * Export single session provider * React native react integration via builder * Path to the react library * Path to the react library * Dev updates * React demo * React example app * React native api improvements * Do not use multipart content type * Dependency update * update package-lock * Update package-lock.json * Basic attributes * Update demo with symlinks * Native attributes Android * Clean up the branch * Squashed commit of the following: commit 9d76c4741b4c9a3d41dfcb78b65aec0151725783 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 18:01:30 2023 +0200 Source map 0.0.3 release (#122) commit c5b6dbd61bcc0be9af78971986a0f9909de18e2a Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 15:55:04 2023 +0000 cli: fix missing sourcesContent after addSources commit f39a3cfde6217dcdddf12bd49f16b51442aa77c8 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 17:03:35 2023 +0200 Source map tools 0.0.2 (#120) * Source map tools 0.0.2 * Release: CLI 0.0.2 (#121) * Release: CLI 0.0.2 * fix sourcemap-tools dependeny in plugins * fix sourcemap-tools tar-stream dependency --------- Co-authored-by: Sebastian Alex <[email protected]> --------- Co-authored-by: Sebastian Alex <[email protected]> commit 87803544e3e475f1573cbea16e9a6120c006496e Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 11:17:39 2023 +0200 cli: add possibility of specifying source files for upload and add-sources (#118) Co-authored-by: Sebastian Alex <[email protected]> commit 5327496f108edb485669992c78d5c68d29acb9dd Author: Sebastian Alex <[email protected]> Date: Fri Sep 1 21:47:08 2023 +0200 cli: add `run` command executing everything in one go (#117) * cli: removes 'this' from execute function * cli: consolidate execute args into context * cli: extract command functions to separate functions * cli: cache loaded options in memory * cli: add logger to CommandContext, allow for returning other type than number in execute * sourcemap tools: add getting source map path function to SourceProcessor * cli: add logger prefix option * cli: change subcommand functions to not print output by themselves * cli: add run command which executes everything * cli: add more information to upload info, change order of command execution * cli: fix pass-with-no-files taking files inside cwd * cli: update README with run * cli: fix run not taking path from config * cli: fix resolution of paths relative to config --------- Co-authored-by: Sebastian Alex <[email protected]> commit aeb482e3715f7ad1db2dcbd01fec253072827adb Author: adamcronin42 <[email protected]> Date: Fri Sep 1 11:19:35 2023 -0400 Feature/error boundary fallback function (#116) * Updating the ErrorBoundary to make the error available to the fallback component * Updating example app to utilize the error in the fallback component --------- Co-authored-by: Adam Cronin <[email protected]> * Android attribute provider and unhandled error handler * Add missing import * Do not use symlinks for demo experiments * Start using hermes for unhandled promise rejections * Error boundary adjustements to reuse the code in react-native * iOS Attribute providers * Updated metro and use experimental linking * NatiVe attributes support + crash support on iOS * Update * Remove prepare command and use workspace definition to define the package build order * Use code from dev * Use code from dev * update package-lock.json * Demo update * Library update * Use submission URL from Backtrace client * Do not use async/await in the unhandled exception hanler * Remove redundant type * Adjust unhandled exception handler code * Disable database operations * Re-indent file * Re-indent file * database file attachments * Adjust hermes types + unhandled promise rejection types * Use cached pretty formatter * Adjust the demo project - remove testing files/code * Fixed formatting issue * Use actions in all platforms * Changed console log message * Basic database operations support * Android error message * Remove new line * Max breadcrumb per file passed to the native * Adjust native methods. Return undefined instead of null from the file attachment implementation * Use UTF8 Output stream writer * Format file and remove inavlid comment * Stream writer * type annotation * Add a reason why writer failed * Export types --------- Co-authored-by: Sebastian Alex <[email protected]> * react-native: Native database ios (#178) * React native support * React native support * react-native: externalize react packages * react: externalize react package * browser: fix invalid type in XMLHttpRequest open override * React backtrace client * React-native library * Repair package-lock and remove unnecessary packages * React native demo * React native debugging task * Builder Api improvements * Export single session provider * React native react integration via builder * Path to the react library * Path to the react library * Dev updates * React demo * React example app * React native api improvements * Do not use multipart content type * Dependency update * update package-lock * Update package-lock.json * Basic attributes * Update demo with symlinks * Native attributes Android * Clean up the branch * Squashed commit of the following: commit 9d76c4741b4c9a3d41dfcb78b65aec0151725783 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 18:01:30 2023 +0200 Source map 0.0.3 release (#122) commit c5b6dbd61bcc0be9af78971986a0f9909de18e2a Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 15:55:04 2023 +0000 cli: fix missing sourcesContent after addSources commit f39a3cfde6217dcdddf12bd49f16b51442aa77c8 Author: Konrad Dysput <[email protected]> Date: Mon Sep 4 17:03:35 2023 +0200 Source map tools 0.0.2 (#120) * Source map tools 0.0.2 * Release: CLI 0.0.2 (#121) * Release: CLI 0.0.2 * fix sourcemap-tools dependeny in plugins * fix sourcemap-tools tar-stream dependency --------- Co-authored-by: Sebastian Alex <[email protected]> --------- Co-authored-by: Sebastian Alex <[email protected]> commit 87803544e3e475f1573cbea16e9a6120c006496e Author: Sebastian Alex <[email protected]> Date: Mon Sep 4 11:17:39 2023 +0200 cli: add possibility of specifying source files for upload and add-sources (#118) Co-authored-by: Sebastian Alex <[email protected]> commit 5327496f108edb485669992c78d5c68d29acb9dd Author: Sebastian Alex <[email protected]> Date: Fri Sep 1 21:47:08 2023 +0200 cli: add `run` command executing everything in one go (#117) * cli: removes 'this' from execute function * cli: consolidate execute args into context * cli: extract command functions to separate functions * cli: cache loaded options in memory * cli: add logger to CommandContext, allow for returning other type than number in execute * sourcemap tools: add getting source map path function to SourceProcessor * cli: add logger prefix option * cli: change subcommand functions to not print output by themselves * cli: add run command which executes everything * cli: add more information to upload info, change order of command execution * cli: fix pass-with-no-files taking files inside cwd * cli: update README with run * cli: fix run not taking path from config * cli: fix resolution of paths relative to config --------- Co-authored-by: Sebastian Alex <[email protected]> commit aeb482e3715f7ad1db2dcbd01fec253072827adb Author: adamcronin42 <[email protected]> Date: Fri Sep 1 11:19:35 2023 -0400 Feature/error boundary fallback function (#116) * Updating the ErrorBoundary to make the error available to the fallback component * Updating example app to utilize the error in the fallback component --------- Co-authored-by: Adam Cronin <[email protected]> * Android attribute provider and unhandled error handler * Add missing import * Do not use symlinks for demo experiments * Start using hermes for unhandled promise rejections * Error boundary adjustements to reuse the code in react-native * iOS Attribute providers * Updated metro and use experimental linking * NatiVe attributes support + crash support on iOS * Update * Remove prepare command and use workspace definition to define the package build order * Use code from dev * Use code from dev * update package-lock.json * Demo update * Library update * Use submission URL from Backtrace client * Do not use async/await in the unhandled exception hanler * Remove redundant type * Adjust unhandled exception handler code * Disable database operations * Re-indent file * Re-indent file * database file attachments * Adjust hermes types + unhandled promise rejection types * Use cached pretty formatter * Adjust the demo project - remove testing files/code * Fixed formatting issue * Use actions in all platforms * Changed console log message * Basic database operations support * Android error message * Remove new line * Max breadcrumb per file passed to the native * Adjust native methods. Return undefined instead of null from the file attachment implementation * Use UTF8 Output stream writer * Format file and remove inavlid comment * Update lock files * React native iOS native layer * Stream writer * type annotation * iOS native database support * remove development team reference * Add log to each error case * Handle potential issues with breadcrumbs stream recreation * initialize client in builder before returning it --------- Co-authored-by: Sebastian Alex <[email protected]> * clI: search sourcemaps in directory specified by sourceMappingURL (#174) * cli: add searching sourcemaps by directory in sourceMappingURL * cli: add tests for searching sourcemaps by directory in sourceMappingURL --------- Co-authored-by: Sebastian Alex <[email protected]> Co-authored-by: Konrad Dysput <[email protected]> * Bt 720 web sdk readme remove bt client methods (#180) * BT-720 Propogate browser changes to other readmes * Removed BacktraceDatabase Methods * Updated React Natice md. Processed PR comments. * Copy edit * Clarifying attachment details for React Native * react, browser: add changelogs (#172) Co-authored-by: Sebastian Alex <[email protected]> * electron: SDK for Electron (#176) * sdk-core: expose reportSubmission and requestHandler to BacktraceModule and builder * sdk-core: enable adding modules to built client * sdk-core: add useBreadcrumbsStorage to core builder * sdk-core: add metric queues to builder * sdk-core: add options to BacktraceModuleBindData * node: export BacktraceClientSetup * electron: initial package * electron: add main, preload, and renderer entries * electron: add IpcTransports * electron: add preload script which adds BACKTRACE_IPC to renderer * electron: add IpcHandshake * electron: add ipc streams from renderer to main * electron: add IpcRpcs * electron: add sending reports from renderer via main * electron: add support for streaming attachments from renderer to main * electron: push renderer breadcrumbs to main breadcrumbs * electron: add additional electron attributes to renderer errors * electron: add prefix to IpcEvents to make them less ambiguous * electron: support versions from 12 - 26 * electron: add metrics adding and sending via main from renderer * electron: add sync RPC * electron: remove window from ElectronWindowModule, move it to BacktraceMainElectronModule * electron: add sessionId synchronization * electron: add BacktraceClient based on Node * electron: add crashReporter support * electron: add ping to renderer client * electron: update dependency versions * electron: fix lint issues * sdk-core: fix unit tests * electron: add --passWithNoTests to jest * electron: fix lint warnings * electron: remove console.log from addBacktraceElectron * electron: add app anme and version attributes to main * electron: add additional attribute providers * update package-lock.json * electron: limit exports and fix build errors * electron: output to main/renderer/common instead of lib for easier imports --------- Co-authored-by: Sebastian Alex <[email protected]> * electron example: add an example for using Electron SDK (#177) * electron example: add initial project * electron example: add simple error reporting to Backtrace from renderer * electron example: remove redux, add main/renderer examples * electron example: add vscode launch configuration * electron example: add crashing app in main * electron example: update imports for electron sdk * electron example: restore example submission URL --------- Co-authored-by: Sebastian Alex <[email protected]> * react-native: Add support for unhandled exception handler on Android (#184) * Fixed dependencies * electron: add output dirs to .prettierignore (NFC) * electron example: fix preload import * BT-733: Library rename backtrace-labs -> backtrace (#186) * electron: add docs and README (#185) * electron: throw error when preload data is not detected * electron: add docs and README * electron: replace @backtrace-labs with @backtrace * electron: add default value to AddBacktraceElectronOptions docs * electron: fix format issues * electron: readme changes * electron: readme changes --------- Co-authored-by: Sebastian Alex <[email protected]> * electron: add additional attributes to main crashes (#188) * electron: add window attributes * elecron: add annotations from all windows * electron: add net and screen attribute providers * electron: shorten and remove some attributes * electron: add main attributes to renderer reports * electron: fix resolving destroyed window attributes --------- Co-authored-by: Sebastian Alex <[email protected]> * scripts: add scripts for making releases (#182) * scripts: add semver * scripts: add ES2019 to ts-node scripts * scripts: add git release script * scripts: add npm release script * scripts: add readme * scripts: PR changes --------- Co-authored-by: Sebastian Alex <[email protected]> * electron: add breadcrumbs (#189) * electron: add window breadcrumbs * electron: add webcontents breadcrumbs * electron: fix breadcrumbs crashing on closing window * electron: change log levels of window breadcrumbs --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core, browser, node: add abort support to metrics and request handlers (#187) * sdk-core: add polyfill for AbortController for node 14 * sdk-core: add AbortError in DelayHelper * sdk-core: add abort support to metrics * sdk-core: export anySignal function * browser: add external signal support to request handler * node: add external signal support to request handler * sdk-core: fix lint issues * sdk-core: update AbortController polyfill and add tests * sdk-core: PR changes * sdk-core: fix unit tests * sdk-core: fix aborts on Node 14 * electron: fix more node 14 unit test errors --------- Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: fix global is undeifned error * node: fix missing FileSystem from node * cli: fix include-sources flag in run * scripts: replace @backtrace-labs with @backtrace * scripts: add simple --name switch to release scripts * scripts: fix package name without --name passed * cli: version 0.2.1 (#192) * cli: version 0.2.1 * cli: fix run invalid command switches --------- Co-authored-by: Sebastian Alex <[email protected]> * scripts: fix invalid positional arguments when arg=value is passed * node: version 0.1.1 (#193) Co-authored-by: Sebastian Alex <[email protected]> * node: fix AlternatingFileWriter crash on high load (#195) * sdk-core: export mockFileSystem * node: add node-specific file system functions * node: fix AlternatingFileWriter crashes on high load * node, sdk-core: PR changes --------- Co-authored-by: Sebastian Alex <[email protected]> * nestjs: version 0.1.1 (#196) * nestjs: version 0.1.1 * nestjs: disable tests for Node v14 --------- Co-authored-by: Sebastian Alex <[email protected]> * node: version 0.1.2 (#197) Co-authored-by: Sebastian Alex <[email protected]> * node: export BacktraceNodeRequestHandler * node: version 0.1.3 (#200) Co-authored-by: Sebastian Alex <[email protected]> * nestjs: add option to don't throw if BacktraceClient is undefined (#201) Co-authored-by: Sebastian Alex <[email protected]> * electron: version 0.1.0 (#202) Co-authored-by: Sebastian Alex <[email protected]> * electron: version 0.1.0 hotfix - update @backtrace/node version * Hermes react stack trace (#194) * Add support for v8 hermes stack trace * V8 Stack trace handler: add address prefix parameter * Update BacktraceClient.ts Changed address-at to address at * use Version 0.1.0 * Source map global this (#203) * Source map global this * global DebugIdGenerator * cli: partial processing (#198) * sourcemap tools: add replacing debug ID and not modyfing source when it has debug ID already * cli: modify only sourcemaps when source has already debugId --------- Co-authored-by: Sebastian Alex <[email protected]> * cli: support tuple paths (#199) * cli: add tuple paths support for matching sources with sourcemaps * cli: disallow folders as second tuple part * sourcemap-tools: replace flatmap with reduce implementation * cli: PR changes * cli: verify tuple length * cli: split by double colon on windows --------- Co-authored-by: Sebastian Alex <[email protected]> * node: fix native reports not sending after startup (#204) * node: fix native reports not sending after startup * node: fix unit tests --------- Co-authored-by: Sebastian Alex <[email protected]> * browser: add middleware modes to redux middleware, move JSON action to attributes (#205) * browser: add middleware modes to redux middleware, move JSON action to attributes * browser: redux middleware: do not add attributes when mode=omit-values * browser: redux middleware: set omit-values as the default mode * browser: redux middleware: update tests --------- Co-authored-by: Sebastian Alex <[email protected]> * Brand typo * react-native: ensure breadcrumb message is always a string type (#207) * Ensure breadcrumb message is always a string type * Ensure null is handled correctly * react-native: managed breadcrumb support (#208) * Managed breadcrumb support * Do not add native breadcrumb provider * Dont create formdata without attachments (#206) * react-native: remove react dependency on react-native project (#209) * Managed breadcrumb support * Remove react dependency on react-native project * Include types in the definition * sourcemap-tools: version 0.2.1 (#210) Co-authored-by: Sebastian Alex <[email protected]> * cli: version 0.3.0 (#211) Co-authored-by: Sebastian Alex <[email protected]> * sdk-core: version 0.2.0 (#212) Co-authored-by: Sebastian Alex <[email protected]> * node: version 0.2.0 (#213) Co-authored-by: Sebastian Alex <[email protected]> * browser: version 0.2.0 (#214) Co-authored-by: Sebastian Alex <[email protected]> * react: version 0.2.0 (#215) Co-authored-by: Sebastian Alex <[email protected]> * electron: version 0.2.0 (#216) Co-authored-by: Sebastian Alex <[email protected]> * nestjs: version 0.2.0 (#217) Co-authored-by: Sebastian Alex <[email protected]> * sourcemap-tools: improve sourcemap search from source file (#218) Co-authored-by: Sebastian Alex <[email protected]> * cli: add-sources error behavior (#220) * sourcemap-tools: add force and more results to add sources * cli: add overload to logAsset and rename it to createAssetLogger * cli: add helper methods to errorBehavior * cli: process addSources result with behavior --------- Co-authored-by: Sebastian Alex <[email protected]> * cli, sourcemap-tools: force snippet/comment generation (#219) * sourcemap-tools: attempt to add snippets and comments if they do not exist * cli: improve assets logging * cli: trust sourceProcessor with finding sourcemap path * cli: always process file with force passed to sourceProcessor * cli: fix unit tests * sourcemap-tools: add doc about regexp in DebugIdGenerator --------- Co-authored-by: Sebastian Alex <[email protected]> * sourcemap-tools: version 0.2.2 (#221) Co-authored-by: Sebastian Alex <[email protected]> * cli: version 0.3.1 (#222) Co-authored-by: Sebastian Alex <[email protected]> * react-native Demo customizations * Use zlib instead of node:zlib * sourcemap-tools, cli: Version update * react-native: set transfer encoding to chunked (#223) * set transfer encoding to chunked * Avoid creating form data when no attachments are available * Add support for async frames and generic params (#224) * electron: update version to 28 (#226) Co-authored-by: Sebastian Alex <[email protected]> * electron: version 0.2.1 (#227) Co-authored-by: Sebastian Alex <[email protected]> * cli: fix no error exit on upload fail * backtrace-node: Use https client only when the protocol is set to https: (#232) * sdk-core: Return send result (#233) * sdk-core: Return send result * Rename method * Version 0.3.0 (#234) * sdk-core: Destroy client on dispose (#235) * sdk-core: Destroy client via the dispose method * Undo metrics setup for node example * Sdk-core: Changelog update (#236) * sdk-core: add useModule to builder, export dataStructures (#238) Co-authored-by: Sebastian Alex <[email protected]> * session-replay: add session replay package (#239) * sdk-core: add useModule to builder, export dataStructures * session-replay: add initial workspace * session-replay: add session recorder module * session-replay: re-emit events to advancedOptions emit * session-replay: add options and docs * browser example: add example usage of session-replay * chore: update package-lock.json * session-replay: extract options to separate file, add inspect callback * session-replay: update description * session-replay: remove test script * session-replay: remove unnecessary check from BacktraceSessionRecorder.get * session-replay: add separate options for disabling limits --------- Co-authored-by: Sebastian Alex <[email protected]> * chore: sync dependency versions * react-native: Attribute map - fixed attribute names for react-native (#242) * Auto source map upload on Android (#243) * BT-523:auto source map upload on Android * Apply suggestions from code review Upload script comments Co-authored-by: Sebastian Alex <[email protected]> --------- Co-authored-by: Sebastian Alex <[email protected]> * react-native: Fixed application.version attribute * react-native: Enable correctly OOM Watcher and do not report OOMs from background * iOS source map support (#244) * iOS source map support * Modify xcode project * Remove project reference * Clean up project information * Readme update * Use npx everywhere * Correct npx usage * Exit on disabled database (#245) * Exit on disabled database * Add abortsignlar support to the send method * Abort controller comment * Use abort signal in flush/send method * Return instead of throwIfAborted * Abort signal comment in the database definition * Verify abort signal in the loop * Use abort controller from utility * Use transfer encoding header (#246) * Release 0.3.2 (#247) * Release 0.3.2 * Different changelog message * Add reference to pull request --------- Co-authored-by: Sebastian Alex <[email protected]> Co-authored-by: Sebastian Alex <[email protected]> Co-authored-by: adamcronin42 <[email protected]> Co-authored-by: Adam Cronin <[email protected]> Co-authored-by: ianrice07 <[email protected]> Co-authored-by: Ian Rice <[email protected]> Co-authored-by: Rick Foster <[email protected]> Co-authored-by: kdysput <[email protected]> Co-authored-by: Rick Foster <[email protected]>
1 parent 85afd21 commit 2e663b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5833
-6731
lines changed

examples/sdk/browser/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
},
4242
"dependencies": {
4343
"@reduxjs/toolkit": "^1.9.5",
44-
"@backtrace/browser": "^0.1.0"
44+
"@backtrace/browser": "^0.2.0",
45+
"@backtrace/session-replay": "^0.0.1"
4546
}
4647
}

examples/sdk/browser/src/index.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { BacktraceClient, BacktraceStringAttachment, createBacktraceReduxMiddleware } from '@backtrace/browser';
2+
import { BacktraceSessionReplayModule } from '@backtrace/session-replay';
23
import { configureStore, createSlice } from '@reduxjs/toolkit';
34
import { SUBMISSION_URL } from './consts';
45

5-
const client = BacktraceClient.initialize({
6+
const client = BacktraceClient.builder({
67
url: SUBMISSION_URL,
78
name: '@backtrace/browser-example',
89
version: '0.0.1',
@@ -13,7 +14,13 @@ const client = BacktraceClient.initialize({
1314
prop2: 123,
1415
},
1516
},
16-
});
17+
})
18+
.useModule(
19+
new BacktraceSessionReplayModule({
20+
maxEventCount: 100,
21+
}),
22+
)
23+
.build();
1724

1825
interface DemoState {
1926
count: number;
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"run": {
3+
"process": true,
4+
"upload": true,
5+
"add-sources": true
6+
},
7+
"upload": {
8+
"url": "https://<your-backtrace-url>:6098/post?format=sourcemap&token=<your-symbols-access-token>",
9+
"include-sources": true
10+
}
11+
}

examples/sdk/reactNative/README.md

+51
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,54 @@ This example app shows features available in the @backtrace/react-native package
77
1. Add your universe and token to the SUBMISSION_URL in src/consts.ts
88
2. `npm install`. If you're on iOS, navigate to the `ios` directory and run `pod install`
99
3. `npm run start` and pick desired platform
10+
11+
#### Source maps
12+
13+
Before executing any step:
14+
15+
- Please update .backtracejsrc file with your symbols submission URL and your sourcemap settings.
16+
17+
On Android: You can verify our example app with the source map support. In order to do that, please use the
18+
android-sourcemap.sh script.
19+
20+
```bash
21+
./android-sourcemap.sh ./optional-path-to-directory
22+
```
23+
24+
The script will prepare a release APK version of your React Native application with the sourcemap and Hermes support.
25+
The APK can be found in the ./android/app/build/outputs/apk/release/ directory.
26+
27+
On iOS: Backtrace simplify the flow needed to upload source maps by instructing hermesc how to generate and prepare
28+
source maps for your application. Without this additional step, react-native will not instruct your application to
29+
support Backtrace source maps.
30+
31+
In order to prepare your application for source maps and automatically upload them to Backtrace, modify your "Build
32+
Phase" with the following code:
33+
34+
```bash
35+
set -e
36+
37+
# destination source map directory
38+
SOURCE_MAP_DIR="$(pwd)/../build"
39+
mkdir -p $SOURCE_MAP_DIR
40+
41+
export SOURCEMAP_FILE="$SOURCE_MAP_DIR/main.js.map";
42+
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
43+
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
44+
45+
# use hermesc script provided by Backtrace to populate source maps
46+
# if you dont use hermes support, please skip this step.
47+
export HERMES_CLI_PATH="$(pwd)/../ios-hermesc.sh"
48+
49+
/bin/sh -c "$WITH_ENVIRONMENT $REACT_NATIVE_XCODE"
50+
51+
# copy javascript build output to the build directory
52+
cp "$CONFIGURATION_BUILD_DIR/main.jsbundle" $SOURCE_MAP_DIR
53+
54+
# process source map with javascript code
55+
npx --yes @backtrace/javascript-cli run --config "$(pwd)/../.backtracejsrc" --path "$SOURCE_MAP_DIR/main.jsbundle"
56+
57+
```
58+
59+
Note: this modification copy the output of the javascript build into the build directory created in your application
60+
folder. Please also put ios-hermesc.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#/bin/bash
2+
3+
# This script shows how to add source map support to any react-native android application.
4+
# By using it, you can upload source maps to Backtrace and built a release version of the app
5+
# with hermesc support. This script uses .backtracejsrc file available in your react-native directory.
6+
#
7+
# Additional information: This script prepares your bundle for you. In the release build, to prevent "double" application build
8+
# while building final apk/aab, in the build.gradle file, please use `debuggableVariants = ["release"]`. Otherwise
9+
# Gradle and react-native will try to build the application twice and override application version with source map support.
10+
11+
BUILD_DIR=${1:-build}
12+
BUNDLE_PATH="$BUILD_DIR/index.android.bundle"
13+
SOURCE_MAP_PATH="$BUILD_DIR/index.android.js.map"
14+
15+
mkdir -p $BUILD_DIR
16+
# build react-native application
17+
npx react-native bundle \
18+
--platform android \
19+
--dev false \
20+
--entry-file index.js \
21+
--reset-cache \
22+
--bundle-output $BUNDLE_PATH \
23+
--sourcemap-output $SOURCE_MAP_PATH \
24+
--minify false \
25+
--assets-dest ./android/app/src/main/res/
26+
27+
28+
# add source map identifier to final javascript bundle
29+
npx --yes @backtrace/javascript-cli process --path=$BUNDLE_PATH
30+
31+
HBC_OUTPUT="$BUILD_DIR/app.hbc"
32+
HBC_MAP_OUTPUT="$HBC_OUTPUT.map"
33+
34+
# generate react-native executable
35+
./node_modules/react-native/sdks/hermesc/osx-bin/hermesc \
36+
-emit-binary \
37+
-max-diagnostic-width=80 \
38+
-output-source-map \
39+
-out=$HBC_OUTPUT \
40+
$BUNDLE_PATH
41+
42+
# on this stage we have source map for built application via react-native
43+
# and source map for the final executable. Combination of both should generate
44+
# final source map needed to process correctly reports
45+
node ./node_modules/react-native/scripts/compose-source-maps.js \
46+
$SOURCE_MAP_PATH \
47+
$HBC_MAP_OUTPUT \
48+
-o $SOURCE_MAP_PATH
49+
50+
# upload data to Backtrace
51+
npx --yes @backtrace/javascript-cli run $BUNDLE_PATH
52+
53+
# prepare android application
54+
mkdir -p ./android/app/src/main/assets
55+
# rename hbc to android.bundle file
56+
mv $HBC_OUTPUT $BUNDLE_PATH
57+
58+
# prepare android application
59+
mkdir -p ./android/app/build/generated/assets/createBundleReleaseJsAndAssets
60+
cp $BUNDLE_PATH ./android/app/build/generated/assets/createBundleReleaseJsAndAssets/
61+
mkdir -p ./android/app/build/intermediates/assets/release/
62+
cp $BUNDLE_PATH ./android/app/build/intermediates/assets/release/
63+
64+
cd android
65+
./gradlew assembleRelease
66+
echo "Application build is available under path: ./android/app/build/outputs/apk/release/"

examples/sdk/reactNative/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ react {
2020
// The list of variants to that are debuggable. For those we're going to
2121
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
2222
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
23-
// debuggableVariants = ["liteDebug", "prodDebug"]
23+
debuggableVariants = ["release"]
2424

2525
/* Bundling */
2626
// A list containing the node command and its flags. Default is just 'node'.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#/bin/bash
2+
3+
# This script shows how process your application code with source maps and hermesc. By using this script, Backtrace integration can process
4+
# your source code to generate valid source map files. This script does exactly the same what the hermesc script does, with one exception -
5+
# before the native library is generated, this script will process source code and source map to generate output needed in next steps for source map integration.
6+
7+
8+
HERMES_ENGINE_PATH="$PODS_ROOT/hermes-engine"
9+
[ -z "$HERMES_CLI_PATH_OVERRIDE" ] && HERMES_CLI_PATH_OVERRIDE="$HERMES_ENGINE_PATH/destroot/bin/hermesc"
10+
11+
12+
APP_BUNDLE_FILE="${BASH_ARGV[0]}"
13+
14+
if [[ ! -f "$APP_BUNDLE_FILE" ]]; then
15+
echo "error: File $APP_BUNDLE_FILE does not exist. " >&2
16+
exit 2
17+
fi
18+
19+
npx --yes @backtrace/javascript-cli process --path=$APP_BUNDLE_FILE
20+
21+
$HERMES_CLI_PATH_OVERRIDE $@

examples/sdk/reactNative/ios/reactNative.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
);
265265
runOnlyForDeploymentPostprocessing = 0;
266266
shellPath = /bin/sh;
267-
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
267+
shellScript = "set -e\n\n# destination source map directory\nSOURCE_MAP_DIR=\"$(pwd)/../build\"\nmkdir -p $SOURCE_MAP_DIR\n\nexport SOURCEMAP_FILE=\"$SOURCE_MAP_DIR/main.js.map\";\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n# use hermesc script provided by Backtrace to populate source maps\n# if you dont use hermes support, please skip this step.\nexport HERMES_CLI_PATH=\"$(pwd)/../ios-hermesc.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n\n# copy javascript build output to the build directory\ncp \"$CONFIGURATION_BUILD_DIR/main.jsbundle\" $SOURCE_MAP_DIR \n \n# process source map with javascript code\nnpx --yes @backtrace/javascript-cli run --config \"$(pwd)/../.backtracejsrc\" --path \"$SOURCE_MAP_DIR/main.jsbundle\" \n";
268268
};
269269
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
270270
isa = PBXShellScriptBuildPhase;

0 commit comments

Comments
 (0)