@appland/appmap 3.146.0 → 3.147.1
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 +14 -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-docs.md +27 -0
- package/built/docs/community.md +28 -0
- package/built/docs/guides/exporting-appmap-diagrams.md +50 -0
- package/built/docs/guides/handling-large-appmap-diagrams.md +138 -0
- package/built/docs/guides/index.md +21 -0
- package/built/docs/guides/navigating-code-objects.md +67 -0
- package/built/docs/guides/openapi.md +105 -0
- package/built/docs/guides/reading-sql-in-appmap-diagrams.md +69 -0
- package/built/docs/guides/refine-appmap-data.md +186 -0
- package/built/docs/guides/reverse-engineering.md +377 -0
- package/built/docs/guides/runtime-code-review.md +111 -0
- package/built/docs/guides/using-appmap-analysis.md +206 -0
- package/built/docs/guides/using-appmap-diagrams.md +331 -0
- package/built/docs/integrations/atlassian-compass.md +25 -0
- package/built/docs/integrations/atlassian-confluence.md +51 -0
- package/built/docs/integrations/circle-ci.md +424 -0
- package/built/docs/integrations/docker.md +109 -0
- package/built/docs/integrations/github-actions.md +524 -0
- package/built/docs/integrations/index.md +20 -0
- package/built/docs/integrations/plantuml.md +66 -0
- package/built/docs/integrations/postman.md +30 -0
- package/built/docs/integrations/readme.md +39 -0
- package/built/docs/integrations/smartbear-swaggerhub.md +119 -0
- package/built/docs/reference/analysis-labels.md +49 -0
- package/built/docs/reference/analysis-rules.md +61 -0
- package/built/docs/reference/appmap-client-cli.md +628 -0
- package/built/docs/reference/appmap-gradle-plugin.md +141 -0
- package/built/docs/reference/appmap-java.md +311 -0
- package/built/docs/reference/appmap-maven-plugin.md +164 -0
- package/built/docs/reference/appmap-node.md +185 -0
- package/built/docs/reference/appmap-python.md +520 -0
- package/built/docs/reference/appmap-ruby.md +514 -0
- package/built/docs/reference/github-action.md +171 -0
- package/built/docs/reference/index.md +25 -0
- package/built/docs/reference/jetbrains.md +136 -0
- package/built/docs/reference/license-key-install.md +74 -0
- package/built/docs/reference/navie.md +261 -0
- package/built/docs/reference/remote-recording-api.md +97 -0
- package/built/docs/reference/uninstalling-appmap.md +119 -0
- package/built/docs/reference/vscode.md +122 -0
- package/built/docs/setup-appmap-in-ci/example-projects.md +21 -0
- package/built/docs/setup-appmap-in-ci/how-it-works.md +43 -0
- package/built/docs/setup-appmap-in-ci/in-circleci.md +423 -0
- package/built/docs/setup-appmap-in-ci/in-github-actions.md +177 -0
- package/built/docs/setup-appmap-in-ci/index.md +22 -0
- package/built/docs/setup-appmap-in-ci/matrix-builds.md +225 -0
- package/built/docs/setup-appmap-in-ci/troubleshooting.md +71 -0
- package/built/docs/setup-appmap-in-your-code-editor/add-appmap-to-your-code-editor.md +93 -0
- package/built/docs/setup-appmap-in-your-code-editor/appmap-analysis.md +77 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-from-tests.md +93 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-with-remote-recording.md +112 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-with-request-recording.md +77 -0
- package/built/docs/setup-appmap-in-your-code-editor/how-appmap-works.md +166 -0
- package/built/docs/setup-appmap-in-your-code-editor/index.md +25 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-appmap-diagrams.md +59 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-code-objects.md +67 -0
- package/built/docs/unused_for_now_index.html +11 -0
- package/built/rpc/explain/explain.js +13 -1
- package/built/rpc/explain/explain.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@appland/appmap-v3.147.1](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.147.0...@appland/appmap-v3.147.1) (2024-05-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* codeSelection is cached per-thread ([38dcb76](https://github.com/getappmap/appmap-js/commit/38dcb76b0a5e781c2227767146c93070666ab64b))
|
|
7
|
+
|
|
8
|
+
# [@appland/appmap-v3.147.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.146.0...@appland/appmap-v3.147.0) (2024-05-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Move help-related content to the Help agent exclusively ([2274b8c](https://github.com/getappmap/appmap-js/commit/2274b8c14a348e0271e1159d9baa7e1c909d7c0b))
|
|
14
|
+
|
|
1
15
|
# [@appland/appmap-v3.146.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.145.0...@appland/appmap-v3.146.0) (2024-05-21)
|
|
2
16
|
|
|
3
17
|
|
|
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,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
toc: true
|
|
4
|
+
title: Docs - AppMap Docs
|
|
5
|
+
description: "Explore AppMap, and AppMap Navie AI, an open-source code analysis and AI assistant that capturing code execution traces as interactive diagrams and powers runtime context for AI code generation."
|
|
6
|
+
redirect_from: [/docs, /docs/faq, /docs/appmap-overview]
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
# AppMap Docs
|
|
10
|
+
|
|
11
|
+
AppMap is a developer tools platform powered by runtime analysis and AI. It's composed of three components:
|
|
12
|
+
|
|
13
|
+
* Navie - AI code architect.
|
|
14
|
+
* AppMap data - Runtime traces of your application runtime.
|
|
15
|
+
* AppMap diagrams - Interactive visualizations of AppMap data.
|
|
16
|
+
|
|
17
|
+
By using AppMap data, Navie is the first AI code architect with the context to understand how your app works when it runs, like a principal engineer or software architect. AppMap data provides Navie with accurate information about application behavior, APIs, database queries, and more, providing valuable context so you can ask more challenging questions and get better answers.
|
|
18
|
+
|
|
19
|
+
Over 90,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).
|
|
20
|
+
|
|
21
|
+
<a class="btn btn-primary btn-lg" href="/docs/get-started-with-appmap/">Get Started with AppMap</a>
|
|
22
|
+
|
|
23
|
+
{% include docs/app_framework_logos.html %}
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
_AppMap dependency map in Visual Studio Code_
|
|
27
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
toc: true
|
|
4
|
+
title: Docs - Community
|
|
5
|
+
description: "Join AppMap's vibrant community on Slack for discussions, issue reporting, and become a contributor."
|
|
6
|
+
redirect_from: [/docs/troubleshooting]
|
|
7
|
+
---
|
|
8
|
+
# Community
|
|
9
|
+
|
|
10
|
+
## Forum
|
|
11
|
+
[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 AppMap Diagrams with people who code in your language.
|
|
12
|
+
|
|
13
|
+
## Reporting problems
|
|
14
|
+
[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.
|
|
15
|
+
|
|
16
|
+
## Open source
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
### Become a contributor
|
|
20
|
+
- [Join us on Slack](https://appmap.io/slack) and discuss the best assignment to start with
|
|
21
|
+
- 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)
|
|
22
|
+
- Accept the [CLA](/docs/CLA%20Instructions.pdf)
|
|
23
|
+
- Review and observe our [Code of Conduct](/docs/Code%20of%20Conduct%20for%20Contributors.pdf)
|
|
24
|
+
- Develop and have fun with us
|
|
25
|
+
|
|
26
|
+
### Projects
|
|
27
|
+
- [AppMap framework](https://github.com/getappmap/appmap)
|
|
28
|
+
- [AppMap client agents and code editor plugins](https://github.com/getappmap)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Guides
|
|
4
|
+
description: "Learn how to export your AppMap Diagrams into raw JSON format, SVG formats, and into 3rd party documentation tools like Confluence"
|
|
5
|
+
guides: true
|
|
6
|
+
name: Exporting AppMap Diagrams
|
|
7
|
+
step: 4
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Exporting AppMap Diagrams <!-- omit in toc -->
|
|
11
|
+
|
|
12
|
+
After generating AppMap Data, you can view this data inside your Code Editor. But you may also want to share this data with other members of your team. This document will describe the options available for exporting AppMap Diagrams.
|
|
13
|
+
|
|
14
|
+
- [Export to JSON](#export-to-json)
|
|
15
|
+
- [Export to SVG (Sequence Diagrams Only)](#export-to-svg-sequence-diagrams-only)
|
|
16
|
+
- [Export to Atlassian Confluence](#export-to-atlassian-confluence)
|
|
17
|
+
|
|
18
|
+
## Export to JSON
|
|
19
|
+
|
|
20
|
+
The AppMap Diagram is a visual representation of the AppMap Data generated from your application. It is based on the open source [AppMap Data Specification](https://github.com/getappmap/appmap). You can export your AppMap Data into this raw data format to share with other users. When a user opens this `json` file in a code editor with the AppMap plugin installed, it will be rendered into the AppMap Visualizations.
|
|
21
|
+
|
|
22
|
+
To export your AppMap Data into `json` , open your AppMap Diagram, and select the `Export` icon in the upper right corner of the AppMap.
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
Select the `JSON` option for export. This will open your local system's file explorer to the file containing the raw AppMap data.
|
|
27
|
+
|
|
28
|
+
## Export to SVG (Sequence Diagrams Only)
|
|
29
|
+
|
|
30
|
+
SVG (Scalable Vector Graphics) is an XML-based vector image format for defining two-dimensional graphics. AppMap utilizes this format to export Sequence Diagrams of your AppMap Diagram which can be viewed inside of any modern web browser.
|
|
31
|
+
|
|
32
|
+
To export your Sequence Diagram into SVG, open your AppMap Diagram, and select the `Export` icon in the upper right corner of the AppMap.
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
Select the `SVG` option for export. This will convert your AppMap Sequence Diagram into an SVG file and open it as a new file within your code editor.
|
|
37
|
+
|
|
38
|
+

|
|
39
|
+
|
|
40
|
+
Save the open file with an `.svg` extension and then open it in a web browser to view your AppMap Sequence Diagram.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
## Export to Atlassian Confluence
|
|
45
|
+
|
|
46
|
+
AppMap integrates with [Confluence](https://www.atlassian.com/software/confluence), the popular corporate wiki developed by the Atlassian.
|
|
47
|
+
|
|
48
|
+
Confluence facilitates robust documentation and knowledge sharing. AppMap automatically generates interactive software diagrams from run-time data, ensuring an accurate and up-to-date understanding of code architecture and behavior. This integration leverages the strengths of both platforms enabling teams to better understand, document, and collaborate on their software projects.
|
|
49
|
+
|
|
50
|
+
Refer to the [AppMap Confluence integration docs](/docs/integrations/atlassian-confluence) to learn how to configure the AppMap Confluence App to support adding interactive AppMap Diagrams to Confluence documents.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Guides
|
|
4
|
+
description: "Learn how to manage large AppMap Diagrams effectively. Discover tips to handle AppMap Data over 10 MB and 200 MB in size, focusing on optimizing AppMap Data for better interpretation and performance."
|
|
5
|
+
guides: true
|
|
6
|
+
name: Handling Large AppMap Diagrams
|
|
7
|
+
step: 4
|
|
8
|
+
redirect_from: [/docs/reference/handling-large-appmaps, /docs/guides/handling-large-appmaps]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Handling Large AppMap Diagrams <!-- omit in toc -->
|
|
12
|
+
|
|
13
|
+
Some AppMap Diagrams contain too much data and can be difficult to review. Often, these diagrams have many repetitive function calls that add a lot of data to the file, but don't add much value when interpreting the AppMap. Large AppMap Diagrams are a potential indication that you should change how you're recording by filtering out less valuable information. For example, you could exclude some calls to logging functions, or record fewer endpoints when manually recording.
|
|
14
|
+
|
|
15
|
+
- [AppMap Diagrams Over 10 MB](#appmap-diagrams-over-10-mb)
|
|
16
|
+
- [AppMap Diagrams Over 200 MB](#appmap-diagrams-over-200-mb)
|
|
17
|
+
- [Handle Large AppMap Diagrams in the CLI](#handle-large-appmap-diagrams-in-the-cli)
|
|
18
|
+
- [Video Tutorial](#video-tutorial)
|
|
19
|
+
|
|
20
|
+
## AppMap Diagrams Over 10 MB
|
|
21
|
+
|
|
22
|
+
When you attempt to open an AppMap in a code editor extension that is over 10 MB, it will be automatically pruned down to ~10 MB. The most frequently called functions will be removed until the file is below 10 MB in size. (Don't worry, the file will remain untouched because the pruning is done in memory). You will see notifications within the AppMap informing you that it has been pruned, and the pruned functions will be highlighted in the Stats panel:
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
The automatic pruning might be sufficient, but if you want more control over what events are removed, you have two options:
|
|
27
|
+
|
|
28
|
+
1. [Use the `prune` CLI command to remove events from an existing AppMap](/docs/reference/appmap-client-cli.html#prune)
|
|
29
|
+
2. Change the configuration of your `appmap.yml` to exclude certain events when an AppMap is generated
|
|
30
|
+
* [Configure exclusions in a Ruby project](/docs/reference/appmap-ruby.html#configuration)
|
|
31
|
+
* [Configure exclusions in a Java project](/docs/reference/appmap-java.html#configuration)
|
|
32
|
+
* [Configure exclusions in a Python project](/docs/reference/appmap-python.html#configuration)
|
|
33
|
+
* [Configure exclusions in a Node.js project](/docs/reference/appmap-node.html#configuration)
|
|
34
|
+
|
|
35
|
+
## AppMap Diagrams Over 200 MB
|
|
36
|
+
|
|
37
|
+
When an AppMap Diagram is over 200 MB, we will **not** open it in the code editor extension because it could cause performance issues on your computer. Instead, we generate statistics about your AppMap and open the Stats panel. Use this information to configure your `appmap.yml` to exclude these functions (see below). The next time that you generate your AppMap, it will be smaller because it will not contain the specified functions:
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
* [Configure exclusions in a Ruby project](/docs/reference/appmap-ruby.html#configuration)
|
|
42
|
+
* [Configure exclusions in a Java project](/docs/reference/appmap-java.html#configuration)
|
|
43
|
+
* [Configure exclusions in a Python project](/docs/reference/appmap-python.html#configuration)
|
|
44
|
+
* [Configure exclusions in a Node.js project](/docs/reference/appmap-node.html#configuration)
|
|
45
|
+
|
|
46
|
+
We do not recommend using the `prune` CLI command for AppMap Diagrams over 200 MB, because it loads the entire AppMap into memory, which may cause performance issues for your computer.
|
|
47
|
+
|
|
48
|
+
## Handle Large AppMap Diagrams in the CLI
|
|
49
|
+
|
|
50
|
+
For some AppMap Diagrams that are extraordinarily large, you may notice issues opening them in your code editor.
|
|
51
|
+
In this scenario, you can use the AppMap CLI to analyze the statistics of the offending AppMap if you are unable to see the
|
|
52
|
+
statistics in your code editor.
|
|
53
|
+
|
|
54
|
+
You can then use the details from the `stats` command on the large AppMap to properly exclude functions that are noisy and may not provide any
|
|
55
|
+
useful insights (for example getters and setters).
|
|
56
|
+
|
|
57
|
+
Here's how it works.
|
|
58
|
+
|
|
59
|
+
In this example, we have a specific test in our Python Django application that is generating a very large (over 1GB) AppMap.
|
|
60
|
+
We'll use the AppMap CLI to get information about the nosiest functions that we can exclude from a future AppMap recording.
|
|
61
|
+
|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
First, you'll need to ensure you have the AppMap CLI binaries installed on your machine.
|
|
65
|
+
If you have already installed the AppMap code editor plugin for JetBrains or VS Code, the binaries will already exist
|
|
66
|
+
in your `$HOME/.appmap/bin` directory.
|
|
67
|
+
|
|
68
|
+
Otherwise, you can download the latest version of AppMap binaries on [GitHub following this guide.](/docs/reference/appmap-client-cli.html#install-appmap-cli-precompiled-binary)
|
|
69
|
+
|
|
70
|
+
With your binary installed. We'll run the following command to analyze the large AppMap to identify noisy functions to exclude.
|
|
71
|
+
|
|
72
|
+
For more details about how the AppMap CLI works and the stats command, refer to the [AppMap reference guide.](/docs/reference/appmap-client-cli.html#stats)
|
|
73
|
+
|
|
74
|
+
In our command below, we'll run the stats command pointing to the directory where the AppMap lives,
|
|
75
|
+
and the name of the appmap (the file extension `.appmap.json` can be optionally added or omitted).
|
|
76
|
+
|
|
77
|
+
```console
|
|
78
|
+
$ appmap stats <directory containing AppMap Data> --appmap-file <name of the AppMap Data file>
|
|
79
|
+
```
|
|
80
|
+
{: .example-code}
|
|
81
|
+
|
|
82
|
+
For example:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
$ appmap stats tmp/appmap/pytest --appmap-file tests_integration_catalogue_test_category_TestMovingACategory_test_fix_tree.appmap.json
|
|
86
|
+
Analyzing AppMap: tmp/appmap/pytest/tests_integration_catalogue_test_category_TestMovingACategory_test_fix_tree.appmap.json
|
|
87
|
+
|
|
88
|
+
1. function:oscar/apps/catalogue/abstract_models/AbstractCategory#get_ancestors_and_self
|
|
89
|
+
count: 1526529
|
|
90
|
+
estimated size: 572.2 MB
|
|
91
|
+
|
|
92
|
+
2. function:oscar/apps/catalogue/abstract_models/AbstractCategory.fix_tree
|
|
93
|
+
count: 1
|
|
94
|
+
estimated size: 583.0 bytes
|
|
95
|
+
|
|
96
|
+
3. function:oscar/apps/catalogue/abstract_models/AbstractCategory#set_ancestors_are_public
|
|
97
|
+
count: 1
|
|
98
|
+
estimated size: 368.0 bytes
|
|
99
|
+
```
|
|
100
|
+
{: .example-code}
|
|
101
|
+
|
|
102
|
+
In our example the `get_ancestors_and_self` function in the `AbstractCategory` class is
|
|
103
|
+
the single largest offender and the main cause of the large appmap.
|
|
104
|
+
|
|
105
|
+
We will now add an exclusion for this function in our `appmap.yml` configuration file.
|
|
106
|
+
|
|
107
|
+
To learn how to add an exclusion to your project refer to the documentation below.
|
|
108
|
+
|
|
109
|
+
* [Configure exclusions in a Ruby project](/docs/reference/appmap-ruby.html#configuration)
|
|
110
|
+
* [Configure exclusions in a Java project](/docs/reference/appmap-java.html#configuration)
|
|
111
|
+
* [Configure exclusions in a Python project](/docs/reference/appmap-python.html#configuration)
|
|
112
|
+
* [Configure exclusions in a Node.js project](/docs/reference/appmap-node.html#configuration)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
In this example we'll exclude the `apps.catalogue.abstract_models.AbstractCategory.get_ancestors_and_self` function from
|
|
116
|
+
our main `oscar` python package.
|
|
117
|
+
|
|
118
|
+
My updated `appmap.yml` now looks like this:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
appmap_dir: tmp/appmap
|
|
122
|
+
language: python
|
|
123
|
+
name: django-oscar
|
|
124
|
+
packages:
|
|
125
|
+
- path: sandbox
|
|
126
|
+
- path: oscar
|
|
127
|
+
exclude:
|
|
128
|
+
- apps.catalogue.abstract_models.AbstractCategory.get_ancestors_and_self
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Now if I run my tests again, this noisy function will no longer be included within the AppMap and the size of the file will
|
|
132
|
+
be significantly reduced.
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
136
|
+
### Video Tutorial
|
|
137
|
+
|
|
138
|
+
{% include vimeo.html id='931215155' %}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - How-To Guides
|
|
4
|
+
description: "Learn how to leverage AppMap effectively with guides on handling large AppMap Diagrams, reading SQL, refining, generating OpenAPI, reverse engineering, and more."
|
|
5
|
+
step: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# How-To Guides
|
|
9
|
+
|
|
10
|
+
These guide contain in-depth information on how to use AppMap for different use cases and scenarios.
|
|
11
|
+
|
|
12
|
+
- [Using AppMap Diagrams](/docs/guides/using-appmap-diagrams)
|
|
13
|
+
- [Navigating Code Objects](/docs/guides/navigating-code-objects)
|
|
14
|
+
- [Exporting AppMap Diagrams](/docs/guides/exporting-appmap-diagrams)
|
|
15
|
+
- [Handling Large AppMap Diagrams](/docs/guides/handling-large-appmap-diagrams)
|
|
16
|
+
- [Reading SQL in AppMap Diagrams](/docs/guides/reading-sql-in-appmap-diagrams)
|
|
17
|
+
- [Refining AppMap Data](/docs/guides/refine-appmap-data)
|
|
18
|
+
- [Generating OpenAPI Definitions](/docs/guides/openapi)
|
|
19
|
+
- [Using AppMap Analysis](/docs/guides/using-appmap-analysis)
|
|
20
|
+
- [Reverse Engineering with AppMap](/docs/guides/reverse-engineering)
|
|
21
|
+
- [Understanding the Runtime Code Review Report](/docs/guides/runtime-code-review)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Guides
|
|
4
|
+
description: "Explore AppMap's Code Objects view to navigate code functions, HTTP requests, and SQL queries across all AppMap Diagrams."
|
|
5
|
+
guides: true
|
|
6
|
+
name: Navigating Code Objects
|
|
7
|
+
step: 3
|
|
8
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/navigating-code-objects, /docs/setup-appmap-in-your-code-editor/navigating-code-objects]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Navigating Code Objects
|
|
12
|
+
{% include vimeo.html id='916048582' %}
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**In this video**
|
|
17
|
+
Dive into the Code objects view, a high level view of code functions, HTTP requests, and SQL queries across the entire set of your AppMap Diagrams and learn how to locate and navigate to an AppMap from code reference pins on your code functions.
|
|
18
|
+
|
|
19
|
+
**Links mentioned**
|
|
20
|
+
[Rails Sample Application](https://github.com/land-of-apps/sample_app_6th_ed/tree/codespaces-devcontainer)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
## Follow along
|
|
24
|
+
|
|
25
|
+
Welcome to AppMap, In this tutorial we will be diving into advanced navigation of AppMap Diagrams - the Code Objects view. We’ll answer the question, “What if I have a lot of AppMap Diagrams and I don’t know where exactly to look?”
|
|
26
|
+
|
|
27
|
+
In this view, we collect all the different code functions and HTTP server requests and SQL queries all into one list. Every request, query, and function call that occurs anywhere in the whole set of AppMap Diagrams will be in this list.
|
|
28
|
+
|
|
29
|
+
## Code Objects View
|
|
30
|
+
|
|
31
|
+
There are three sections to the Code Objects view. The first section is the Code view, this will show packages, classes, and functions, it will show the framework code as well as my code, essentially everything present within your AppMap Diagrams. We can click on a function to navigate directly to the code. In this example, I’ll navigate to my Application controllers, and view the Microposts controller. This will take me directly to the code for this function. This is a great way to see more comprehensively what you have across your code base.
|
|
32
|
+
|
|
33
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-objects-view.webp"/>
|
|
34
|
+
|
|
35
|
+
## HTTP Routes List
|
|
36
|
+
|
|
37
|
+
In the HTTP Service request list, you can see basically a mini spec file showing you what routes are available across all of your AppMap Diagrams.
|
|
38
|
+
|
|
39
|
+
If this route only exists in a single AppMap, you’ll be taken directly to the AppMap for this request, but if the route exists in multiple diagrams you’ll get a VScode picker to choose which one to open.
|
|
40
|
+
|
|
41
|
+
Here is this route, and here it is shown in a trace view, and you’ll see the status code for that is 302 which is a redirect.
|
|
42
|
+
|
|
43
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-objects-trace-view.webp"/>
|
|
44
|
+
|
|
45
|
+
## SQL Query List
|
|
46
|
+
|
|
47
|
+
The final section of Code Objects is a list of all the SQL queries across your AppMap Diagrams. Just like before, if you click into it and it is unique across your AppMap set then you’ll be sent directly to the AppMap or the quick picker will prompt you to open one.
|
|
48
|
+
|
|
49
|
+
The code view is a handy way to navigate your code base, similar to the file view you’d get in VS Code except this code view will only show the code that participated in your test case recordings or remote recordings.
|
|
50
|
+
|
|
51
|
+
But it’s more common to simply be navigating within the code itself. So what if you want to get to the AppMap Diagram from within the code?
|
|
52
|
+
|
|
53
|
+
## Opening AppMap Diagrams from code object names
|
|
54
|
+
|
|
55
|
+
The command “Open code object in AppMap” can be used to find and open all the AppMap Diagrams that contain a particular code object (package, class, or function name).
|
|
56
|
+
|
|
57
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-object-command-palette.webp"/>
|
|
58
|
+
|
|
59
|
+
To get here in VS Code open the command palette.
|
|
60
|
+
|
|
61
|
+
On Mac:
|
|
62
|
+
`Shift + Command + P`
|
|
63
|
+
|
|
64
|
+
On Windows/Linux:
|
|
65
|
+
`Ctrl + Shift + P`
|
|
66
|
+
|
|
67
|
+
I can then search for the `UsersController#show` function - if it's in a single AppMap I’ll get taken directly to that AppMap. If it exists in more than one you’ll get the quick picker to choose which one you want.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Guides
|
|
4
|
+
description: "Use AppMap to auto generate OpenAPI definitions and document HTTP APIs. AppMap captures runtime behavior, creating accurate API schemas effortlessly."
|
|
5
|
+
guides: true
|
|
6
|
+
name: Generating OpenAPI Definitions
|
|
7
|
+
step: 7
|
|
8
|
+
redirect_from: [/docs/openapi,/docs/openapi/features,/docs/openapi/code-editor-extensions,/docs/openapi/integrations,/docs/openapi/customization,/docs/reference/openapi]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Generating OpenAPI Definitions <!-- omit in toc -->
|
|
13
|
+
|
|
14
|
+
> "The OpenAPI specification, which is formerly known as Swagger Specification, is a community-driven open standard, programming language-agnostic interface description for HTTP APIs. This allows both humans and computers to discover and understand the capabilities of a service without requiring access to the source code."
|
|
15
|
+
|
|
16
|
+
Because AppMap records your code's runtime behavior, it can see and record all of the HTTP API calls processed including the schema of each request and response. Creating OpenAPI definitions by hand is error prone and time consuming. Keeping them up to date is additional work that quickly falls out of sync with the code. Using the AppMap we can automatically output OpenAPI definitions for an application.
|
|
17
|
+
|
|
18
|
+
- [Requirements](#requirements)
|
|
19
|
+
- [Schema](#schema)
|
|
20
|
+
- [Use Cases](#use-cases)
|
|
21
|
+
- [Pull Request Review](#pull-request-review)
|
|
22
|
+
- [Update Documentation Automatically](#update-documentation-automatically)
|
|
23
|
+
- [Send to 3rd Party Services](#send-to-3rd-party-services)
|
|
24
|
+
- [Generating definitions](#generating-definitions)
|
|
25
|
+
- [Integrations](#integrations)
|
|
26
|
+
- [Customization](#customization)
|
|
27
|
+
- [Operation `summary`](#operation-summary)
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
1. AppMap Data generated from your application that includes calls to your API endpoints. (Refer to the AppMap documentation on [how to record your application](/docs/recording-methods))
|
|
32
|
+
2. The latest version of the [AppMap binaries downloaded.](https://github.com/getappmap/appmap-js/releases?q=@appland/appmap*&expanded=true) (For the CLI usage)
|
|
33
|
+
3. The latest version of the AppMap code editor extension (for code editor usage)
|
|
34
|
+
|
|
35
|
+
## Schema
|
|
36
|
+
|
|
37
|
+
The generated OpenAPI schema only includes information (paths, methods, status codes, parameters, responses, headers, security) that have actually been observed in the AppMap Data. So, if a particular code behavior has not been observed by AppMap, it won't be present in the OpenAPI.
|
|
38
|
+
|
|
39
|
+
When AppMap Data is collected by running test cases, the generated OpenAPI will reflect the code coverage of the application with regard to its APIs. If an expected path, method, status or parameter is not observed in the generated OpenAPI, you'll know it's missing because it's not tested.
|
|
40
|
+
|
|
41
|
+
Object schema is inferred from runtime data. When there are many examples of a request, the inferred schema of all the examples is merged into one unified schema.
|
|
42
|
+
|
|
43
|
+
Both request and response schema are available.
|
|
44
|
+
|
|
45
|
+
## Use Cases
|
|
46
|
+
|
|
47
|
+
### Pull Request Review
|
|
48
|
+
|
|
49
|
+
We suggest you generate OpenAPI for all new work, and commit the _openapi.yaml_ file to source control. When a pull request contains API changes, a diff view of the OpenAPI changes is a very useful way for code reviewers to quickly get the "big picture" of the new branch.
|
|
50
|
+
|
|
51
|
+
### Update Documentation Automatically
|
|
52
|
+
|
|
53
|
+
By generating OpenAPI definitions as part of your continuous integration process, you can ensure that your documentation continually updates automatically as the code updates. This reduces unnecessary engineering toil working to keep documentation up to date manually.
|
|
54
|
+
|
|
55
|
+
### Send to 3rd Party Services
|
|
56
|
+
|
|
57
|
+
Integrate AppMap OpenAPI generation with various 3rd party services to share OpenAPI documentation with your end users or validate and diff changes over time. [Refer to the documentation](/docs/integrations/) to learn how to incorporate AppMap OpenAPI generation with various 3rd party services.
|
|
58
|
+
|
|
59
|
+
## Generating definitions
|
|
60
|
+
|
|
61
|
+
* [AppMap extension for VSCode](/docs/reference/vscode.html#generate-openapi-definitions)
|
|
62
|
+
* [AppMap extension for JetBrains](/docs/reference/jetbrains.html#generate-openapi-definitions)
|
|
63
|
+
* [AppMap CLI](/docs/reference/appmap-client-cli.html#openapi)
|
|
64
|
+
|
|
65
|
+
## Integrations
|
|
66
|
+
|
|
67
|
+
Refer to the AppMap [integrations documentation](/docs/integrations/) to learn more about how to integrate your OpenAPI documentation with other 3rd party software and services.
|
|
68
|
+
|
|
69
|
+
## Customization
|
|
70
|
+
|
|
71
|
+
### Operation `summary`
|
|
72
|
+
|
|
73
|
+
To populate [`operation.summary`](https://swagger.io/specification/#operation-object), set the header `X-OpenAPI-Summary` in your response.
|
|
74
|
+
|
|
75
|
+
**Example**
|
|
76
|
+
|
|
77
|
+
_Ruby on Rails Controller_
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
class AccountActivationsController < ApplicationController
|
|
81
|
+
def edit
|
|
82
|
+
response.headers['X-OpenAPI-Summary'] = 'Activate the account of an existing user'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
_openapi.yaml_
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
/account_activations/{id}/edit:
|
|
89
|
+
get:
|
|
90
|
+
responses:
|
|
91
|
+
'302':
|
|
92
|
+
content: {}
|
|
93
|
+
description: Found
|
|
94
|
+
parameters:
|
|
95
|
+
- name: email
|
|
96
|
+
in: query
|
|
97
|
+
schema:
|
|
98
|
+
type: string
|
|
99
|
+
- name: id
|
|
100
|
+
in: path
|
|
101
|
+
schema:
|
|
102
|
+
type: string
|
|
103
|
+
required: true
|
|
104
|
+
summary: Activate the account of an existing user
|
|
105
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Guides
|
|
4
|
+
description: "Discover SQL commands in AppMap Diagrams to analyze application logic's database interactions, spot inefficiencies, and understand code impacts for improved performance and reliability."
|
|
5
|
+
guides: true
|
|
6
|
+
name: Reading SQL in AppMap Diagrams
|
|
7
|
+
step: 5
|
|
8
|
+
redirect_from: [/docs/guides/reading-sql-in-appmaps]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Reading SQL in AppMap Diagrams
|
|
12
|
+
The AppMap extension for your editor displays SQL commands in AppMap Diagrams so you can understand how your application logic interacts with the database. You can quickly discover SQL inefficiencies and anti-patterns that pose hidden scalability and reliability risks even if your application seems to be working well.
|
|
13
|
+
|
|
14
|
+
With the AppMap extension, not only are trips to database logs no longer required to see the SQL commands, but the SQL commands are also directly linked to the code that initiates their execution, helping developers understand the direct impacts of their code updates on database operations and performance.
|
|
15
|
+
|
|
16
|
+
### View all SQL commands, pick a command of interest, and drill down to details
|
|
17
|
+
When you open an AppMap, the navigation bar lists all captured SQL commands. This is a great starting point for your SQL investigation:
|
|
18
|
+
- Browse the list of SQL commands, pick a command, and click on it to drill down to details
|
|
19
|
+
- View the SQL command in the Trace to see how it is connected to upstream/downstream code and other SQL commands
|
|
20
|
+
- Click on the Caller link to see the function call that initiated the command’s execution.
|
|
21
|
+
|
|
22
|
+
<div class="video-container">
|
|
23
|
+
<video playsinline loop autoplay muted>
|
|
24
|
+
<source src="/assets/img/docs/view-all-sql-commands.mp4" type="video/mp4">
|
|
25
|
+
</video>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
### Search for specific SQL commands/tables/columns
|
|
29
|
+
Use the search box in the Navigation bar to select for a specific subset of SQL Commands:
|
|
30
|
+
- Search for a specific SQL command such as SELECT, UPDATE, INSERT, etc.
|
|
31
|
+
- Search for a table or column name
|
|
32
|
+
- Use regular expressions for complex searches, filtering the results by multiple criteria, for example, `SELECT.*_orders.*`
|
|
33
|
+
|
|
34
|
+
<div class="video-container">
|
|
35
|
+
<video playsinline loop autoplay muted>
|
|
36
|
+
<source src="/assets/img/docs/search-for-specific-sql-commands.mp4" type="video/mp4">
|
|
37
|
+
</video>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
### View SQL commands executed by a specific class or package
|
|
41
|
+
When you click on a dependency link in the Dependency Map, the navigation bar will list events specific to that relationship.
|
|
42
|
+
- Select a link between the database icon and a class to see SQL commands executed by functions of that class
|
|
43
|
+
- Click on a SQL command to drill down to details.
|
|
44
|
+
|
|
45
|
+
<div class="video-container">
|
|
46
|
+
<video playsinline loop autoplay muted>
|
|
47
|
+
<source src="/assets/img/docs/view-specific-sql-executed-by-class.mp4" type="video/mp4">
|
|
48
|
+
</video>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
### Spot complex SQL patterns
|
|
52
|
+
When investigating how efficiently the application code or the ORM utilizes the database, it’s helpful to see whether multiple SQL commands are clustered together and whether they form any specific (anti-)patterns. The Trace view is a great visual tool for spotting clusters and repetitions of SQL commands enveloped by code that are difficult to discover using database logs or other simple tools.
|
|
53
|
+
- In the AppMap, switch to the Trace view
|
|
54
|
+
- Start with any of the SQL commands in the navigation bar and investigate how they are connected with other SQL commands or code blocks
|
|
55
|
+
- When looking for N+1-like patterns, look for repetitive SQL `SELECT`s fetching single records using a specific ID
|
|
56
|
+
- Use the zoom controls, arrow keys, panning, and expand/collapse functions to navigate around the trace efficiently.
|
|
57
|
+
|
|
58
|
+
#### Navigate the trace efficiently
|
|
59
|
+
<div class="video-container">
|
|
60
|
+
<video playsinline loop autoplay muted>
|
|
61
|
+
<source src="/assets/img/docs/navigate-the-trace-efficiently.mp4" type="video/mp4">
|
|
62
|
+
</video>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Example: How to spot and fix Django ORM anti-patterns
|
|
67
|
+
In this video example, you can learn how to optimize Django ORM by seeing how it makes SQL queries under the hood. The video explains the role of ORM in modern applications, SQL efficiency challenges, and how to use AppMap for uncovering and fixing the infamous N+1 anti-pattern
|
|
68
|
+
|
|
69
|
+
<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="https://www.loom.com/embed/3872950e96174da4a714211b2af7f56e" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
|