@appland/appmap 3.146.0 → 3.147.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/built/docs/CLA Instructions.pdf +0 -0
  3. package/built/docs/Code of Conduct for Contributors.pdf +0 -0
  4. package/built/docs/analysis/rules-reference.html +27 -0
  5. package/built/docs/appmap-docs.md +27 -0
  6. package/built/docs/community.md +28 -0
  7. package/built/docs/guides/exporting-appmap-diagrams.md +50 -0
  8. package/built/docs/guides/handling-large-appmap-diagrams.md +138 -0
  9. package/built/docs/guides/index.md +21 -0
  10. package/built/docs/guides/navigating-code-objects.md +67 -0
  11. package/built/docs/guides/openapi.md +105 -0
  12. package/built/docs/guides/reading-sql-in-appmap-diagrams.md +69 -0
  13. package/built/docs/guides/refine-appmap-data.md +186 -0
  14. package/built/docs/guides/reverse-engineering.md +377 -0
  15. package/built/docs/guides/runtime-code-review.md +111 -0
  16. package/built/docs/guides/using-appmap-analysis.md +206 -0
  17. package/built/docs/guides/using-appmap-diagrams.md +331 -0
  18. package/built/docs/integrations/atlassian-compass.md +25 -0
  19. package/built/docs/integrations/atlassian-confluence.md +51 -0
  20. package/built/docs/integrations/circle-ci.md +424 -0
  21. package/built/docs/integrations/docker.md +109 -0
  22. package/built/docs/integrations/github-actions.md +524 -0
  23. package/built/docs/integrations/index.md +20 -0
  24. package/built/docs/integrations/plantuml.md +66 -0
  25. package/built/docs/integrations/postman.md +30 -0
  26. package/built/docs/integrations/readme.md +39 -0
  27. package/built/docs/integrations/smartbear-swaggerhub.md +119 -0
  28. package/built/docs/reference/analysis-labels.md +49 -0
  29. package/built/docs/reference/analysis-rules.md +61 -0
  30. package/built/docs/reference/appmap-client-cli.md +628 -0
  31. package/built/docs/reference/appmap-gradle-plugin.md +141 -0
  32. package/built/docs/reference/appmap-java.md +311 -0
  33. package/built/docs/reference/appmap-maven-plugin.md +164 -0
  34. package/built/docs/reference/appmap-node.md +185 -0
  35. package/built/docs/reference/appmap-python.md +520 -0
  36. package/built/docs/reference/appmap-ruby.md +514 -0
  37. package/built/docs/reference/github-action.md +171 -0
  38. package/built/docs/reference/index.md +25 -0
  39. package/built/docs/reference/jetbrains.md +136 -0
  40. package/built/docs/reference/license-key-install.md +74 -0
  41. package/built/docs/reference/navie.md +261 -0
  42. package/built/docs/reference/remote-recording-api.md +97 -0
  43. package/built/docs/reference/uninstalling-appmap.md +119 -0
  44. package/built/docs/reference/vscode.md +122 -0
  45. package/built/docs/setup-appmap-in-ci/example-projects.md +21 -0
  46. package/built/docs/setup-appmap-in-ci/how-it-works.md +43 -0
  47. package/built/docs/setup-appmap-in-ci/in-circleci.md +423 -0
  48. package/built/docs/setup-appmap-in-ci/in-github-actions.md +177 -0
  49. package/built/docs/setup-appmap-in-ci/index.md +22 -0
  50. package/built/docs/setup-appmap-in-ci/matrix-builds.md +225 -0
  51. package/built/docs/setup-appmap-in-ci/troubleshooting.md +71 -0
  52. package/built/docs/setup-appmap-in-your-code-editor/add-appmap-to-your-code-editor.md +93 -0
  53. package/built/docs/setup-appmap-in-your-code-editor/appmap-analysis.md +77 -0
  54. package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-from-tests.md +93 -0
  55. package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-with-remote-recording.md +112 -0
  56. package/built/docs/setup-appmap-in-your-code-editor/generate-appmap-data-with-request-recording.md +77 -0
  57. package/built/docs/setup-appmap-in-your-code-editor/how-appmap-works.md +166 -0
  58. package/built/docs/setup-appmap-in-your-code-editor/index.md +25 -0
  59. package/built/docs/setup-appmap-in-your-code-editor/navigating-appmap-diagrams.md +59 -0
  60. package/built/docs/setup-appmap-in-your-code-editor/navigating-code-objects.md +67 -0
  61. package/built/docs/unused_for_now_index.html +11 -0
  62. package/package.json +2 -2
