getappmap / appmap-node Goto Github PK
View Code? Open in Web Editor NEWAppMap client agent for Node.js
License: Other
AppMap client agent for Node.js
License: Other
To reproduce: navigate to packages/scanner
in appmap-js
and run this command:
npx appmap-node@latest yarn test config
Then you will get this output:
(Λ) Running with appmap-node version 2.5.0
(Λ) Detected Jest. Tests will be automatically recorded.
FAIL test/config.spec.ts
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
Details:
/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/scope/rootScope.ts:43
yield new scopeImpl_1.default(event);
^^^^^
SyntaxError: Unexpected strict mode reserved word
302 | } else {
303 | finding = await buildFinding(event, {});
> 304 | }
| ^
305 | findings.push(finding);
306 | } else if (typeof matchResult === 'string') {
307 | const finding = await buildFinding(event, {}, matchResult as string);
at Runtime.createScriptFromCode (../../node_modules/jest/node_modules/jest-runtime/build/index.js:1108:14)
at Object.<anonymous> (src/ruleChecker.ts:304:8)
at Object.<anonymous> (test/util.ts:29:3)
at Object.<anonymous> (test/setup.ts:6:16)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 3.3 s
As of now, there's no way to record ingress from a Gateway via a method annotated with SubscribeMessage
.
A mode for programmatic usage of AppMap would be useful to allow the developer to selectively record pieces of code.
While we can't instrument code that's already been loaded, we could have a mode that instruments the code normally but leaves the instrumentation disabled (eg. appmap-node --inactive
or --disabled
). The programmer could then use an exposed API to record snippets of interest, eg.
const appmap = AppMap.record(() => {
hello("world");
});
While mapping this repo, we noticed that all SQL queries happen at least twice (or as multiples of 2). It's likely that SQL queries are getting double-counted.
https://vitest.dev/ is a test framework which we need support for in the Node agent.
MongoDB is a popular data store in the JS ecosystem; we should enable our users to capture the queries. Note it's TBD how to express them in AppMaps since we only explicitly support SQL databases in the spec.
Capturing HTTP response body is a feature that's frequently requested by our users. While it's probably too much overhead to do it by default, it could be optionally enabled (eg. with an APPMAP_CAPTURE_HTTP_RESPONSE=<max length>
environment variable). It seems like it can simply go into the return_value
of the HTTP response event.
Note this is not necessarily trivial since the app can stream the response. It likely involves replacing the response stream with a tee that sends both to the peer and to appmap.
While next apps work fine in tests, trying to run one in a browser causes a crash (see ad4cbfe for an example):
TypeError: __webpack_require__.g.AppMapRecordHook is undefined
is caused by the fact that the code is instrumented on compilation and then the same code is ran both on the server and in the browser. This could probably be fixed by injecting a stub AppMapRecordHook
in the browser environment.
A package
is reported for each file, resulting in a large number of packages, and few (zero?) packages that contain more than one class.
Report directories as packages instead, the way that the Ruby and Python agents do.
To reproduce, run the following command in packages/models
in appmap-js
:
npx appmap-node@latest yarn jest classMap
I get the following output:
(Λ) Running with appmap-node version 2.6.1
(Λ) Detected Jest. Tests will be automatically recorded.
FAIL tests/unit/classMap.spec.js
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading '1')
at Object.<anonymous> (node_modules/jest-circus/build/state.js:59:30)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.235 s, estimated 9 s
Ran all test suites matching /classMap/i.
To reproduce: in appmap-js
, run the following command from packages/scanner
:
npx appmap-node@latest yarn test scan.spec.ts
I get the following output:
(Λ) Running with appmap-node version 2.5.1
(Λ) Detected Jest. Tests will be automatically recorded.
console.log
Using scanner configuration file /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/sampleConfig/default.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/test/fixtures/appmaps/org_springframework_samples_petclinic_owner_OwnerControllerTests_testInitCreationForm.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
undefined
at src/cli/scan/singleScan.ts:93:15
console.log
undefined
at src/report/summaryReport.ts:105:13
console.log
0 findings (0 unique)
at src/report/summaryReport.ts:106:13
console.log
at src/cli/scan/singleScan.ts:95:15
console.log
Performed 13 checks in 244ms (53 checks/sec)
at src/cli/scan/singleScan.ts:98:15
console.log
Using scanner configuration file /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/sampleConfig/default.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/tmp-35574-bzQdD1iKYjAn/bad.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
scanning /tmp/tmp-35574-bzQdD1iKYjAn/good.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.warn
Error: Error processing "/tmp/tmp-35574-bzQdD1iKYjAn/bad.appmap.json"
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:335:23
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:228:24) {
[cause]: SyntaxError: Unexpected token b in JSON at position 0
at JSON.parse (<anonymous>)
at Ee.source (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:37:24)
at new Ee (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:27:12)
at D (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:281:10)
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:322:51
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:228:24)
}
at src/cli/scan.ts:339:19
at fulfilled (src/cli/scan.ts:228:24)
console.log
undefined
at src/cli/scan/singleScan.ts:93:15
console.log
undefined
at src/report/summaryReport.ts:105:13
console.log
0 findings (0 unique)
at src/report/summaryReport.ts:106:13
console.log
at src/cli/scan/singleScan.ts:95:15
console.log
Performed 13 checks in 179ms (72 checks/sec)
at src/cli/scan/singleScan.ts:98:15
console.log
Using scanner configuration file /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/sampleConfig/default.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/tmp-35574-DGdjZ3X38gpt/bad.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.warn
Error: Error processing "/tmp/tmp-35574-DGdjZ3X38gpt/bad.appmap.json"
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:335:23
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:228:24) {
[cause]: SyntaxError: Unexpected token b in JSON at position 0
at JSON.parse (<anonymous>)
at Ee.source (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:37:24)
at new Ee (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:27:12)
at D (/home/ahtrotta/projects/appmap/appmap-js/packages/models/src/appMapBuilder/index.js:281:10)
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:322:51
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/cli/scan.ts:228:24)
}
at src/cli/scan.ts:339:19
at fulfilled (src/cli/scan.ts:228:24)
console.log
Using scanner configuration file /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/sampleConfig/default.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/tmp-35574-CSmH6LBiPruP
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
scanning /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/test/fixtures/appmaps/org_springframework_samples_petclinic_owner_OwnerControllerTests_testInitCreationForm.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/OVzM86/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/OVzM86/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/1gIfS6/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/1gIfS6/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/0ZETs8/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.warn
Error: ENOSPC: System limit for number of file watchers reached
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/test/cli/scan.spec.ts:767:21
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/test/cli/scan.spec.ts:490:24)
at Watcher.<anonymous> (src/cli/scan/watchScan.ts:406:19)
at Object.<anonymous>.__awaiter (src/cli/scan/watchScan.ts:302:67)
at src/cli/scan/watchScan.ts:284:10
at Watcher.<anonymous> (src/cli/scan/watchScan.ts:404:14)
at Watcher.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:31:24)
at Watcher.watcherErrorFunction (src/cli/scan/watchScan.ts:402:36)
at test/cli/scan.spec.ts:769:23
at fulfilled (test/cli/scan.spec.ts:490:24)
console.warn
Will disable file watching. File polling will stay enabled.
at Watcher.<anonymous> (src/cli/scan/watchScan.ts:407:19)
at Object.<anonymous>.__awaiter (src/cli/scan/watchScan.ts:302:67)
at src/cli/scan/watchScan.ts:284:10
at Watcher.<anonymous> (src/cli/scan/watchScan.ts:404:14)
at Watcher.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:31:24)
at Watcher.watcherErrorFunction (src/cli/scan/watchScan.ts:402:36)
at test/cli/scan.spec.ts:769:23
at fulfilled (test/cli/scan.spec.ts:490:24)
console.warn
File watching disabled.
at Watcher.<anonymous> (src/cli/scan/watchScan.ts:410:19)
at fulfilled (src/cli/scan/watchScan.ts:287:24)
console.log
Using scanner configuration file /tmp/wA2s79/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/wA2s79/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/nrjzsa/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/nrjzsa/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/MHwPo7/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/MHwPo7/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/MHwPo7/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/MHwPo7/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/44FzH6/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/44FzH6/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
scanning /tmp/44FzH6/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
Using scanner configuration file /tmp/qSMTx7/appmap-scanner.yml
at src/configuration/configurationProvider.ts:408:15
console.log
scanning /tmp/qSMTx7/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
scanning /tmp/qSMTx7/other.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
[scan] Report file /tmp/qSMTx7/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again/appmap-findings.json is already up to date
[scan] Report file /tmp/qSMTx7/other/appmap-findings.json is already up to date
console.log
scanning /tmp/qSMTx7/test-0.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
console.log
scanning /tmp/qSMTx7/test-1.appmap.json
at src/cli/scan.ts:320:19
at Array.map (<anonymous>)
FAIL test/cli/scan.spec.ts
● Test suite failed to run
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at pick (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/util/pick.ts:5:27)
at exceptionMetadata (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/metadata.ts:31:14)
at extractTestError (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/hooks/jest.ts:86:36)
at eventHandler (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/hooks/jest.ts:56:38)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 28.59 s
Ran all test suites matching /scan.spec.ts/i.
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:272:69
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:272:69
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:272:69
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:272:69
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:257:68
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:277:65
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:277:65
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:277:65
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:277:65
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/cli/scan.spec.ts.
at src/configuration/configurationProvider.ts:284:68
console.warn
Problem processing /tmp/qSMTx7/test-2/mtime:
TypeError: rule.Options is not a constructor
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:317:19
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:211:24)
at src/cli/scan/watchScan.ts:358:49
at ../../node_modules/async/dist/async.js:1496:46
at Array.forEach (<anonymous>)
at trigger (../../node_modules/async/dist/async.js:1496:27)
at ../../node_modules/async/dist/async.js:1560:25
at ../../node_modules/async/dist/async.js:327:20
console.warn
Problem processing /tmp/qSMTx7/test-3/mtime:
TypeError: rule.Options is not a constructor
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:317:19
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:211:24)
at src/cli/scan/watchScan.ts:358:49
at ../../node_modules/async/dist/async.js:1496:46
at Array.forEach (<anonymous>)
at trigger (../../node_modules/async/dist/async.js:1496:27)
at ../../node_modules/async/dist/async.js:1560:25
at ../../node_modules/async/dist/async.js:327:20
console.warn
Problem processing /tmp/qSMTx7/test-4/mtime:
TypeError: rule.Options is not a constructor
at /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:317:19
at Generator.next (<anonymous>)
at fulfilled (/home/ahtrotta/projects/appmap/appmap-js/packages/scanner/src/configuration/configurationProvider.ts:211:24)
at src/cli/scan/watchScan.ts:358:49
at ../../node_modules/async/dist/async.js:1496:46
at Array.forEach (<anonymous>)
at trigger (../../node_modules/async/dist/async.js:1496:27)
at ../../node_modules/async/dist/async.js:1560:25
at ../../node_modules/async/dist/async.js:327:20
[scan] Report file /tmp/qSMTx7/Confirmation_already_confirmed_user_should_not_be_able_to_confirm_the_account_again/appmap-findings.json is already up to date
[scan] Report file /tmp/qSMTx7/other/appmap-findings.json is already up to date
Prisma is a rich JS ORM that does sophisticated code manipulation under the hood to provide convenient and safe developer experience. We haven't tried it but it seems to use internal SQL clients instead of the libraries we already hook, which means the SQL queries executed with Prisma won't currently get captured.
To reproduce, run npx appmap-node yarn test installCommand
in appmap-js
in the packages/cli
directory. The test suite will not run and you will see this output:
(Λ) Running with appmap-node version 2.2.0
FAIL tests/unit/agentInstall/installCommand.spec.ts
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
Details:
/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/cmds/agentInstaller/pythonAgentInstaller.ts:682
super(name, path);
^^^^^
SyntaxError: 'super' keyword unexpected here
25 | import { dump } from 'js-yaml';
26 |
> 27 | import * as openTicket from '../../../src/lib/ticket/openTicket';
| ^
28 | import { withStubbedTelemetry } from '../../helper';
29 | import { YarnInstaller } from '../../../src/cmds/agentInstaller/javaScriptAgentInstaller';
30 | import assert from 'node:assert';
at Runtime.createScriptFromCode (../../node_modules/jest-runner/node_modules/jest-runtime/build/index.js:1110:14)
at Object.<anonymous> (tests/unit/agentInstall/installCommand.spec.ts:27:1)
npx appmap-node node ./built/cli.js archive
I'm expecting to see the archive command at the root of the AppMap.
I tried to run https://github.com/AykutSarac/jsoncrack.com with appmap-node. First it crashed with:
$ appmap-node pnpm dev
(Λ) Running with appmap-node version 2.13.1
(Λ) Writing default config to /home/divide/projects/tmp/jsoncrack.com/appmap.yml
undefined:21
"include": ["src", "next-env.d.ts",],
^
SyntaxError: Unexpected token ']', ..."env.d.ts",],
"excl"... is not valid JSON
at JSON.parse (<anonymous>)
at tsConfigTsNodeEsmIsTrue (/home/divide/projects/appmap-agent-js-ng/dist/bin.js:83:31)
at isTsEsmLoaderNeeded (/home/divide/projects/appmap-agent-js-ng/dist/bin.js:93:50)
at Object.main (/home/divide/projects/appmap-agent-js-ng/dist/bin.js:36:9)
at Object.<anonymous> (/home/divide/projects/appmap-agent-js-ng/bin/appmap-node.js:4:27)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
After removing the extra comma, it run further but eventually crashed in the browser with:
Unhandled Runtime Error
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Warning: Expected server HTML to contain a matching <style> in <div>.
See more info here: https://nextjs.org/docs/messages/react-hydration-error
Component Stack
Call Stack
throwOnHydrationMismatch
node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js (12507:0)
tryToClaimNextHydratableInstance
node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js (12520:0)
updateHostComponent
node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js (19902:0)
beginWork
node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js (21618:0)
To reproduce: In appmap-js
run the following command in packages/scanner
:
npx appmap-node@latest yarn test upload.spec.ts -t 'runs with default arguments'
I get the following output:
(Λ) Running with appmap-node version 2.5.1
(Λ) Detected Jest. Tests will be automatically recorded.
FAIL test/cli/upload.spec.ts (7.994 s)
upload
✕ runs with default arguments (5016 ms)
○ skipped accepts branch and environment
○ skipped resolves commit and branch information from the environment
○ skipped the max size for uploads is less than 48MB by default
○ skipped prunes large AppMaps before uploading
● upload › runs with default arguments
TypeError: Invalid URL
at OverriddenClientRequest.<anonymous> (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/hooks/http.ts:65:17)
at InterceptedRequestRouter.startPlayback (../../node_modules/nock/lib/intercepted_request_router.js:310:11)
at InterceptedRequestRouter.maybeStartPlayback (../../node_modules/nock/lib/intercepted_request_router.js:262:12)
at InterceptedRequestRouter.connectSocket (../../node_modules/nock/lib/intercepted_request_router.js:140:12)
at ../../node_modules/nock/lib/intercepted_request_router.js:78:33
● upload › runs with default arguments
thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
109 | const localhost = nock('http://localhost:3000');
110 | localhost.post(`/api/appmaps`).reply(201, AppMapData1, ['Content-Type', 'application/json']);
> 111 | localhost.post(`/api/appmaps`).reply(201, AppMapData2, ['Content-Type', 'application/json']);
| ^
112 | localhost.post(`/api/mapsets`).reply(201, MapsetData, ['Content-Type', 'application/json']);
113 | localhost.post(`/api/scanner_jobs`).reply(201, ScannerJobData, {
114 | location: `http://localhost:3000/scanner_jobs/${ScannerJobData.id}`,
at test/cli/upload.spec.ts:111:3
at Object.<anonymous> (test/cli/upload.spec.ts:110:1)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 4 skipped, 5 total
Snapshots: 0 total
Time: 8.069 s, estimated 24 s
Ran all test suites matching /upload.spec.ts/i with tests matching "runs with default arguments".
(Λ) Wrote /home/ahtrotta/projects/appmap/appmap-js/packages/scanner/tmp/appmap/jest/upload/runs with default arguments.appmap.json
This data was captured from https://github.com/getappmap/appmap-services/tree/feat/speak-api with a default appmap.yml
name: api-service
appmap_dir: tmp/appmap
packages:
- path: .
exclude:
- node_modules
- .yarn
See the example AppMap attached.
While trying to map this repo:
*[main][~/code/express-starter-kit]$ npx appmap-node npm start
(Λ) Running with appmap-node version 2.7.0
> [email protected] start
> nodemon src/index.ts
[nodemon] 2.0.21
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,js,json
[nodemon] starting `node --loader ts-node/esm src/index.ts`
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/boilerplate.ts: [17:12]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/authressTokenValidation.ts: [6:10]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/accounts/accountController.ts: [12:31]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/users/usersController.ts: [12:46]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/resourceManagement/exampleResourceController.ts: [12:53]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/accounts/accountsRepository.ts: [3:29]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/authressPermissionsWrapper.ts: [20:30]: Expected ')'
(Λ) Error transforming source at file:///Users/brikelly/code/express-starter-kit/src/resourceManagement/exampleDataRepository.ts: [3:25]: Expected ')'
App Running on http://localhost:8080/```
User should be able to label functions with arbitrary labels. This could be exposed as label:
entries in appmap.yml's packages
and/or through special code comments. The former would also allow auto-labeling known library functions in conjunction with #83 enabling various scanner rules to work with appmap-node appmaps.
To reproduce, run the following command in packages/client
in appmap-js
:
npx appmap-node@latest yarn jest appMap.create.spec.ts
I get the following output:
(Λ) Running with appmap-node version 2.6.1
(Λ) Detected Jest. Tests will be automatically recorded.
(Λ) Wrote 5 AppMaps to /home/ahtrotta/projects/appmap/appmap-js/packages/client/tmp/appmap/jest/appMap/
RUNS test/appMap.create.spec.ts
node:assert:399
throw err;
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
(0, node_assert_1.default)(this.stream)
at Recording.httpClientRequest (/home/ahtrotta/.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:80:11)
at OverriddenClientRequest.<anonymous> (/home/ahtrotta/.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/hooks/http.ts:69:42)
at OverriddenClientRequest.emit (node:events:513:28)
at InterceptedRequestRouter.startPlayback (/home/ahtrotta/projects/appmap/appmap-js/node_modules/nock/lib/intercepted_request_router.js:310:11)
at InterceptedRequestRouter.maybeStartPlayback (/home/ahtrotta/projects/appmap/appmap-js/node_modules/nock/lib/intercepted_request_router.js:262:12)
at InterceptedRequestRouter.connectSocket (/home/ahtrotta/projects/appmap/appmap-js/node_modules/nock/lib/intercepted_request_router.js:140:12)
at /home/ahtrotta/projects/appmap/appmap-js/node_modules/nock/lib/intercepted_request_router.js:78:33
at processTicksAndRejections (node:internal/process/task_queues:77:11) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: undefined,
expected: true,
operator: '=='
}
Node.js v18.16.0
Line 282 in 58cb23e
In particular this is a problem we encountered while trying to map our internal services.
In appmap-js
in the packages/cli
folder, if I run:
npx appmap-node@latest yarn test fingerprintWatchCommand
I get this error:
(Λ) Running with appmap-node version 2.3.2
(Λ) Detected Jest. Tests will be automatically recorded.
RUNS tests/unit/fingerprint/fingerprintWatchCommand.spec.ts
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
at new Fingerprinter (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/fingerprint/fingerprinter.ts:72:21)
at FingerprintQueue.<anonymous> (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/fingerprint/fingerprintQueue.ts:177:22)
at FingerprintQueue.record (/home/ahtrotta/.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:30:22)
at new FingerprintQueue (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/fingerprint/fingerprintQueue.ts:173:36)
at FingerprintWatchCommand.<anonymous> (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/fingerprint/fingerprintWatchCommand.ts:605:22)
at FingerprintWatchCommand.record (/home/ahtrotta/.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:30:22)
at new FingerprintWatchCommand (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/src/fingerprint/fingerprintWatchCommand.ts:598:36)
at /home/ahtrotta/projects/appmap/appmap-js/packages/cli/tests/unit/fingerprint/fingerprintWatchCommand.spec.ts:411:15
at record (/home/ahtrotta/.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:30:22)
at testDisableFileWatching (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/tests/unit/fingerprint/fingerprintWatchCommand.spec.ts:410:38)
at Object.<anonymous> (/home/ahtrotta/projects/appmap/appmap-js/packages/cli/tests/unit/fingerprint/fingerprintWatchCommand.spec.ts:427:7)
at Promise.then.completed (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:316:40)
at _runTest (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:252:3)
at _runTestsForDescribeBlock (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:126:9)
at _runTestsForDescribeBlock (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:121:9)
at _runTestsForDescribeBlock (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:121:9)
at run (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/home/ahtrotta/projects/appmap/appmap-js/node_modules/jest-runner/build/runTest.js:444:34)
Node.js v18.16.0
> Thanks, good work! Does cal.com now map correctly?
There are at least two more problems.
global.AppMapmapRecordHook
is undefined in some parts of the code. I guess it's the next
middleware. I excluded the function called csp
in appmap.yml
to bypass it and see other problems. Middleware/edge runtimes may not use node runtime at all.tRPC
proxies Object.get
and throws this error when we do value.constructor.name
inside parameters.ts::getClass
.An example appmap produced during log in.
Originally posted by @zermelo-wisen in #101 (comment)
Due to the space, this file path isn't clickable from the terminal.
(Λ) Wrote /home/db/dev/applandinc/appmap-services/packages/api-service/tmp/appmap/requests/2024-01-17T17:58:31.377Z -v1-ai-speak.appmap.json
In appmap-js
in packages/cli
if I run:
npx appmap-node@latest yarn test installCommand
I get this ouptut:
(Λ) Running with appmap-node version 2.3.2
(Λ) Detected Jest. Tests will be automatically recorded.
FAIL tests/unit/agentInstall/installCommand.spec.ts
● Test suite failed to run
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
(0, node_assert_1.default)(!exports.recording.running)
at start (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:65:9)
at eventHandler (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/hooks/jest.ts:50:12)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 4.238 s, estimated 6 s
It can be useful to allow the user to record arbitrary calls to external libraries (standard or third party), with the choice of instrumenting them entirely or only at entry points ("shallow mode"). While instrumenting third party libraries entirely is currently possible with the right configuration (eg. packages: { path: node_modules/some_library }
) it's not possible for standard libraries and shallow mode is likewise not supported.
Appmap.yml packages
should support entries like module: some-library
that also accept shallow: true
.
To reproduce: in appmap-js
, run the following command in packages/cli
:
npx appmap-node@latest yarn test fingerprinter
You'll get this output:
(Λ) Running with appmap-node version 2.5.1
(Λ) Detected Jest. Tests will be automatically recorded.
FAIL tests/unit/fingerprint/fingerprinter.spec.ts
● Fingerprinter › rejects appmaps that are too large
RangeError: Maximum call stack size exceeded
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
at stringify (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:27:17)
at parameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:12:12)
at optParameter (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/parameter.ts:32:10)
at makeCallEvent (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/event.ts:20:27)
at Recording.functionCall (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/Recording.ts:37:32)
at FileTooLargeError.record (../../../../../.npm/_npx/a04c6870cebb0c63/node_modules/appmap-node/src/recorder.ts:22:26)
at FileTooLargeError.get message [as message] (src/fingerprint/fileTooLargeError.ts:86:36)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 3.326 s
(Λ) Wrote 2 AppMaps to /home/ahtrotta/projects/appmap/appmap-js/packages/cli/tmp/appmap/jest/Fingerprinter/
We're not testing on Windows currently; one of our users tried it and got errors like:
npx appmap-node index.js
(Λ) Running with appmap-node version 2.10.0
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:405:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:131:11)
at defaultLoad (node:internal/modules/esm/load:82:3)
at nextLoad (node:internal/modules/esm/loader:163:28)
at ESMLoader.load (node:internal/modules/esm/loader:603:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
at new ModuleJob (node:internal/modules/esm/module_job:64:26)
at #createModuleJob (node:internal/modules/esm/loader:480:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v18.17.1
This looks like a path mangling issue. We need to solve it and add a Windows test to the build matrix (just one node version is enough).
appmap-node nest start --watch
Source code locations are resolving to .js
files under the dist
directory, instead of their TypeScript source.
There is a bug that causes the appmap.yml file to be replaced if the agent doesn't understand it. Instead it should show a warning and leave it as-is, using defaults.
The AppMap specification says this about value
fields:
string describing the object. This is not a strict JSON serialization, but rather a display string which is intended for the user. These strings should be trimmed in length to 100 characters.
appmap-node
currently does no such trimming. Note this can be particularly inconvenient when eg. this
is an object of a rich class with many methods. Perhaps it's worthwhile to filter the dump to only own properties. We want to make these 100 chars count.
Followup to #97 — take absolute and map-relative paths and make them consistently root-relative.
This PR added support for Jest, now we need to do the same for Mocha.
This is needed for openapi generation.
SpeakService#tts
should be calling OpenAIService#tts
. Instead, OpenAIService#tts
is called directly from the HTTP server request.
Similarly, OpenAIService#tts
makes an HTTP client request, however, the client request is reported as being called from the server request.
See the attached AppMap.
2024-01-22T17:43:03.854Z -v1-ai-speak.appmap.zip
Code available via
https://github.com/getappmap/appmap-services/tree/feat/speak-api
We currently consume source maps to obtain accurate source locations for the appmaps; however, we don't generate source maps for the instrumented code. This is problematic because backtraces and test error messages can indicate incorrect locations.
I tried to run https://github.com/calcom/cal.com with appmap-node and got the following error:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.