@appland/appmap 3.133.0 → 3.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/built/cmds/index/index.js +3 -3
- package/built/cmds/index/index.js.map +1 -1
- package/built/cmds/index/rpc.js +18 -7
- package/built/cmds/index/rpc.js.map +1 -1
- package/built/cmds/navie/help.js +122 -0
- package/built/cmds/navie/help.js.map +1 -0
- package/built/docs/CLA Instructions.pdf +0 -0
- package/built/docs/Code of Conduct for Contributors.pdf +0 -0
- package/built/docs/analysis/rules-reference.html +27 -0
- package/built/docs/appmap-overview.md +54 -0
- package/built/docs/community.md +27 -0
- package/built/docs/diagrams/dependency-map.md +63 -0
- package/built/docs/diagrams/flamegraph.md +91 -0
- package/built/docs/diagrams/how-it-works.md +60 -0
- package/built/docs/diagrams/index.md +20 -0
- package/built/docs/diagrams/sequence-diagram.md +75 -0
- package/built/docs/diagrams/trace-view.md +55 -0
- package/built/docs/guides/configuring-analysis.md +157 -0
- package/built/docs/guides/handling-large-appmaps.md +43 -0
- package/built/docs/guides/index.md +17 -0
- package/built/docs/guides/openapi.md +104 -0
- package/built/docs/guides/reading-sql-in-appmaps.md +67 -0
- package/built/docs/guides/refine-appmaps.md +186 -0
- package/built/docs/guides/reverse-engineering.md +375 -0
- package/built/docs/guides/runtime-code-review.md +108 -0
- package/built/docs/integrations/atlassian-compass.md +24 -0
- package/built/docs/integrations/atlassian-confluence.md +50 -0
- package/built/docs/integrations/docker.md +108 -0
- package/built/docs/integrations/github-actions.md +24 -0
- package/built/docs/integrations/index.md +17 -0
- package/built/docs/integrations/plantuml.md +65 -0
- package/built/docs/integrations/postman.md +29 -0
- package/built/docs/integrations/readme.md +38 -0
- package/built/docs/integrations/smartbear-swaggerhub.md +125 -0
- package/built/docs/navie/bring-your-own-key.md +98 -0
- package/built/docs/navie/demo.md +49 -0
- package/built/docs/navie/how-navie-works.md +26 -0
- package/built/docs/navie/how-to-use-navie.md +152 -0
- package/built/docs/navie/index.md +20 -0
- package/built/docs/reference/analysis-labels.md +48 -0
- package/built/docs/reference/analysis-rules.md +60 -0
- package/built/docs/reference/appmap-agent-js.md +215 -0
- package/built/docs/reference/appmap-client-cli.md +527 -0
- package/built/docs/reference/appmap-gradle-plugin.md +140 -0
- package/built/docs/reference/appmap-java.md +310 -0
- package/built/docs/reference/appmap-maven-plugin.md +163 -0
- package/built/docs/reference/appmap-node.md +185 -0
- package/built/docs/reference/appmap-python.md +395 -0
- package/built/docs/reference/appmap-ruby.md +514 -0
- package/built/docs/reference/github-action.md +164 -0
- package/built/docs/reference/index.md +23 -0
- package/built/docs/reference/jetbrains.md +119 -0
- package/built/docs/reference/license-key-install.md +73 -0
- package/built/docs/reference/remote-recording-api.md +97 -0
- package/built/docs/reference/uninstalling-appmap.md +109 -0
- package/built/docs/reference/vscode.md +125 -0
- package/built/docs/setup-appmap-in-ci/example-projects.md +20 -0
- package/built/docs/setup-appmap-in-ci/how-it-works.md +42 -0
- package/built/docs/setup-appmap-in-ci/in-circleci.md +422 -0
- package/built/docs/setup-appmap-in-ci/in-github-actions.md +176 -0
- package/built/docs/setup-appmap-in-ci/index.md +21 -0
- package/built/docs/setup-appmap-in-ci/matrix-builds.md +224 -0
- package/built/docs/setup-appmap-in-ci/troubleshooting.md +70 -0
- package/built/docs/setup-appmap-in-your-code-editor/add-appmap-to-your-code-editor.md +43 -0
- package/built/docs/setup-appmap-in-your-code-editor/appmap-analysis.md +76 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-from-tests.md +92 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-remote-recording.md +111 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-request-recording.md +79 -0
- package/built/docs/setup-appmap-in-your-code-editor/how-appmap-works.md +165 -0
- package/built/docs/setup-appmap-in-your-code-editor/index.md +23 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-appmaps.md +58 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-code-objects.md +66 -0
- package/built/docs/unused_for_now_index.html +11 -0
- package/built/rpc/appmap/stats.js +1 -1
- package/built/rpc/appmap/stats.js.map +1 -1
- package/built/rpc/explain/explain.js +6 -1
- package/built/rpc/explain/explain.js.map +1 -1
- package/built/rpc/explain/navie/navie-local.js +6 -2
- package/built/rpc/explain/navie/navie-local.js.map +1 -1
- package/built/rpc/explain/navie/navie-remote.js +5 -1
- package/built/rpc/explain/navie/navie-remote.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
# [@appland/appmap-v3.135.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.134.0...@appland/appmap-v3.135.0) (2024-03-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Update @appland/navie ([084b446](https://github.com/getappmap/appmap-js/commit/084b446cf7f1b8ed596d7d0eee2d9b86d13451a4))
|
|
7
|
+
|
|
8
|
+
# [@appland/appmap-v3.134.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.133.0...@appland/appmap-v3.134.0) (2024-03-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Default the stats name to the directory ([b1351b1](https://github.com/getappmap/appmap-js/commit/b1351b139a2e06e154e134933fc3ff47c0c98729))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Implement [@help](https://github.com/help) mode ([58f36f3](https://github.com/getappmap/appmap-js/commit/58f36f392b875bbd6a8301f68ecb18c505d2bb97))
|
|
19
|
+
* Refactor navie into agent modes ([2b1a7f6](https://github.com/getappmap/appmap-js/commit/2b1a7f65e828332eb1e38cac12f85c8aff833880))
|
|
20
|
+
|
|
1
21
|
# [@appland/appmap-v3.133.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.132.0...@appland/appmap-v3.133.0) (2024-03-26)
|
|
2
22
|
|
|
3
23
|
|
|
@@ -91,8 +91,8 @@ const handler = async (argv) => {
|
|
|
91
91
|
(0, console_1.log)(`--navie-provider option not provided, and none of ${AI_KEY_ENV_VARS.join(' ')} are available. Using remote Navie provider.`);
|
|
92
92
|
return false;
|
|
93
93
|
};
|
|
94
|
-
const buildLocalNavie = (threadId, contextProvider, projectInfoProvider) => {
|
|
95
|
-
const navie = new navie_local_1.default(threadId, contextProvider, projectInfoProvider);
|
|
94
|
+
const buildLocalNavie = (threadId, contextProvider, projectInfoProvider, helpProvider) => {
|
|
95
|
+
const navie = new navie_local_1.default(threadId, contextProvider, projectInfoProvider, helpProvider);
|
|
96
96
|
let START;
|
|
97
97
|
const logEvent = (event) => {
|
|
98
98
|
if (!logNavie)
|
|
@@ -107,7 +107,7 @@ const handler = async (argv) => {
|
|
|
107
107
|
navie.on('event', logEvent);
|
|
108
108
|
return navie;
|
|
109
109
|
};
|
|
110
|
-
const buildRemoteNavie = (threadId, contextProvider, projectInfoProvider) => new navie_remote_1.default(threadId, contextProvider, projectInfoProvider);
|
|
110
|
+
const buildRemoteNavie = (threadId, contextProvider, projectInfoProvider, helpProvider) => new navie_remote_1.default(threadId, contextProvider, projectInfoProvider, helpProvider);
|
|
111
111
|
const navieProvider = useLocalNavie() ? buildLocalNavie : buildRemoteNavie;
|
|
112
112
|
(0, handleWorkingDirectory_1.configureRpcDirectories)([process.cwd()]);
|
|
113
113
|
const rpcMethods = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cmds/index/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAEhC,kDAA0B;AAE1B,gHAAwF;AACxF,wGAAgF;AAChF,6EAAmG;AACnG,+DAA4D;AAC5D,uCAAsC;AACtC,qCAAoC;AACpC,+DAA4D;AAC5D,oDAAiD;AACjD,qEAAmD;AAEnD,yEAAiD;AACjD,u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,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE;gBACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gBAClC,MAAM,YAAY,GAAG,sBAAsB,CAAC;gBAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;gBACnC,WAAW,CAAC,GAAG,EAAE;oBACf,kBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBAC3D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;gBAC9C,CAAC,EAAE,IAAI,CAAC,CAAC;aACV;SACF;KACF;SAAM;QACL,MAAM,GAAG,GAAG,IAAI,qCAA2B,CAAC,SAAS,CAAC,CAAC;QACvD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;KACrB;AACH,CAAC,CAAC;AA3GW,QAAA,OAAO,WA2GlB"}
|
package/built/cmds/index/rpc.js
CHANGED
|
@@ -20,19 +20,19 @@ const navie_remote_1 = __importDefault(require("../../rpc/explain/navie/navie-re
|
|
|
20
20
|
const handleWorkingDirectory_1 = require("../../lib/handleWorkingDirectory");
|
|
21
21
|
const client_1 = require("@appland/client");
|
|
22
22
|
const configuration_1 = require("../../rpc/configuration");
|
|
23
|
+
const navie_1 = require("@appland/navie");
|
|
23
24
|
const AI_KEY_ENV_VARS = ['OPENAI_API_KEY'];
|
|
24
25
|
exports.command = 'rpc';
|
|
25
26
|
exports.describe = 'Run AppMap JSON-RPC server';
|
|
26
27
|
const builder = (args) => {
|
|
27
|
-
args.showHidden();
|
|
28
28
|
args.option('directory', {
|
|
29
29
|
describe: 'program working directory',
|
|
30
30
|
type: 'string',
|
|
31
31
|
alias: 'd',
|
|
32
|
-
|
|
32
|
+
array: true,
|
|
33
33
|
});
|
|
34
34
|
args.option('port', {
|
|
35
|
-
describe: 'port to listen on for JSON-RPC requests',
|
|
35
|
+
describe: 'port to listen on for JSON-RPC requests. Use port 0 to let the OS choose a port. The port number will be printed to stdout on startup.',
|
|
36
36
|
type: 'number',
|
|
37
37
|
alias: 'p',
|
|
38
38
|
});
|
|
@@ -51,6 +51,10 @@ const builder = (args) => {
|
|
|
51
51
|
type: 'string',
|
|
52
52
|
array: true,
|
|
53
53
|
});
|
|
54
|
+
args.option('agent-mode', {
|
|
55
|
+
describe: `Agent mode which to run the Navie AI. The agent can also be controlled by starting the question with '@<agent> '.`,
|
|
56
|
+
choices: Object.values(navie_1.Agents).map((agent) => agent.toLowerCase()),
|
|
57
|
+
});
|
|
54
58
|
return args.strict();
|
|
55
59
|
};
|
|
56
60
|
exports.builder = builder;
|
|
@@ -67,6 +71,10 @@ const handler = async (argv) => {
|
|
|
67
71
|
if (aiOptions) {
|
|
68
72
|
aiOptions = Array.isArray(aiOptions) ? aiOptions : [aiOptions];
|
|
69
73
|
}
|
|
74
|
+
let agentModeStr = argv.explainMode;
|
|
75
|
+
let agentMode;
|
|
76
|
+
if (agentModeStr)
|
|
77
|
+
agentMode = agentModeStr;
|
|
70
78
|
const useLocalNavie = () => {
|
|
71
79
|
if (argv.navieProvider === 'local') {
|
|
72
80
|
(0, console_1.log)(`Using local Navie provider due to explicit --navie-provider=local option`);
|
|
@@ -93,9 +101,12 @@ const handler = async (argv) => {
|
|
|
93
101
|
}
|
|
94
102
|
}
|
|
95
103
|
}
|
|
104
|
+
if (agentMode) {
|
|
105
|
+
navie.setOption('explainMode', agentMode);
|
|
106
|
+
}
|
|
96
107
|
};
|
|
97
|
-
const buildLocalNavie = (threadId, contextProvider, projectInfoProvider) => {
|
|
98
|
-
const navie = new navie_local_1.default(threadId, contextProvider, projectInfoProvider);
|
|
108
|
+
const buildLocalNavie = (threadId, contextProvider, projectInfoProvider, helpProvider) => {
|
|
109
|
+
const navie = new navie_local_1.default(threadId, contextProvider, projectInfoProvider, helpProvider);
|
|
99
110
|
applyAIOptions(navie);
|
|
100
111
|
let START;
|
|
101
112
|
const logEvent = (event) => {
|
|
@@ -111,9 +122,9 @@ const handler = async (argv) => {
|
|
|
111
122
|
navie.on('event', logEvent);
|
|
112
123
|
return navie;
|
|
113
124
|
};
|
|
114
|
-
const buildRemoteNavie = (threadId, contextProvider, projectInfoProvider) => {
|
|
125
|
+
const buildRemoteNavie = (threadId, contextProvider, projectInfoProvider, helpProvider) => {
|
|
115
126
|
(0, client_1.loadConfiguration)(false);
|
|
116
|
-
const navie = new navie_remote_1.default(threadId, contextProvider, projectInfoProvider);
|
|
127
|
+
const navie = new navie_remote_1.default(threadId, contextProvider, projectInfoProvider, helpProvider);
|
|
117
128
|
applyAIOptions(navie);
|
|
118
129
|
return navie;
|
|
119
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/cmds/index/rpc.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAE1B,uCAAsC;AACtC,qCAA8B;AAC9B,oDAAiD;AACjD,qEAAmD;AAEnD,yEAAiD;AACjD,uFAA+D;AAC/D,uDAAiF;AACjF,4DAAoC;AACpC,iEAA+C;AAC/C,kDAAsE;AACtE,sFAA6D;AAC7D,wFAA+D;AAG/D,6EAA2E;AAC3E,4CAAoD;AACpD,2DAAiF;
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/cmds/index/rpc.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAE1B,uCAAsC;AACtC,qCAA8B;AAC9B,oDAAiD;AACjD,qEAAmD;AAEnD,yEAAiD;AACjD,uFAA+D;AAC/D,uDAAiF;AACjF,4DAAoC;AACpC,iEAA+C;AAC/C,kDAAsE;AACtE,sFAA6D;AAC7D,wFAA+D;AAG/D,6EAA2E;AAC3E,4CAAoD;AACpD,2DAAiF;AACjF,0CAAwC;AAExC,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAE9B,QAAA,OAAO,GAAG,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ault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.buildHelpIndex = exports.HelpIndex = exports.unpackRef = exports.packRef = exports.DEFAULT_MAX_RESULTS = void 0;
|
|
7
|
+
const lunr_1 = __importDefault(require("lunr"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
const console_1 = require("console");
|
|
10
|
+
const promises_1 = require("fs/promises");
|
|
11
|
+
const text_splitter_1 = require("langchain/text_splitter");
|
|
12
|
+
const path_1 = require("path");
|
|
13
|
+
const fs_1 = require("fs");
|
|
14
|
+
const assert_1 = __importDefault(require("assert"));
|
|
15
|
+
const js_yaml_1 = require("js-yaml");
|
|
16
|
+
const DOCS_DIR = ['../../docs', '../../../built/docs']
|
|
17
|
+
.map((dir) => (0, path_1.join)(__dirname, dir))
|
|
18
|
+
.find((dir) => (0, fs_1.existsSync)(dir));
|
|
19
|
+
exports.DEFAULT_MAX_RESULTS = 10;
|
|
20
|
+
function packRef(filePath, from, to) {
|
|
21
|
+
return [filePath, from, to].join(':');
|
|
22
|
+
}
|
|
23
|
+
exports.packRef = packRef;
|
|
24
|
+
function unpackRef(ref) {
|
|
25
|
+
const [filePath, from, to] = ref.split(':');
|
|
26
|
+
return [filePath, parseInt(from), parseInt(to)];
|
|
27
|
+
}
|
|
28
|
+
exports.unpackRef = unpackRef;
|
|
29
|
+
class HelpIndex {
|
|
30
|
+
constructor(idx, _frontMatterByFile, contentByRef) {
|
|
31
|
+
this.idx = idx;
|
|
32
|
+
this._frontMatterByFile = _frontMatterByFile;
|
|
33
|
+
this.contentByRef = contentByRef;
|
|
34
|
+
}
|
|
35
|
+
async search(keywords, maxResults = exports.DEFAULT_MAX_RESULTS) {
|
|
36
|
+
return this.idx
|
|
37
|
+
.search(keywords.join(' '))
|
|
38
|
+
.map((result) => {
|
|
39
|
+
const content = this.contentByRef.get(result.ref);
|
|
40
|
+
const [filePath, from, to] = unpackRef(result.ref);
|
|
41
|
+
if (!content) {
|
|
42
|
+
(0, console_1.warn)(`Could not find content for ${result.ref}`);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
filePath,
|
|
47
|
+
from,
|
|
48
|
+
to,
|
|
49
|
+
content,
|
|
50
|
+
score: result.score,
|
|
51
|
+
};
|
|
52
|
+
})
|
|
53
|
+
.filter(Boolean).slice(0, maxResults);
|
|
54
|
+
}
|
|
55
|
+
static async buildIndex(directory) {
|
|
56
|
+
const documents = new Array();
|
|
57
|
+
if ((0, utils_1.verbose)())
|
|
58
|
+
(0, console_1.log)(`[HelpIndex] Adding help documents to full-text index`);
|
|
59
|
+
const startTime = Date.now();
|
|
60
|
+
const frontMatterByFile = new Map();
|
|
61
|
+
const contentByRef = new Map();
|
|
62
|
+
const buildDocument = async (filePath) => {
|
|
63
|
+
const document = await (0, promises_1.readFile)(filePath, 'utf8');
|
|
64
|
+
let [_, frontMatterStr, text] = document.split('---');
|
|
65
|
+
if (!frontMatterStr) {
|
|
66
|
+
frontMatterStr = '';
|
|
67
|
+
text = document;
|
|
68
|
+
}
|
|
69
|
+
let frontMatter;
|
|
70
|
+
if (frontMatterStr) {
|
|
71
|
+
try {
|
|
72
|
+
frontMatter = (0, js_yaml_1.load)(frontMatterStr);
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
(0, console_1.warn)(`Could not parse front matter in ${filePath}`);
|
|
76
|
+
(0, console_1.warn)(e);
|
|
77
|
+
}
|
|
78
|
+
if (frontMatter)
|
|
79
|
+
frontMatterByFile.set(filePath, frontMatter);
|
|
80
|
+
}
|
|
81
|
+
const splitter = new text_splitter_1.MarkdownTextSplitter();
|
|
82
|
+
// TODO: Utilize the front matter
|
|
83
|
+
const chunks = await splitter.createDocuments([text]);
|
|
84
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
85
|
+
const { from, to } = chunks[i].metadata.loc.lines;
|
|
86
|
+
const id = packRef(filePath, from, to);
|
|
87
|
+
contentByRef.set(id, chunks[i].pageContent);
|
|
88
|
+
const pageName = (frontMatter === null || frontMatter === void 0 ? void 0 : frontMatter.name) || (frontMatter === null || frontMatter === void 0 ? void 0 : frontMatter.title);
|
|
89
|
+
documents.push({ id, pageName, content: chunks[i].pageContent });
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
await (0, utils_1.processFiles)(directory, (filePath) => filePath.endsWith('.md'), buildDocument);
|
|
93
|
+
const idx = (0, lunr_1.default)(function () {
|
|
94
|
+
this.ref('id');
|
|
95
|
+
this.field('pageName');
|
|
96
|
+
this.field('content');
|
|
97
|
+
this.tokenizer.separator = /[\s/-_:#.]+/;
|
|
98
|
+
for (const doc of documents)
|
|
99
|
+
this.add(doc);
|
|
100
|
+
});
|
|
101
|
+
const endTime = Date.now();
|
|
102
|
+
if ((0, utils_1.verbose)())
|
|
103
|
+
(0, console_1.log)(`[AppMapIndex] Added ${documents.length} AppMaps to full-text index in ${endTime - startTime}ms`);
|
|
104
|
+
return new HelpIndex(idx, frontMatterByFile, contentByRef);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.HelpIndex = HelpIndex;
|
|
108
|
+
let helpIndex;
|
|
109
|
+
// TODO: Store the help index JSON in the distribution, so that we don't have to rebuild it when the process loads.
|
|
110
|
+
function buildHelpIndex(directory) {
|
|
111
|
+
return HelpIndex.buildIndex(directory);
|
|
112
|
+
}
|
|
113
|
+
exports.buildHelpIndex = buildHelpIndex;
|
|
114
|
+
async function collectHelp(helpRequest) {
|
|
115
|
+
if (!helpIndex) {
|
|
116
|
+
(0, assert_1.default)(DOCS_DIR, 'Could not find AppMap docs directory');
|
|
117
|
+
helpIndex = await buildHelpIndex(DOCS_DIR);
|
|
118
|
+
}
|
|
119
|
+
return await helpIndex.search(helpRequest.vectorTerms);
|
|
120
|
+
}
|
|
121
|
+
exports.default = collectHelp;
|
|
122
|
+
//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ATD,8BASC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>AppMap | {{ page.title }}</title>
|
|
6
|
+
</head>
|
|
7
|
+
<!-- Layout: default -->
|
|
8
|
+
<body>
|
|
9
|
+
<script>
|
|
10
|
+
(function () {
|
|
11
|
+
// https://stackoverflow.com/a/21198129
|
|
12
|
+
var hash = window.location.hash.substring(1);
|
|
13
|
+
let newLocation = '/docs/reference/analysis-rules';
|
|
14
|
+
if (hash) {
|
|
15
|
+
newLocation += '#' + hash;
|
|
16
|
+
}
|
|
17
|
+
window.location = newLocation;
|
|
18
|
+
})();
|
|
19
|
+
</script>
|
|
20
|
+
<p>
|
|
21
|
+
You're being redirected to the new home of this content:
|
|
22
|
+
</p>
|
|
23
|
+
<p>
|
|
24
|
+
<a href="https://docs.appland.com/docs/reference/analysis-rules.html">https://docs.appland.com/docs/reference/analysis-rules.html</a>
|
|
25
|
+
</p>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
toc: true
|
|
4
|
+
title: Docs - AppMap overview
|
|
5
|
+
redirect_from: [/docs, /docs/faq]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
# AppMap overview
|
|
9
|
+
|
|
10
|
+
AppMap is an open-source runtime code analysis tool.
|
|
11
|
+
|
|
12
|
+
AppMap records code execution traces, collecting information about how your code works and what it does. Then it presents this information as interactive diagrams that you can search and navigate. In the diagrams, you can see exactly how functions, web services, data stores, security, I/O, and dependent services all work together when application code runs.
|
|
13
|
+
|
|
14
|
+
You use AppMaps right in your code editor, using an AppMap extension or plugin. AppMaps also link directly to code, so you can use the information in the diagrams to make immediate code changes and improvements.
|
|
15
|
+
|
|
16
|
+
Over 85,000 software developers are using the [AppMap extension for VSCode](https://marketplace.visualstudio.com/items?itemName=appland.appmap) and the [AppMap plugin for JetBrains](https://plugins.jetbrains.com/plugin/16701-appmap).
|
|
17
|
+
|
|
18
|
+
<a class="btn btn-primary btn-lg" href="https://getappmap.com/">Get Started with AppMap</a>
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
_AppMap dependency map in Visual Studio Code_
|
|
22
|
+
|
|
23
|
+
## What kind of code does it work with?
|
|
24
|
+
|
|
25
|
+
AppMap works best with web application and API frameworks, such as Rails, Django, Flask, Express, and Spring. That's because AppMap has specialized features for mapping web services, routing, view templates, HTTP client requests, caching, authentication, and SQL. You can map any kind of project that's written in a supported language, but it's when you map a database-backed web application or API service that you'll see the full power of AppMap.
|
|
26
|
+
|
|
27
|
+
AppMap works equally well with small and large projects - monoliths and microservices. And by large, we mean large. AppMap has been used successfully on code bases with 10 million lines of code. For a project that large, AppMap is a truly game-changing way to understand what the code is doing, from the front-end templates and web services, through the classes and functions, through SQL and HTTP client requests, and back.
|
|
28
|
+
|
|
29
|
+
{% include docs/app_framework_logos.html %}
|
|
30
|
+
|
|
31
|
+
## What can I use it for?
|
|
32
|
+
|
|
33
|
+
**Help new developers get oriented by creating a library of key AppMaps**
|
|
34
|
+
|
|
35
|
+
If you're an expert on a code base, you can create AppMaps that will help other developers to learn how the code works, ramp up quickly, and contribute. Start collecting AppMaps of key flows into a project Wiki or README. Then, when you get questions about the code base, you can direct developers there to get "self-service" code onboarding help from AppMaps.
|
|
36
|
+
|
|
37
|
+
**Use AppMaps to add context to bug reports and other code issues**
|
|
38
|
+
|
|
39
|
+
If you find a bug or security flaw, you can record an AppMap and attach it to the code issue/ticket. The AppMap will be a massive help to the developer who takes on the task of finding and fixing the bug. Developers, security testers, and QA people can all help make bug fixing easier by recording and submitting AppMaps to the dev team.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**Use AppMaps to learn new-to-you code**
|
|
43
|
+
|
|
44
|
+
If you're new to a code base, you can ask a code expert to provide you with some AppMaps that will orient you to the work you've been asked to do. The code expert can direct you to a Wiki or README that has AppMaps of key flows. Or, the code expert can make you a custom AppMap - and then you can return the favor by contributing the AppMap to the project Wiki or README, along with some of your own thoughts about how to use it.
|
|
45
|
+
|
|
46
|
+
## Features
|
|
47
|
+
|
|
48
|
+
* **Code execution recording** AppMap agent libraries record executing code and save the data as JSON files. Running test cases is the most common way to record AppMaps, but it’s not the only way. You can find additional examples of how to record AppMaps in the [Recording AppMaps](/docs/recording-methods.html) documentation.
|
|
49
|
+
* **Interactive diagrams** Sequence Diagrams, Flame Graphs, and Dependency maps are created automatically, showing how the modules and packages in your code relate to each other for a specific AppMap. A Trace diagram shows the code execution tree, including web services, functions, SQL queries, parameter values, status codes, etc. Learn more about [AppMap Diagrams](/docs/diagrams).
|
|
50
|
+
* **SQL query data** AppMap records all SQL queries that your application makes. Whether a query is listed explicitly in the code, or automatically generated by an object-relational mapping (ORM) library, you can see exactly what’s happening between your code and the database. Learn more about [How to use SQL in AppMaps](/docs/diagrams/how-to-use-appmaps.html#how-to-read-sql-code-in-appmaps)
|
|
51
|
+
* **Web services data** AppMap records all HTTP server requests that are handled by your application. The AppMap includes the request method, path, headers, parameters, and status code, so you can see exactly what message your application received, and how it responded. AppMap captures so much information about HTTP server requests that it can automatically generate a complete OpenAPI (aka Swagger) file for your application. Learn more about [generating the OpenAPI description file](/docs/openapi).
|
|
52
|
+
* **Code labels** You can apply labels to the most important functions in your code. You can quickly identify and locate the most important functions in each code path by searching for labels in AppMap Diagrams. Labels are maintained right in the code base using annotations (Java and Python) or code comments (Ruby). Because labels are in the code, all developers can collaborate on labeling, and the code is always the source of truth for labels.
|
|
53
|
+
* **Open source** AppMap agent libraries and UI code are all available as MIT License open source. Learn about [Open Source contributions and our community](/docs/community.html).
|
|
54
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
toc: true
|
|
4
|
+
title: Docs - Community
|
|
5
|
+
redirect_from: [/docs/troubleshooting]
|
|
6
|
+
---
|
|
7
|
+
# Community
|
|
8
|
+
|
|
9
|
+
## Forum
|
|
10
|
+
[AppMap Slack](https://appmap.io/slack) is the best place for discussing AppMap with team members and community users. Ask questions about installation and setup of AppMap agents, get expert advice about the recording strategies for your applications, and share your AppMaps with people who code in your language.
|
|
11
|
+
|
|
12
|
+
## Reporting problems
|
|
13
|
+
[Join us on Slack](https://appmap.io/slack) and share your findings with us, or visit the [GitHub repositories](https://github.com/getappmap) and submit tickets there.
|
|
14
|
+
|
|
15
|
+
## Open source
|
|
16
|
+
AppMap is an open source platform, a suite of projects shared and built with our valued community. We would like to encourage you to join our talented team of contributors and help us build a rapidly growing set of tools that are transforming the way developers and teams are building and maintaining their applications.
|
|
17
|
+
|
|
18
|
+
### Become a contributor
|
|
19
|
+
- [Join us on Slack](https://appmap.io/slack) and discuss the best assignment to start with
|
|
20
|
+
- You can browse the list of issues in each repo and look for tickets tagged with [“good first issue”](https://github.com/getappmap/vscode-appland/labels/good%20first%20issue)
|
|
21
|
+
- Accept the [CLA](/docs/CLA%20Instructions.pdf)
|
|
22
|
+
- Review and observe our [Code of Conduct](/docs/Code%20of%20Conduct%20for%20Contributors.pdf)
|
|
23
|
+
- Develop and have fun with us
|
|
24
|
+
|
|
25
|
+
### Projects
|
|
26
|
+
- [AppMap framework](https://github.com/getappmap/appmap)
|
|
27
|
+
- [AppMap client agents and code editor plugins](https://github.com/getappmap)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - AppMap Diagrams - Dependency Map
|
|
4
|
+
diagrams: true
|
|
5
|
+
name: Dependency Map
|
|
6
|
+
step: 2
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Dependency Map
|
|
10
|
+
The Dependency Map diagram shows all the code that's relevant to what you're working on and how it's connected. Here you can search and navigate through web services, code, libraries, dependency services, and SQL, all in the context of a specific feature.
|
|
11
|
+
|
|
12
|
+
The dependency map is fully interactive. You can:
|
|
13
|
+
- [Expand and collapse packages and Web Service endpoints](#expand-and-collapse-packages-and-web-service-endpoints)
|
|
14
|
+
- [View detailed information about dependencies and classes](#view-detailed-information-about-dependencies-and-classes)
|
|
15
|
+
- [List the functions of a class that are used by the executed code](#list-the-functions-of-a-class-that-are-used-by-the-executed-code)
|
|
16
|
+
- [Explore callers and callees](#explore-callers-and-callees)
|
|
17
|
+
- [View SQL queries in dependency map](#view-sql-queries-in-dependency-map)
|
|
18
|
+
- [Open source code right to the line of any particular function.](#open-source-code-right-to-the-line-of-any-particular-function)
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
#### Expand and collapse packages and Web Service endpoints:
|
|
23
|
+
<div class="video-container">
|
|
24
|
+
<video playsinline loop autoplay muted>
|
|
25
|
+
<source src="/assets/img/docs/expand-and-collapse-packages.mp4" type="video/mp4">
|
|
26
|
+
</video>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
#### View detailed information about dependencies and classes:
|
|
30
|
+
<div class="video-container">
|
|
31
|
+
<video playsinline loop autoplay muted>
|
|
32
|
+
<source src="/assets/img/docs/view-detailed-information-about-dependencies.mp4" type="video/mp4">
|
|
33
|
+
</video>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
#### List the functions of a class that are used by the executed code:
|
|
37
|
+
<div class="video-container">
|
|
38
|
+
<video playsinline loop autoplay muted>
|
|
39
|
+
<source src="/assets/img/docs/list-the-functions-of-a-class.mp4" type="video/mp4">
|
|
40
|
+
</video>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
#### Explore callers and callees:
|
|
45
|
+
<div class="video-container">
|
|
46
|
+
<video playsinline loop autoplay muted>
|
|
47
|
+
<source src="/assets/img/docs/dependency-explore-callers-and-callees.mp4" type="video/mp4">
|
|
48
|
+
</video>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
#### View SQL queries in dependency map:
|
|
52
|
+
<div class="video-container">
|
|
53
|
+
<video playsinline loop autoplay muted>
|
|
54
|
+
<source src="/assets/img/docs/view-sql-queries-in-dependency-map.mp4" type="video/mp4">
|
|
55
|
+
</video>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
#### Open source code right to the line of any particular function:
|
|
59
|
+
<div class="video-container">
|
|
60
|
+
<video playsinline loop autoplay muted>
|
|
61
|
+
<source src="/assets/img/docs/open-source-from-dependency-map.mp4" type="video/mp4">
|
|
62
|
+
</video>
|
|
63
|
+
</div>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Diagrams
|
|
4
|
+
diagrams: true
|
|
5
|
+
name: Flame Graph
|
|
6
|
+
step: 5
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Flame Graph
|
|
10
|
+
|
|
11
|
+
- [How to read a Flame Graph](#how-to-read-a-flame-graph)
|
|
12
|
+
- [Drilling Down](#drilling-down)
|
|
13
|
+
- [Switching to Other Views](#switching-to-other-views)
|
|
14
|
+
- [Identifying Performance Issues](#identifying-performance-issues)
|
|
15
|
+
- [Expensive functions and queries](#expensive-functions-and-queries)
|
|
16
|
+
- [N+1 Queries](#n1-queries)
|
|
17
|
+
- [Delays from external service calls](#delays-from-external-service-calls)
|
|
18
|
+
|
|
19
|
+
Flame Graphs visualize the performance of your application’s code. A Flame Graph shows the time spent in each part of your application’s call stack, where the width of the event is proportional to how long it takes to execute.
|
|
20
|
+
|
|
21
|
+
Flame Graphs make it easy to see how much time is spent in each function, and which calls are the most expensive.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
## How to read a Flame Graph
|
|
26
|
+
|
|
27
|
+
The lowest layer in a Flame Graph represents the AppMap, and it contains the map’s name. For AppMaps created from tests, this will usually be the same name as the test from which it was generated. In the example below, the AppMap was recorded from a test related to an application’s account activation capability.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
Events in a Flame Graph are ordered bottom-up for functions calling other functions, and left-to-right for subsequent calls. To illustrate, the events in the map below are numbered according to the sequence in which they occurred.
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
Cells in the flame graph are colored similarly to how they appear in the other AppMap views like the Dependency Map and Sequence Diagram. Blue represents classes, purple represents database queries, and yellow represents outgoing calls to other services. The lowest level of the Flame Graph, the map name, is colored teal.
|
|
36
|
+
|
|
37
|
+
Each event cell also shows the elapsed time spent executing it. This may be displayed in ms (milliseconds) or µ (microseconds).
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
Timing data and event names may not always fit on small cells. These can be revealed by hovering your mouse pointer over the cell.
|
|
42
|
+
|
|
43
|
+
## Drilling Down
|
|
44
|
+
|
|
45
|
+
It can be useful to zoom into particular parts of the call stack to examine the performance of certain functions more closely. Clicking on any event will expand it to the full width, allowing you to more clearly see the functions which it called.
|
|
46
|
+
|
|
47
|
+
<div class="video-container">
|
|
48
|
+
<video playsinline loop autoplay muted>
|
|
49
|
+
<source src="/assets/img/docs/flamegraph-6.mp4" type="video/mp4">
|
|
50
|
+
</video>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
You can also drill deeper into the Flame Graph using the zoom control on the right by clicking on the `+` and `-` controls, or by dragging the zoom bar. You can also zoom using your mouse wheel, and the graph will zoom towards the position of your mouse pointer.
|
|
54
|
+
|
|
55
|
+
<div class="video-container">
|
|
56
|
+
<video playsinline loop autoplay muted>
|
|
57
|
+
<source src="/assets/img/docs/flamegraph-2.mp4" type="video/mp4">
|
|
58
|
+
</video>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
AppMap filter settings also apply to Flame Graphs. For example, if you decide to hide calls to certain types of events (for example, by excluding calls to a logging package) those events will not appear in the Flame Graph.
|
|
62
|
+
|
|
63
|
+
## Switching to Other Views
|
|
64
|
+
|
|
65
|
+
While investigating an event in an application, you can also view the same event in the Sequence Diagram and Trace View diagrams. Click on the event in question, and then select either “Show in Sequence” or “Show in Trace”.
|
|
66
|
+
|
|
67
|
+
Similarly, you can select an event in a Sequence Diagram or Trace View and click “Show in Flame Graph” to see it displayed in a Flame Graph diagram.
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
## Identifying Performance Issues
|
|
72
|
+
|
|
73
|
+
Certain performance problems can be visually easier to spot with a Flame Graph.
|
|
74
|
+
|
|
75
|
+
#### Expensive functions and queries
|
|
76
|
+
|
|
77
|
+
Expensive functions are those that are slow due to them doing a lot of computation and not spending much time waiting on other functions to return. In the example graph shown below, the function at the bottom of the stack is spending most of its 15.1 milliseconds of time waiting for the functions and queries which it called to return. The most expensive area in this stack is therefore the SQL `SELECT` query at the top which takes 10.3 milliseconds. That query should likely be the focus of any performance optimization effort over the other functions and queries.
|
|
78
|
+
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
#### N+1 Queries
|
|
82
|
+
|
|
83
|
+
AppMap Analysis automatically detects [N+1 queries](/docs/reference/analysis-rules#n-plus-one-query), which are identical database queries called by the same parent function. In the example graph below, 60 repeated queries are visible at the top of the call stack.
|
|
84
|
+
|
|
85
|
+

|
|
86
|
+
|
|
87
|
+
#### Delays from external service calls
|
|
88
|
+
|
|
89
|
+
Performance problems can sometimes be caused by latency in external services. In the example graph below, the event in yellow represents a call to another service using HTTP. The call took 936 milliseconds to return, and only a few milliseconds more for the calling function to deal with that. Any optimization efforts for this area should therefore be spent in that other application, preferably by generating an AppMap for its `/users` API.
|
|
90
|
+
|
|
91
|
+

|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Diagrams
|
|
4
|
+
diagrams: true
|
|
5
|
+
name: How it works
|
|
6
|
+
step: 1
|
|
7
|
+
redirect_from: [/docs/how-to-use-appmap-diagrams.html, /docs/how-to-use-appmap-diagrams, /docs/diagrams/how-to-use-appmaps]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# How it works
|
|
11
|
+
|
|
12
|
+
AppMap records the behavior of running code into JSON files, and visualizes them in interactive diagrams right in your code editor.
|
|
13
|
+
|
|
14
|
+
{% include docs/how_it_works_illo.html %}
|
|
15
|
+
|
|
16
|
+
## AppMap agent records executing code as JSON files
|
|
17
|
+
Once your app is instrumented, the AppMap agent creates JSON files as you execute test cases, run sample programs, or perform interactive sessions with your app.
|
|
18
|
+
|
|
19
|
+
AppMap files can be most conveniently recorded from automated tests, but other methods of recording are preferred in certain situations, such as direct recording of code blocks or remote recording controlled with REST endpoints. [Learn more about Recording AppMaps](/docs/recording-methods).
|
|
20
|
+
|
|
21
|
+
## Quick search for HTTP routes, packages, classes, and functions in the left-hand navigation bar
|
|
22
|
+
|
|
23
|
+
Use the navigation bar for quick navigation to items of interest, for example, HTTP routes, labels, packages, classes, functions.
|
|
24
|
+
|
|
25
|
+
<div class="video-container">
|
|
26
|
+
<video playsinline loop autoplay muted>
|
|
27
|
+
<source src="/assets/img/docs/navigate-to-interest.mp4" type="video/mp4">
|
|
28
|
+
</video>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
## Use the filtering icon to reduce the number of objects in the AppMap view
|
|
32
|
+
|
|
33
|
+
Filter out items such as unlabeled code, specific classes or packages, external code, and more.
|
|
34
|
+
|
|
35
|
+
<div class="video-container">
|
|
36
|
+
<video playsinline loop autoplay muted>
|
|
37
|
+
<source src="/assets/img/docs/filter-appmaps.mp4" type="video/mp4">
|
|
38
|
+
</video>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
## Show more detailed statistics about your AppMap
|
|
42
|
+
|
|
43
|
+
Includes the frequency of specific function calls and the size represented within the AppMap. This is helpful when [handling large AppMaps](https://appmap.io/docs/guides/handling-large-appmaps.html) and to reduce their size.
|
|
44
|
+
|
|
45
|
+
<img src="/assets/img/docs/appmap-stats.webp"/>
|
|
46
|
+
|
|
47
|
+
## Expand and Collapse the Depth of Sequence Diagrams
|
|
48
|
+
|
|
49
|
+
This will hide or show all actions that are deeper in the call stack than the selected value, and will result in a more compact diagram. Actions can be expanded or collapsed with the `+` or `-` controls to change the depth of the calls shown within your sequence diagram.
|
|
50
|
+
|
|
51
|
+
<div class="video-container">
|
|
52
|
+
<video playsinline loop autoplay muted>
|
|
53
|
+
<source src="/assets/img/docs/sequence-diagram-expand.mp4" type="video/mp4">
|
|
54
|
+
</video>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
## Demo of using AppMaps
|
|
58
|
+
This video demonstrates how to use AppMap Diagrams when learning how unfamiliar code works:
|
|
59
|
+
|
|
60
|
+
<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="https://www.loom.com/embed/de75ba638d57418da2d42417936cdf95" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
|