@@ -0,0 +1,524 @@
1
+ ---
2
+ layout: docs
3
+ title: Docs - Integrations
4
+ description: "Use AppMap Analysis within GitHub Actions to analyze behavioral changes per Pull Request. It offers root cause analysis, API changes tracking, security and performance findings, and more."
5
+ integrations: true
6
+ name: GitHub Actions
7
+ step: 2
8
+ redirect_from: [/docs/setup-appmap-in-ci, /docs/setup-appmap-in-ci/how-it-works, /docs/setup-appmap-in-ci/in-github-actions, /docs/setup-appmap-in-ci/example-projects, /docs/setup-appmap-in-ci/matrix-builds, /docs/setup-appmap-in-ci/troubleshooting]
9
+ render_with_liquid: false
10
+ ---
11
+
12
+ # GitHub Actions <!-- omit in toc -->
13
+
14
+ <p class="alert alert-info">
15
+ If at any point you would like some help, <a href="/slack">join us in Slack</a>!
16
+ You'll find the AppMap team there, along with other AppMap users.
17
+ </p>
18
+
19
+ <a class="btn btn-primary btn-lg" href="https://github.com/marketplace/get-appmap">Get Started with our GitHub integration</a>
20
+
21
+ AppMap Analysis can work within GitHub Actions to collect, store, analyze, and report on the behavioral changes within each Pull Request. AppMap will analyze the changes in your application on each pushed commit or pull request. AppMap performs a thorough analysis of the runtime differences, giving you:
22
+
23
+ Root cause analysis of failed tests.
24
+ Web service API changes, both breaking and non-breaking.
25
+ New and resolved security findings.
26
+ New and resolved performance findings.
27
+ New and resolved findings in other categories: maintainability, reliability, and user-defined rules.
28
+ “Behavioral diffs” as sequence diagrams showing changed runtime behavior within the PR.
29
+
30
+ - [How it Works](#how-it-works)
31
+ - [Getting Started](#getting-started)
32
+ - [Example Projects](#example-projects)
33
+ - [Matrix Builds](#matrix-builds)
34
+ - [Troubleshooting](#troubleshooting)
35
+
36
+ # How it Works
37
+
38
+ AppMap Analysis can work with your Continuous Integration (CI) system to collect, store, analyze, and report on the behavioral changes within each Pull Request.
39
+ AppMap will analyze the changes in your application on each pushed commit or pull request. AppMap performs a thorough analysis of the runtime differences, giving you:
40
+
41
+ * Root cause analysis of failed tests.
42
+ * Web service API changes - breaking and non-breaking - via comparison of generated OpenAPI definitions.
43
+ * New and resolved security findings.
44
+ * New and resolved performance findings.
45
+ * New and resolved findings in other categories - maintainability, reliability, and user-defined rules.
46
+ * “Behavioral diffs” as sequence diagrams showing changed runtime behavior within the PR.
47
+
48
+ <p class="alert alert-info">
49
+ Install the <a href="https://github.com/marketplace/get-appmap" target="_blank">AppMap GitHub App</a> on the GitHub Marketplace to get started now!
50
+ </p>
51
+
52
+ The AppMap Analysis GitHub actions can run cooperatively or independently of your existing CI job.
53
+ For example, AppMap Analysis can run as a GitHub Action even if you do not use GitHub Actions as your CI system.
54
+
55
+ AppMap Analysis runs entirely within your existing GitHub account and does not send code or data to an external or 3rd-party server. For more information, refer to the [AppMap Security FAQ](https://appmap.io/security).
56
+
57
+ Once you create a pull request, AppMap Data is recorded as your test cases run. As AppMap Data is generated, an AppMap archive file is created that includes all the AppMap Data, plus some metadata about the job. As code is pushed to a branch, AppMap Analysis create an archive file for that code revision. This archive file is automatically saved as a CI artifact. Once an archive has been created, it can be compared to the “base” revision (i.e. your mainline or production branch).
58
+ 1
59
+ ## The value of AppMap in CI
60
+
61
+ We designed AppMap’s findings as a comment in the PR itself to enable the Development, QA, Architecture, and Security teams to review code faster, evaluate code independently, and catch deep-rooted code issues easier. This helps you determine the stability of new code in the context of where the code actually lives and allows for faster and more reliable code delivery.
62
+
63
+ By simply browsing the PR comments, a DevOps team can reliably deploy code with the assurance that it meets all needed code quality requirements, reducing the amount of unnecessary communication between teams just to get the code live long before it is ever pushed to production.
64
+
65
+ ## Requirements
66
+ If you have already generated AppMap Data outside of CI (for example, by running your test cases locally), you can quickly deploy AppMap in CI using the same commands used to execute your test cases. If you already have an existing CI job that builds an environment to execute your test cases, AppMap Analysis can be added to that job.
67
+
68
+ # Getting Started
69
+
70
+ <p class="alert alert-info">
71
+ If at any point you would like some help, <a href="/slack">join us in Slack</a>!
72
+ You'll find the AppMap team there, along with other AppMap users.
73
+ </p>
74
+
75
+ <p class="alert alert-success">
76
+ Make sure to <a href="https://github.com/marketplace/get-appmap">install the AppMap App from the GitHub Marketplace</a> before you start the installation process.
77
+ </p>
78
+
79
+ <a class="btn btn-primary btn-lg" href="https://getappmap.com/setup/">Install AppMap for GitHub Actions</a>
80
+
81
+ ## Overview <!-- omit in toc -->
82
+ AppMap can work within GitHub Actions to collect, store, analyze, and report on the behavioral changes within each Pull Request. AppMap will analyze the changes in your application on each pushed commit or pull request. AppMap performs a thorough analysis of the runtime differences, giving you:
83
+
84
+ - Root cause analysis of failed tests.
85
+ - Web service API changes, both breaking and non-breaking.
86
+ - New and resolved security findings.
87
+ - New and resolved performance findings.
88
+ - New and resolved findings in other categories: maintainability, reliability, and user-defined rules.
89
+ - "Behavioral diffs" as sequence diagrams showing changed runtime behavior within the PR.
90
+
91
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/analysis-github-action.webp"/>
92
+
93
+ ## Step-by-step walkthrough <!-- omit in toc -->
94
+
95
+ - [Step 1: Install the AppMap GitHub App from the GitHub Marketplace.](#step-1-install-the-appmap-github-app-from-the-github-marketplace)
96
+ - [Step 2: Choose an Installation Method](#step-2-choose-an-installation-method)
97
+ - [Step 3: Grant Access to your repositories.](#step-3-grant-access-to-your-repositories)
98
+ - [Step 4: Complete the Installation Process](#step-4-complete-the-installation-process)
99
+ - [Step 5: Merge this PR to deploy AppMap](#step-5-merge-this-pr-to-deploy-appmap)
100
+ - [Optional Post-Install Configuration](#optional-post-install-configuration)
101
+ - [Configure Additional AppMap analysis rules](#configure-additional-appmap-analysis-rules)
102
+
103
+ Configuration of the AppMap GitHub Action happens inside a branch and can be easily tested in a Pull Request before merging any code changes to the mainline branch. This allows users to easily test AppMap in the environment before deploying across the repository.
104
+
105
+ Follow the steps below for your project. If you need additional assistance contact AppMap at [support@appmap.io](mailto:support@appmap.io) or join us in our [Community Slack](https://appmap.io/slack)
106
+
107
+ ### Step 1: Install the AppMap GitHub App from the GitHub Marketplace.
108
+
109
+ <a class="btn btn-primary btn-lg" href="https://github.com/marketplace/get-appmap">Click to install the AppMap GitHub Action</a>
110
+
111
+ Installing the AppMap GitHub App into your repository will allow the AppMap installer to properly detect your repositories for installation. Your data is your data, AppMap does not store your code or any AppMap Data that is generated. For more details about AppMap security controls, review the [Security FAQ](https://appmap.io/security).
112
+
113
+ ### Step 2: Choose an Installation Method
114
+
115
+ AppMap runs as a GitHub Action in your project. Add AppMap to a project with an existing GitHub workflow that runs tests successfully. Choose if you would like to install AppMap manually into your project or use the automated AI assisted installation.
116
+
117
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/manual-or-ai-installer.webp"/>
118
+
119
+ ### Step 3: Grant Access to your repositories.
120
+ Granting AppMap access to your repositories allows AppMap to complete an automated installation for your project. For the automated installation to be successful you'll need an existing GitHub workflow which builds and tests your application successfully.
121
+
122
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/authorize-appmap.webp"/>
123
+
124
+ *Note*: If you do not currently have a GitHub Action that can run your test cases, refer to the [GitHub documentation](https://docs.github.com/en/actions/quickstart) to build an Action that will execute your test cases.
125
+
126
+ ### Step 4: Complete the Installation Process
127
+
128
+ Follow the steps in the AppMap installation process to complete the AppMap Installation. AppMap will add a Configuration Report as a comment in the initial pull request.
129
+
130
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/config-report.webp"/>
131
+
132
+ The initial AppMap report will give you details about:
133
+
134
+ - **AppMap Data sources** shows how many AppMap Diagrams were recorded, and which test frameworks were used.
135
+ - **Code profile** indicates which packages and modules were recorded.
136
+ - **Web service API profile** summarizes the HTTP requests observed while your tests ran. AppMap uses this information to automatically generate OpenAPI definitions.
137
+ - **SQL profile** summarizes the SQL queries executed in your tests.
138
+
139
+ After completing the initial configuration report, AppMap will analyze your entire source code repository. In this report AppMap will display recently introduced code flaws and problems. A sample of all the problems that were found in the AppMap Data are listed in order of when they were most likely introduced, with most recent first.
140
+
141
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/appmap-project-summary.webp"/>
142
+
143
+ ### Step 5: Merge this PR to deploy AppMap
144
+ Congratulations! You’ve successfully set up the AppMap GitHub Action and can now merge this into your project to make it available for every other developer to use on each of their subsequent pull requests.
145
+
146
+ To see AppMap in action, create a draft pull request with some changes that you don't plan to merge. Some suggested changes include:
147
+
148
+ - Add a new test
149
+ - Add, change, or remove an API route
150
+ - Change how your application interacts with its database
151
+
152
+ AppMap will execute runtime code analysis on every pull request in this repository.
153
+
154
+ <div class="video-container">
155
+ <video playsinline loop autoplay muted>
156
+ <source src="/assets/img/docs/gh-action/action-report-summary.mp4" type="video/mp4">
157
+ </video>
158
+ </div>
159
+
160
+ ## Optional Post-Install Configuration
161
+
162
+ ### Configure Additional AppMap analysis rules
163
+
164
+ AppMap comes with a comprehensive set of rules that are categorized by their impact on applications: Performance, Reliability, Maintainability, Stability, and Security.
165
+
166
+ You can refer to the [AppMap Documentation](/docs/reference/analysis-rules) for more information about all the rules that are available within AppMap.
167
+
168
+ To enable additional rules simply add them to an `appmap-scanner.yml` file in the root of your project directory and commit it to your project.
169
+
170
+ This is a sample `appmap-scanner.yml` file which you can use to enable or disable certain AppMap analysis rules. Rules can be disabled by commenting them out with the `#` character.
171
+
172
+ ```yaml
173
+ checks:
174
+ - rule: authz-before-authn
175
+ # - rule: circular-dependency
176
+ - rule: deprecated-crypto-algorithm
177
+ - rule: deserialization-of-untrusted-data
178
+ - rule: exec-of-untrusted-command
179
+ - rule: http-500
180
+ # - rule: illegal-package-dependency
181
+ # properties:
182
+ # callerPackages:
183
+ # - equal: actionpack
184
+ # calleePackage:
185
+ # equal: app/controllers
186
+ # - rule: incompatible-http-client-request
187
+ # - rule: insecure-compare
188
+ # - rule: job-not-cancelled
189
+ - rule: logout-without-session-reset
190
+ # - rule: missing-authentication
191
+ - rule: missing-content-type
192
+ - rule: n-plus-one-query
193
+ # - rule: query-from-invalid-package
194
+ # - rule: query-from-view
195
+ # - rule: rpc-without-circuit-breaker
196
+ # - rule: save-without-validation
197
+ - rule: secret-in-log
198
+ # - rule: slow-function-call
199
+ # properties:
200
+ # timeAllowed: 0.2
201
+ # functions:
202
+ # - match: Controller#create$
203
+ # - rule: slow-http-server-request
204
+ # properties:
205
+ # timeAllowed: 0.5
206
+ # - rule: slow-query
207
+ # properties:
208
+ # timeAllowed: 0.05
209
+ - rule: too-many-joins
210
+ - rule: too-many-updates
211
+ # - rule: unbatched-materialized-query
212
+ - rule: unauthenticated-encryption
213
+ - rule: update-in-get-request
214
+ ```
215
+ {: .example-code}
216
+
217
+ Add these changes to Git and commit and put them into the PR branch.
218
+
219
+ ```bash
220
+ $ git add .
221
+ $ git commit -m "ci: Add customized scanner configuration"
222
+ ```
223
+ {: .example-code}
224
+
225
+ Push the changes upstream to your branch which updates the Pull Request.
226
+ ```bash
227
+ $ git push
228
+ ```
229
+ {: .example-code}
230
+
231
+ The AppMap analysis report will be updated on the completion of the build and a new report will be displayed.
232
+
233
+ For more details about AppMap GitHub Actions refer to the [reference documentation](/docs/reference/github-action)
234
+
235
+ # Example Projects
236
+
237
+ Reference implementations of the AppMap GitHub Action are available for the following languages and frameworks:
238
+
239
+ * [**Ruby on Rails**](https://github.com/land-of-apps/sample_rails_app/blob/appmap/.github/workflows/appmap-analysis.yml)
240
+ * [**Ruby on Rails w/ Matrix Build**](https://github.com/land-of-apps/sample_rails_matrix_build/blob/appmap/.github/workflows/appmap-analysis.yml)
241
+ * [**Java Spring**](https://github.com/land-of-apps/sample_spring_app/blob/appmap/.github/workflows/appmap-analysis.yml)
242
+ * [**Java Spring w/ multiple sub-projects**](https://github.com/land-of-apps/waltz/blob/appmap-analysis/.github/workflows/appmap-analysis.yml)
243
+ * [**Python Django**](https://github.com/land-of-apps/django-oscar/blob/appmap/.github/workflows/appmap-analysis.yml)
244
+ * [**Python w/ Matrix Build**](https://github.com/land-of-apps/sample_django_app/blob/appmap/.github/workflows/appmap-analysis.yml)
245
+ * **Node.js** Coming soon!
246
+
247
+ # Matrix Builds
248
+
249
+ - [Step 1: Modify Action to Support Matrix Build](#step-1-modify-action-to-support-matrix-build)
250
+ - [Step 2: Add the Build Triggers and Analysis Step](#step-2-add-the-build-triggers-and-analysis-step)
251
+ - [(Optional) Step 3: Remove Installation Actions and Configuration](#optional-step-3-remove-installation-actions-and-configuration)
252
+ - [Step 4: Merge this PR to deploy AppMap](#step-4-merge-this-pr-to-deploy-appmap)
253
+
254
+
255
+ If your project uses matrix builds in order to split your test runs across multiple runners, you will need some additional configuration for AppMap to properly save and merge AppMap Data from across all these runs.
256
+
257
+ From the [GitHub documents](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) on the `matrix strategies`:
258
+
259
+ > A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the combinations of the variables. For example, you can use a matrix strategy to test your code in multiple versions of a language or on multiple operating systems.
260
+ > Use `jobs.<job_id>.strategy.matrix` to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values.
261
+
262
+ For example, to split tests across two runners you could set a matrix strategy like the following:
263
+
264
+ ```yaml
265
+ strategy:
266
+ fail-fast: false
267
+ matrix:
268
+ ci_node_total: [2]
269
+ ci_node_index: [0, 1]
270
+ ```
271
+ {: .example-code}
272
+
273
+ For AppMap to analyze any failed test cases, you need to include the configuration flag `fail-fast: false` in your matrix strategy.
274
+
275
+ ### Step 1: Modify Action to Support Matrix Build
276
+
277
+ When following the [Getting Started Guide0(#step-4-complete-the-installation-process), you'll need to make a few changes and additions to your GitHub Workflow file before you commit the first step.
278
+
279
+ First, modify the `EndBug/add-and-commit` action to include an if statement so that only one of the runners will commit the AppMap library installation files to the project.
280
+
281
+ For Example:
282
+ ```yaml
283
+ - name: Commit changes
284
+ if: ${{ matrix.ci_node_index == 0}} #Only run this action on a single runner
285
+ uses: EndBug/add-and-commit@v9
286
+ ```
287
+ {: .example-code}
288
+
289
+ Next, you'll modify the `archive-action` to configure an `archive-id:` set to the unique index of the runner. This will archive each tarball of AppMap Data from each runner in your Action.
290
+
291
+ For example:
292
+ ```yaml
293
+ - name: Archive AppMap Data
294
+ if: always()
295
+ uses: getappmap/archive-action@v1
296
+ with:
297
+ archive-id: ${{ matrix.ci_node_index }} # Set this equal to the unique index of the runner
298
+ ```
299
+ {: .example-code}
300
+
301
+ After the action which runs your test cases, you will create a new job that will merge the AppMap Data archive from your individual runners, archive them, and provide the initial AppMap inventory report.
302
+
303
+ Create a new job at the same level as the job which runs the test cases, and make this job dependant on the previous job.
304
+
305
+ For example:
306
+ ```yaml
307
+ merge-and-archive:
308
+ runs-on: ubuntu-latest
309
+ if: always()
310
+ needs: [test]
311
+
312
+ steps:
313
+ - name: Checkout
314
+ uses: actions/checkout@v3
315
+ with:
316
+ ref: ${{ github.event.pull_request.head.ref }}
317
+
318
+ - name: Install AppMap tools
319
+ uses: getappmap/install-action@v1
320
+ with:
321
+ install-appmap-library: false
322
+
323
+ - name: Merge AppMap Data Archives
324
+ uses: getappmap/archive-action/merge@v1
325
+ with:
326
+ revision: ${{ github.event.pull_request.base.sha }}
327
+ archive-count: 2 # Set this equal to the total number of test runners (i.e. total archives created)
328
+ ```
329
+ {: .example-code}
330
+
331
+ Commit the changes:
332
+
333
+ ```bash
334
+ $ git add .
335
+ $ git commit -m "ci: Bootstrap initial AppMap archive"
336
+ ```
337
+ {: .example-code}
338
+
339
+ View an example workflow [file for this step here](https://github.com/land-of-apps/sample_rails_matrix_build/blob/5825614c9c7530c2108b14b030be1efcd2d40fec/.github/workflows/appmap-analysis.yml).
340
+
341
+ Push the changes upstream to your branch and open a new Pull Request which will trigger the GitHub action. Once the build of this PR completes, AppMap will comment on the PR with an initial report about your software project.
342
+
343
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/action-welcome-to-appmap.webp"/>
344
+
345
+ The initial AppMap report will give you details about:
346
+
347
+ - **Runtime Analysis:** Analyzing the AppMap Data for security flaws and anti-patterns
348
+ - **REST API analysis** For AppMap Diagrams that include HTTP server requests, AppMap can automatically generate OpenAPI definitions.
349
+ - **SQL Profile** When your code makes a SQL query, AppMap records the SQL query in detail. It even parses the queries
350
+ to figure out which tables your app is using, and how it's using them.
351
+
352
+ ### Step 2: Add the Build Triggers and Analysis Step
353
+
354
+ With the previous step complete, and a inventory report in your pull request, you can now replace the `merge-and-archive` job we used in the last step and replace it with the `appmap-analysis-matrix` reusable workflow with an additional configuration option `archive-count`.
355
+
356
+ The `archive-count` is the total number of test runners which have generated AppMap archives. For example, if you have split your test runner across 2 hosts, you need to set the `archive-count` equal to `2`.
357
+
358
+ For example:
359
+ ```yaml
360
+ appmap-analysis:
361
+ if: always()
362
+ needs: [test]
363
+ uses: getappmap/analyze-action/.github/workflows/appmap-analysis-matrix.yml@v1
364
+ with:
365
+ archive-count: 2 # Set to the total number of test runners
366
+ permissions:
367
+ actions: read
368
+ contents: read
369
+ checks: write
370
+ pull-requests: write
371
+ ```
372
+ {: .example-code}
373
+
374
+ Pull the latest commit made by the previous GitHub Action workflow run
375
+
376
+ ```bash
377
+ $ git pull
378
+ ```
379
+ {: .example-code}
380
+
381
+ Commit the changes:
382
+
383
+ ```bash
384
+ $ git add .
385
+ $ git commit -m "ci: Add build triggers and analysis step"
386
+ ```
387
+ {: .example-code}
388
+
389
+ Push the changes upstream to your branch.
390
+ ```bash
391
+ $ git push
392
+ ```
393
+ {: .example-code}
394
+
395
+ After the build completes, AppMap will post details of the Analysis build into your pull request.
396
+
397
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/action-report-summary.webp"/>
398
+
399
+ View an example workflow [file for this step here](https://github.com/land-of-apps/sample_rails_matrix_build/blob/03d10c03430c84b05542eeca9408c46297dfd97c/.github/workflows/appmap-analysis.yml).
400
+
401
+ If your pull request report shows changes to code behavior or new AppMap Data (when no changes are made), you may have some non-deterministic tests. For additional help resolving this, please contact the AppMap engineering team via [email](mailto:support@appmap.io) or join the [AppMap Community Slack](https://appmap.io/slack).
402
+
403
+ ### (Optional) Step 3: Remove Installation Actions and Configuration
404
+
405
+ Now that AppMap configuration files are included in your project, you no longer need the `permissions` block at the top of your action (unless required for other actions) and `add-and-commit` actions in your project. Additionally, modify the `install-action` to disable library installation. The Action will require the AppMap CLI tools installed to successfully archive the AppMap Data archive from each runner. If they are left in place your project will always update to the latest released versions of AppMap libraries. Remove the following lines to have more control over future software updates.
406
+
407
+ This action can be deleted.
408
+
409
+ ```yaml
410
+ - name: Commit changes
411
+ if: ${{ matrix.ci_node_index == 0}}
412
+ uses: EndBug/add-and-commit@v9
413
+ ```
414
+ {: .example-code}
415
+
416
+ Unless needed for other Actions in your workflow, modify this section with updated permissions from Step 1:
417
+
418
+ ```yaml
419
+ permissions:
420
+ contents: write
421
+ ```
422
+ {: .example-code}
423
+
424
+
425
+ Modify the `install-action` with the following setting:
426
+
427
+ ```yaml
428
+ - name: Install AppMap tools
429
+ uses: getappmap/install-action@v1
430
+ with:
431
+ install-appmap-library: false
432
+ ```
433
+ {: .example-code}
434
+
435
+ Finally, you can set your `checkout` action back to the default.
436
+ ```yaml
437
+ - name: Checkout
438
+ uses: actions/checkout@v3
439
+ ```
440
+ {: .example-code}
441
+
442
+ After removing those Actions, add and commit to your branch.
443
+
444
+ ```bash
445
+ $ git add .
446
+ $ git commit -m "ci: Remove installation actions"
447
+ ```
448
+ {: .example-code}
449
+
450
+ Push the changes upstream to your branch.
451
+ ```bash
452
+ $ git push
453
+ ```
454
+ {: .example-code}
455
+
456
+ <p class="alert alert-info">
457
+ See an example GitHub Action configuration with AppMap working with a <a href="https://github.com/land-of-apps/sample_rails_matrix_build/blob/appmap/.github/workflows/appmap-analysis.yml" target="_blank">multi-runner matrix build</a>.
458
+ </p>
459
+
460
+ ### Step 4: Merge this PR to deploy AppMap
461
+ Congratulations! You’ve successfully set up the AppMap Github Action and can now merge this into your project to make it available for every other developer to use on each of their subsequent pull requests.
462
+
463
+ # Troubleshooting
464
+
465
+ - [The AppMap GitHub Action Does Not Run in my Environment](#the-appmap-github-action-does-not-run-in-my-environment)
466
+ - [I Can't Open AppMap Diagrams in my Pull Request Report](#i-cant-open-appmap-diagrams-in-my-pull-request-report)
467
+
468
+ ## The AppMap GitHub Action Does Not Run in my Environment
469
+
470
+ **Add AppMap to GitHub Allowed Actions**
471
+
472
+ If your organization limits which GitHub Actions can be used, [update your organization settings](https://docs.github.com/en/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#allowing-select-actions-and-reusable-workflows-to-run) to allow the specific AppMap actions required for this integration to work. All AppMap Actions are published on the [GitHub Marketplace](https://github.com/marketplace?type=actions&query=getappmap+) under the `getappmap` owner namespace.
473
+
474
+ In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.
475
+
476
+ <img class="video-screenshot" src="/assets/img/docs/github-your-organizations.webp"/>
477
+
478
+ Next to the organization, click **Settings**.
479
+
480
+ In the left sidebar, click **Actions**, then click **General**.
481
+
482
+ Under "Policies", select **Allow _OWNER_, and select _non-OWNER_, actions and reusable workflows** and add the following AppMap required actions. This will ensure that current and future actions will be supported.
483
+
484
+ ```
485
+ getappmap/*
486
+ ```
487
+
488
+ Alternatively, if you would like to restrict to only the current list of actions further you can list them individually. You will need to keep this list updated as new features and functionality are added.
489
+ ```
490
+ getappmap/install-action@*,getappmap/archive-action@*,getappmap/analyze-action@*
491
+ ```
492
+
493
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/action-permissions.webp"/>
494
+
495
+ ## I Can't Open AppMap Diagrams in my Pull Request Report
496
+
497
+ This is caused by not having the AppMap GitHub App installed in your GitHub account.
498
+
499
+ **Install or Request the AppMap GitHub App**
500
+
501
+ The **AppMap** application authorizes your account to run AppMap in CI. It also enables you to open AppMap Diagrams in your browser.
502
+
503
+ The **AppMap** application:
504
+
505
+ - **DOES NOT** transfer any of your repository code, data, or AppMap Data to an external server.
506
+ - **DOES** confirm that you have access via GitHub permissions to the AppMap Data stored in your repository action.
507
+ - **DOES** open a browser tab with a signed URL that enables your browser to securely download the AppMap Data from your GitHub and display it.
508
+ - **DOES** directly transfer data from YOUR GitHub to YOUR browser, **without** going through any other other 3rd party services.
509
+
510
+ Organization owners can install GitHub Apps on their organization. If you are not an organization owner, you can still initiate the install process. GitHub will then send a notification to the organization owner to request them to approve the installation. Ask your organization owner to approve that request.
511
+
512
+ If you're installing into your personal account, you will already have permissions to install this app there.
513
+
514
+ 1) Open the [AppMap GitHub marketplace page](https://github.com/marketplace/get-appmap) and click `Set up a plan`.
515
+
516
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/marketplace-page.webp"/>
517
+
518
+ 2) Select the GitHub account in which you are using AppMap, and then click the `Install` button.
519
+
520
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/account-selection.webp"/>
521
+
522
+ 3) Select `All Repositories`, or select to install the app into specific repositories.
523
+
524
+ <img class="video-screenshot" src="/assets/img/docs/gh-action/select-repos.webp"/>
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: docs
3
+ title: Docs - Integrations
4
+ description: "Explore how to integrate AppMap with popular services like Atlassian Compass, Confluence, GitHub Actions, CircleCI, PlantUML, Postman, SwaggerHub, Readme.com, and Docker"
5
+ toc: false
6
+ ---
7
+
8
+ # Integrations
9
+
10
+ AppMap supports integrations with many popular services. Learn more about how to integrate AppMap with other services.
11
+
12
+ - [Atlassian Compass](/docs/integrations/atlassian-compass)
13
+ - [Atlassian Confluence](/docs/integrations/atlassian-confluence)
14
+ - [GitHub Actions](/docs/integrations/github-actions)
15
+ - [CircleCI](/docs/integrations/circle-ci)
16
+ - [PlantUML](/docs/integrations/plantuml)
17
+ - [Postman](/docs/integrations/postman)
18
+ - [SmartBear SwaggerHub](/docs/integrations/smartbear-swaggerhub)
19
+ - [Readme.com](/docs/integrations/readme)
20
+ - [Docker](/docs/integrations/docker)
@@ -0,0 +1,66 @@
1
+ ---
2
+ layout: docs
3
+ title: Docs - Integrations
4
+ description: "Generate, modify, and compare PlantUML sequence diagrams with AppMap. Integrate with tools like Atlassian Confluence. Ideal for code changes and GitHub Pull Requests."
5
+ integrations: true
6
+ name: PlantUML
7
+ step: 3
8
+ ---
9
+
10
+ # PlantUML
11
+
12
+ AppMap can generate sequence diagrams in the PlantUML format, a textual format which is portable and easy to modify. This lets you integrate with other tools that support the Mermaid or PlantUML syntax. You can touch up the generated diagrams, and copy-paste the diagram text into a wide variety of tools that support the PlantUML format, such as Atlassian Confluence.
13
+
14
+ There are two ways to generate a PlantUML sequence diagram:
15
+
16
+ 1. Run the `sequence-diagram` command with the option `--format plantuml`
17
+ 1. Generate a sequence diagram from the code editor. Then locate the sequence diagram file in the file tree, and you’ll see a `<name>.sequence.uml` file.
18
+
19
+ You can copy the file contents directly into other tools, or you can customize it first like. If you are going to edit the PlantUML file, be sure and save it as a new file first.
20
+
21
+ ### Generating sequence diagrams from the CLI
22
+
23
+ AppMap Data can be generated on the command line from your terminal, or within a CI build.
24
+
25
+ #### CLI command: `sequence-diagram`
26
+
27
+ You can generate sequence diagrams using the AppMap CLI command `sequence-diagram`.
28
+
29
+ An example:
30
+
31
+ ```
32
+ $ appmap sequence-diagram --format plantuml tmp/appmap/minitest/Following_followers_page.appmap.json
33
+ ```
34
+
35
+ ### Comparing sequence diagrams
36
+
37
+ When two AppMap Diagrams are similar, it can be useful to represent them as sequence diagrams and then compare them. This is most useful:
38
+
39
+ 1. To compare AppMap Diagrams of two different test cases, requests, or remote recordings.
40
+ 1. To compare two different versions of the same AppMap - before and after a code change.
41
+
42
+ Sequence diagram comparisons can be attached to GitHub Pull Requests to make it easier for reviewers to better understand changes in code.
43
+
44
+ #### CLI command: `sequence-diagram-diff`
45
+
46
+ The `sequence-diagram-diff` command takes two diagram files as arguments, and produces a comparison file of the differences between them. For example:
47
+
48
+ ```
49
+ $ appmap sequence-diagram-diff --format plantuml user-search-1.sequence.json user-search-2.sequence.json
50
+ ```
51
+
52
+ Note: this command takes sequence diagram files as arguments, not AppMap files. To convert an AppMap file to sequence diagram format, use this command:
53
+
54
+ ```
55
+ $ appmap sequence-diagram -f json user-search-1.appmap.json
56
+ ```
57
+
58
+ #### Comparing Sequence Diagrams in VS Code
59
+
60
+ Download the PlantUML JAR file from [https://plantuml.com/download](https://plantuml.com/download)
61
+
62
+ Configure the file location:
63
+
64
+ <img class="video-screenshot" src="/assets/img/sequence-diagrams/plant-uml-location.png"/>
65
+
66
+ <img class="video-screenshot" src="/assets/img/sequence-diagrams/compare.png"/>
@@ -0,0 +1,30 @@
1
+ ---
2
+ layout: docs
3
+ title: Docs - Integrations
4
+ description: "Learn how to import your AppMap generated OpenAPI definitions into Postman, adjust settings, and interact with your APIs. Detailed guide with visuals included."
5
+ integrations: true
6
+ name: Postman
7
+ step: 4
8
+ ---
9
+
10
+ # Postman
11
+
12
+ After generating your OpenAPI definitions you can import to [Postman](https://www.postman.com/) as a new collection or update an existing collection.
13
+
14
+ To add your OpenAPI definition to Postman start by selecting the _Import_ button found in the top right corner of the Postman UI.
15
+
16
+ <img class="video-screenshot" src="/assets/img/openapi/postman-1.png"/>
17
+
18
+ Next, select the path to where you saved your OpenAPI definition. Alternatively if you have committed the file to a repository or pushed to a 3rd party API hosting service you can select a code repository or link as the location.
19
+
20
+ <img class="video-screenshot" src="/assets/img/openapi/postman-2.webp"/>
21
+
22
+ After Postman validates your OpenAPI definition, you can adjust any advanced settings or accept the default import settings.
23
+
24
+ <img class="video-screenshot" src="/assets/img/openapi/postman-3.png"/>
25
+
26
+ After the import completes you'll see a full tree view of your OpenAPI definitions that were generated by AppMap. You can now use Postman to interact with the APIs.
27
+
28
+ <img class="video-screenshot" src="/assets/img/openapi/postman-4.png"/>
29
+
30
+ Refer to the [Postman documentation](https://learning.postman.com/docs/getting-started/introduction/) for additional details on using Postman to interact with your APIs.