@appland/appmap 3.140.1 → 3.141.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 +16 -0
- package/built/cmds/index/index.js +1 -1
- package/built/cmds/index/index.js.map +1 -1
- package/built/cmds/index/rpc.js +2 -1
- package/built/cmds/index/rpc.js.map +1 -1
- package/built/docs/appmap-docs.md +27 -0
- package/built/docs/get-started-with-appmap/add-appmap-to-your-code-editor.md +98 -0
- package/built/docs/get-started-with-appmap/index.md +20 -0
- package/built/docs/get-started-with-appmap/making-appmap-data.md +151 -0
- package/built/docs/get-started-with-appmap/navie-ai-quickstart.md +73 -0
- package/built/docs/guides/exporting-appmap-diagrams.md +1 -1
- package/built/docs/guides/handling-large-appmap-diagrams.md +1 -1
- package/built/docs/guides/index.md +3 -1
- package/built/docs/{navie/using-navie.md → guides/navie-best-practices.md} +20 -14
- package/built/docs/guides/navigating-code-objects.md +67 -0
- package/built/docs/guides/openapi.md +1 -1
- package/built/docs/guides/reading-sql-in-appmap-diagrams.md +1 -1
- package/built/docs/guides/refine-appmap-data.md +1 -1
- package/built/docs/guides/reverse-engineering.md +2 -2
- package/built/docs/guides/runtime-code-review.md +1 -1
- package/built/docs/guides/{configuring-analysis.md → using-appmap-analysis.md} +53 -5
- package/built/docs/guides/using-appmap-diagrams.md +2 -2
- package/built/docs/integrations/atlassian-confluence.md +1 -1
- package/built/docs/navie/bring-your-own-model.md +148 -12
- package/built/docs/navie/how-navie-works.md +1 -1
- package/built/docs/navie/index.md +1 -3
- package/built/docs/reference/appmap-java.md +1 -1
- package/built/docs/reference/appmap-python.md +46 -20
- package/built/fulltext/FileIndex.js +51 -17
- package/built/fulltext/FileIndex.js.map +1 -1
- package/built/fulltext/listGitProjectFIles.js +42 -18
- package/built/fulltext/listGitProjectFIles.js.map +1 -1
- package/built/fulltext/listProjectFiles.js +5 -5
- package/built/fulltext/listProjectFiles.js.map +1 -1
- package/built/fulltext/queryKeywords.js +1 -1
- package/built/fulltext/queryKeywords.js.map +1 -1
- package/built/fulltext/querySymbols.js +58 -0
- package/built/fulltext/querySymbols.js.map +1 -0
- package/built/html/appmap.js +5 -2
- package/built/html/appmap.js.map +2 -2
- package/built/html/sequenceDiagram.js +5 -2
- package/built/html/sequenceDiagram.js.map +2 -2
- package/built/lib/handleWorkingDirectory.js +2 -2
- package/built/lib/handleWorkingDirectory.js.map +1 -1
- package/built/rpc/configuration.js +2 -0
- package/built/rpc/configuration.js.map +1 -1
- package/built/telemetry.js +4 -7
- package/built/telemetry.js.map +1 -1
- package/package.json +1 -2
- package/built/docs/navie/byok/intellij.md +0 -35
- package/built/docs/navie/byok/vs-code.md +0 -115
|
@@ -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.
|
|
@@ -4,7 +4,7 @@ title: Docs - Guides
|
|
|
4
4
|
description: "Use AppMap to auto generate OpenAPI definitions and document HTTP APIs. AppMap captures runtime behavior, creating accurate API schemas effortlessly."
|
|
5
5
|
guides: true
|
|
6
6
|
name: Generating OpenAPI Definitions
|
|
7
|
-
step:
|
|
7
|
+
step: 7
|
|
8
8
|
redirect_from: [/docs/openapi,/docs/openapi/features,/docs/openapi/code-editor-extensions,/docs/openapi/integrations,/docs/openapi/customization,/docs/reference/openapi]
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ title: Docs - Guides
|
|
|
4
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
5
|
guides: true
|
|
6
6
|
name: Reading SQL in AppMap Diagrams
|
|
7
|
-
step:
|
|
7
|
+
step: 5
|
|
8
8
|
redirect_from: [/docs/guides/reading-sql-in-appmaps]
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ title: Docs - Guides
|
|
|
4
4
|
description: "Optimize AppMap Diagrams by refining recordings to exclude noise. Start with inclusive config, analyze stats, update config, create concise AppMap Diagrams."
|
|
5
5
|
guides: true
|
|
6
6
|
name: Refining AppMap Data
|
|
7
|
-
step:
|
|
7
|
+
step: 6
|
|
8
8
|
redirect_from: [/docs/reference/refine-appmaps, /docs/guides/refine-appmaps]
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@ layout: docs
|
|
|
3
3
|
guides: true
|
|
4
4
|
title: Docs - Guides
|
|
5
5
|
description: "Learn to reverse engineer efficiently using AppMap. Capture code execution details effortlessly. Visualize data for insights. Automate AppMap creation and storage for collaboration."
|
|
6
|
-
step:
|
|
6
|
+
step: 9
|
|
7
7
|
render_with_liquid: false
|
|
8
8
|
name: Reverse Engineering
|
|
9
9
|
---
|
|
@@ -47,7 +47,7 @@ AppMap is a powerful tool for reverse-engineering legacy code. Unlike telemetry-
|
|
|
47
47
|
The data can be further combined, compared, and analyzed to obtain key insights about how the code works and how it can be improved. The purpose of this guide is to provide a step-by-step procedure for characterizing a large codebase with AppMap and obtaining these insights.
|
|
48
48
|
|
|
49
49
|
## Pre-requisites
|
|
50
|
-
You should first review our guide on [how AppMap
|
|
50
|
+
You should first review our guide on [how to make AppMap Data](/docs/get-started-with-appmap/making-appmap-data).
|
|
51
51
|
|
|
52
52
|
# Reverse Engineering an Application - A Step by Step Process
|
|
53
53
|
This section provides a procedure for characterizing your code using AppMap. Consider this procedure as a recommendation on how to get started. For your specific needs, you’ll likely find useful ways to extend and customize these recommendations.
|
|
@@ -4,7 +4,7 @@ title: Docs - Guides
|
|
|
4
4
|
description: "AppMap analyzes runtime changes in your codebase for failed tests, API, security, performance issues, and anti-patterns, providing detailed reports."
|
|
5
5
|
guides: true
|
|
6
6
|
name: Understanding the Runtime Code Review Report
|
|
7
|
-
step:
|
|
7
|
+
step: 10
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Understanding the Runtime Code Review Report <!-- omit in toc -->
|
|
@@ -3,13 +3,19 @@ layout: docs
|
|
|
3
3
|
title: Docs - Guides
|
|
4
4
|
description: "Configure AppMap Analysis by customizing checks for flexible rule options. Understand findings and their properties for effective analysis."
|
|
5
5
|
guides: true
|
|
6
|
-
name:
|
|
7
|
-
step:
|
|
8
|
-
redirect_from: [docs/analysis/configuring-checks, /docs/analysis/match-pattern-config, /docs/analysis/findings,/docs/reference/configuring-analysis]
|
|
6
|
+
name: Using AppMap Analysis
|
|
7
|
+
step: 8
|
|
8
|
+
redirect_from: [docs/analysis/configuring-checks, /docs/analysis/match-pattern-config, /docs/analysis/findings,/docs/reference/configuring-analysis,/docs/guides/configuring-analysis]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# AppMap Analysis
|
|
12
12
|
|
|
13
|
+
When there is AppMap Data available in your project, AppMap Runtime Analysis will immediately scan them to detect flaws in the code. These flaws are surfaced as **findings** and are displayed in your code editor as you work so that they can be addressed **before** they are propagated to test or production environments.
|
|
14
|
+
|
|
15
|
+
- [Navigate Findings](#navigate-findings)
|
|
16
|
+
- [Investigate findings](#investigate-findings)
|
|
17
|
+
- [Use labels to visually explore your code](#use-labels-to-visually-explore-your-code)
|
|
18
|
+
- [Configuring Analysis](#configuring-analysis)
|
|
13
19
|
- [Configuring checks](#configuring-checks)
|
|
14
20
|
- [Example appmap-scanner.yml](#example-appmap-scanneryml)
|
|
15
21
|
- [Match pattern config](#match-pattern-config)
|
|
@@ -18,8 +24,50 @@ redirect_from: [docs/analysis/configuring-checks, /docs/analysis/match-pattern-c
|
|
|
18
24
|
- [Properties](#properties)
|
|
19
25
|
- [Finding hash](#finding-hash)
|
|
20
26
|
|
|
27
|
+
## Navigate Findings
|
|
28
|
+
|
|
29
|
+
Findings are displayed In the Runtime Analysis sidebar pane sorted by impact category and type.
|
|
30
|
+
|
|
31
|
+
<image class="video-screenshot" src="/assets/img/docs/runtime-analysis-sidebar-findings.webp"/>
|
|
32
|
+
|
|
33
|
+
Clicking the ‘Overview’ link in the Runtime Analysis sidebar will open the ‘Runtime Analysis Summary’ window which contains a summary of findings for a particular project.
|
|
34
|
+
|
|
35
|
+
<image class="video-screenshot" src="/assets/img/docs/runtime-analysis-overview-dashboard.webp"/>
|
|
36
|
+
|
|
37
|
+
{% include vimeo.html id='916087872' %}
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
**In this video**
|
|
42
|
+
AppMap Analysis scans your AppMap Data to find software design flaws that impact performance, stability, security and maintainability. This runtime code analysis can find the problems that static code analyzers miss - and that cause 90% of today’s most serious production issues.
|
|
43
|
+
|
|
44
|
+
**Links mentioned**
|
|
45
|
+
[AppMap Community Slack](/slack)
|
|
46
|
+
[Get AppMap for VSCode](https://marketplace.visualstudio.com/items?itemName=appland.appmap)
|
|
47
|
+
[Get AppMap for JetBrains](https://plugins.jetbrains.com/plugin/16701-appmap)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Investigate findings
|
|
52
|
+
|
|
53
|
+
Let's look at a sample Ruby on rails application, where AppMap has already been installed and AppMap Data has been generated. From the test cases, you'll see a new option for findings in the left-hand column or an option here for investigate findings.
|
|
54
|
+
|
|
55
|
+
<img class="video-screenshot" src="/assets/img/appmap-analysis-1.webp"/>
|
|
56
|
+
|
|
57
|
+
You can see one of the issues we've found is that a log event contained secret data by clicking on the finding will be taken directly to the line of code where this event occurs by hovering over the pin.
|
|
58
|
+
<img class="video-screenshot" src="/assets/img/appmap-analysis-2.webp"/>
|
|
59
|
+
|
|
60
|
+
## Use labels to visually explore your code
|
|
61
|
+
|
|
62
|
+
You can open the AppMap and see exactly where the function wrote this secret to a log file. How does AppMap know that this was a secret? Unlike static analyzers and other tools that do pattern matching AppMap knows this function generates secrets because we have built in knowledge of common software libraries with pre-populated labels.
|
|
63
|
+
|
|
64
|
+
We know exactly where to look to avoid false positives. Developers can extend their labels, whether it's a common library or not with simple code comments on their functions.
|
|
65
|
+
<img class="video-screenshot" src="/assets/img/appmap-analysis-3.webp"/>
|
|
66
|
+
|
|
67
|
+
If you search for the secret label, you'll see the location in the code where this event occurs by clicking on the function, you'll be taken to the exact location of the AppMap, where the secret was generated. Additionally, you can open the code, combining a visual model alongside the code.
|
|
68
|
+
<img class="video-screenshot" src="/assets/img/appmap-analysis-4.webp"/>
|
|
21
69
|
|
|
22
|
-
## Configuring
|
|
70
|
+
## Configuring Analysis Checks
|
|
23
71
|
|
|
24
72
|
AppMap Analysis is configured in a YAML document. It's primary job is to specify which scanner rules will check the code.
|
|
25
73
|
Each check specifies a rule id, and may include additional properties that customized and tune the behavior of the rule.
|
|
@@ -5,8 +5,8 @@ description: "Configure AppMap Analysis by customizing checks for flexible rule
|
|
|
5
5
|
guides: true
|
|
6
6
|
toc: true
|
|
7
7
|
name: Using AppMap Diagrams
|
|
8
|
-
step:
|
|
9
|
-
redirect_from: [/docs/how-to-use-appmap-diagrams.html, /docs/how-to-use-appmap-diagrams, /docs/diagrams/how-to-use-appmaps, /docs/diagrams/sequence-diagrams, /docs/diagrams, /docs/diagrams/how-it-works, /docs/diagrams/dependency-map, /docs/diagrams/trace-view, /docs/diagrams/sequence-diagram, /docs/diagrams/flamegraph]
|
|
8
|
+
step: 2
|
|
9
|
+
redirect_from: [/docs/how-to-use-appmap-diagrams.html, /docs/how-to-use-appmap-diagrams, /docs/diagrams/how-to-use-appmaps, /docs/diagrams/sequence-diagrams, /docs/diagrams, /docs/diagrams/how-it-works, /docs/diagrams/dependency-map, /docs/diagrams/trace-view, /docs/diagrams/sequence-diagram, /docs/diagrams/flamegraph, /docs/setup-appmap-in-your-code-editor/navigating-appmap-diagrams]
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Using AppMap Diagrams <!-- omit in toc -->
|
|
@@ -16,7 +16,7 @@ Confluence facilitates robust documentation and knowledge sharing. AppMap automa
|
|
|
16
16
|
## Requirements
|
|
17
17
|
|
|
18
18
|
1. A project containing AppMap Data.
|
|
19
|
-
- How to make AppMap Diagrams [in your code editor](/docs/
|
|
19
|
+
- How to make AppMap Diagrams [in your code editor](/docs/get-started-with-appmap/)
|
|
20
20
|
- How to make AppMap Diagrams [using a GitHub action](/docs/integrations/github-actions) or in [CircleCI](/docs/integrations/circle-ci)
|
|
21
21
|
2. [The AppMap app for Confluence](https://marketplace.atlassian.com/apps/1233075/appmap-for-confluence).
|
|
22
22
|
|
|
@@ -1,31 +1,72 @@
|
|
|
1
1
|
---
|
|
2
2
|
layout: docs
|
|
3
3
|
title: Docs - Navie
|
|
4
|
-
name: Bring Your Own
|
|
5
|
-
step:
|
|
4
|
+
name: Bring Your Own LLM Model
|
|
5
|
+
step: 3
|
|
6
6
|
navie: true
|
|
7
7
|
toc: true
|
|
8
8
|
description: Use AppMap Navie with your own OpenAI account or OpenAI-compatible LLM running either locally or remotely.
|
|
9
9
|
redirect_from: [/docs/navie/bring-your-own-llm, /docs/navie/bring-your-own-key]
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# Bring Your Own LLM
|
|
13
|
-
|
|
14
|
-
By default, when asking a question to Navie, your code editor will interact with the AppMap hosted proxy for OpenAI. If you have a requirement to bring your own key or otherwise use your own OpenAI account you can specify your own OpenAI key; this will cause Navie
|
|
15
|
-
to connect to OpenAI directly, without AppMap proxy acting as an intermediate.
|
|
12
|
+
# Bring Your Own LLM Model
|
|
16
13
|
|
|
14
|
+
By default, when asking a question to Navie, your code editor will interact with the AppMap hosted proxy for OpenAI. If you have a requirement to bring your own key or otherwise use your own OpenAI account you can specify your own OpenAI key; this will cause Navie to connect to OpenAI directly, without AppMap proxy acting as an intermediate.
|
|
15
|
+
- [Navie AI Recommended Models](#navie-ai-recommended-models)
|
|
16
|
+
- [Bring Your Own OpenAI API Key (BYOK)](#bring-your-own-openai-api-key-byok)
|
|
17
|
+
- [Configuring Your OpenAI Key](#configuring-your-openai-key)
|
|
18
|
+
- [Reset Navie AI to use Default Navie Backend](#reset-navie-ai-to-use-default-navie-backend)
|
|
17
19
|
- [Bring Your Own Model (BYOM)](#bring-your-own-model-byom)
|
|
18
|
-
- [Configuration](#configuration)
|
|
20
|
+
- [Configuration](#configuration)
|
|
21
|
+
- [Configuring in JetBrains](#configuring-in-jetbrains)
|
|
22
|
+
- [Configuring in VS Code](#configuring-in-vs-code)
|
|
19
23
|
- [Examples](#examples)
|
|
20
|
-
- [OpenAI
|
|
24
|
+
- [OpenAI](#openai)
|
|
21
25
|
- [Azure OpenAI](#azure-openai)
|
|
22
26
|
- [AnyScale Endpoints](#anyscale-endpoints)
|
|
23
27
|
- [Ollama](#ollama)
|
|
24
28
|
|
|
29
|
+
## Navie AI Recommended Models
|
|
30
|
+
|
|
31
|
+
<p class="alert alert-danger">
|
|
32
|
+
AppMap Navie AI recommends avoiding models that do not support chat mode.
|
|
33
|
+
</p>
|
|
34
|
+
<!-- This doc is located at https://docs.google.com/presentation/d/145gzoYVsgJ3J4jGh_2Or8ClZ0drqoC-GTjI1UqkyF_o/edit#slide=id.g1ff63dc2dd6_0_0 -->
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
## Bring Your Own OpenAI API Key (BYOK)
|
|
39
|
+
|
|
40
|
+
Navie AI uses the AppMap hosted proxy with an AppMap managed OpenAI API key. If you have requirements to use your existing OpenAI API key, you can configure that within AppMap. This will ensure all Navie requests will be interacting with your own OpenAI account.
|
|
41
|
+
|
|
42
|
+
### Configuring Your OpenAI Key
|
|
43
|
+
|
|
44
|
+
In your code editor, open the Navie Chat window. If the model displays `(default)`, this means that Navie is configured to use the AppMap hosted OpenAI proxy. Click on the gear icon in the top of the Navie Chat window to change the model.
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
In the modal, select the option to `Use your own OpenAI API key`
|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
After you enter your OpenAI API Key in the menu option, hit `enter` and your code editor will be prompted to reload.
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
After your code editor reloads, you can confirm your requests are being routed to OpenAI directly in the Navie Chat window. It will list the model `OpenAI` and the location, in this case `via OpenAI`.
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
### Reset Navie AI to use Default Navie Backend
|
|
61
|
+
|
|
62
|
+
At any time, you can unset your OpenAI API Key and revert usage back to using the AppMap hosted OpenAI proxy. Select the gear icon in the Navie Chat window and select `Use Navie Backend` in the modal.
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
25
66
|
## Bring Your Own Model (BYOM)
|
|
26
67
|
|
|
27
68
|
<p class="alert alert-info">
|
|
28
|
-
<b>This feature is in early access.</b> We
|
|
69
|
+
<b>This feature is in early access.</b> We currently recommend GPT4-Turbo from OpenAI via OpenAI or Microsoft Azure, and Mixtral-8x7B-Instruct-v0.1. Refer to the <a href="/docs/navie/bring-your-own-model.html#navie-ai-recommended-models">AppMap Recommended Models documentation</a> for more info
|
|
29
70
|
</p>
|
|
30
71
|
|
|
31
72
|
Another option is to use a different LLM entirely; you can use any OpenAI-compatible model
|
|
@@ -33,10 +74,9 @@ running either locally or remotely. When configured like this, as in the BYOK ca
|
|
|
33
74
|
Navie won't contact the AppMap hosted proxy and your conversations will stay private
|
|
34
75
|
between you and the model.
|
|
35
76
|
|
|
36
|
-
|
|
77
|
+
### Configuration
|
|
37
78
|
|
|
38
79
|
In order to configure Navie for your own LLM, certain environment variables need to be set for AppMap services.
|
|
39
|
-
Please refer to the IDE-specific pages to see how to configure the variables in [VS Code](/docs/navie/byok/vs-code) and [IntelliJ](/docs/navie/byok/intellij).
|
|
40
80
|
|
|
41
81
|
You can use the following variables to direct Navie to use any LLM with an OpenAI-compatible API.
|
|
42
82
|
If only the API key is set, Navie will connect to OpenAI.com by default.
|
|
@@ -53,9 +93,105 @@ For Azure OpenAI, you need to [create a deployment](https://learn.microsoft.com/
|
|
|
53
93
|
* `AZURE_OPENAI_API_INSTANCE_NAME` — Azure OpenAI instance name (ie. the part of the URL before `openai.azure.com`)
|
|
54
94
|
* `AZURE_OPENAI_API_DEPLOYMENT_NAME` — Azure OpenAI deployment name.
|
|
55
95
|
|
|
96
|
+
[Configuring in JetBrains](#configuring-byom-in-jetbrains)
|
|
97
|
+
[Configuring in VS Code](#configuring-byom-in-vs-code)
|
|
98
|
+
|
|
99
|
+
### Configuring in JetBrains
|
|
100
|
+
|
|
101
|
+
In JetBrains, go to settings.
|
|
102
|
+
|
|
103
|
+
<img class="video-screenshot" alt="a screenshot of the JetBrains menu" src="/assets/img/docs/goto-intellij-settings.webp" />
|
|
104
|
+
|
|
105
|
+
Go to *Tools* → *AppMap*.
|
|
106
|
+
|
|
107
|
+
<img class="video-screenshot" alt="a screenshot of the AppMap settings in JetBrains" src="/assets/img/docs/intellij-tools-appmap-settings.webp"/>
|
|
108
|
+
|
|
109
|
+
Enter the environment editor.
|
|
110
|
+
<img class="video-screenshot" alt="a screenshot of the entering the AppMap environment editor in JetBrains" src="/assets/img/docs/intellij-enter-env-editor.webp"/>
|
|
111
|
+
|
|
112
|
+
Use the editor to define the relevant environment variables according to the [BYOM documentation](/docs/navie/bring-your-own-model#configuration).
|
|
113
|
+
|
|
114
|
+
<img class="video-screenshot" alt="a screenshot of the environment editor in JetBrains" src="/assets/img/docs/intellij-env-editor.webp" />
|
|
115
|
+
|
|
116
|
+
**Reload your IDE for the changes to take effect.**
|
|
117
|
+
|
|
118
|
+
### Configuring in VS Code
|
|
119
|
+
|
|
120
|
+
#### Editing AppMap services environment
|
|
121
|
+
|
|
122
|
+
**Note**: To store the API key securely with VS Code secret storage, follow [the instructions below](#add-a-new-openai-key).
|
|
123
|
+
|
|
124
|
+
In VS Code, go to settings.
|
|
125
|
+
|
|
126
|
+
<img class="video-screenshot" src="/assets/img/docs/goto-vscode-settings.webp" alt="a screenshot of the Visual Studio Code menu"/>
|
|
127
|
+
|
|
128
|
+
Search for “appmap environment” to reveal “AppMap: Command Line Environment” setting.
|
|
129
|
+
|
|
130
|
+
<img class="video-screenshot" alt="a screenshot of the AppMap: Command Line Environment settings section" src="/assets/img/docs/search-for-appmap-environment.webp"/>
|
|
131
|
+
|
|
132
|
+
Use *Add Item* to define the relevant environment variables according to the [BYOM documentation](/docs/navie/bring-your-own-model#configuration).
|
|
133
|
+
|
|
134
|
+
<img class="video-screenshot" alt="a screenshot showing an example of the bring your own model key value entry" src="/assets/img/docs/byom-key-value-example.webp"/>
|
|
135
|
+
|
|
136
|
+
Reload your VS Code for the changes to take effect.
|
|
137
|
+
|
|
138
|
+
**NOTE:** Please follow the instructions below to set `OPENAI_API_KEY` or `AZURE_OPENAI_API_KEY` securely.
|
|
139
|
+
|
|
140
|
+
#### Add a new OpenAI Key
|
|
141
|
+
|
|
142
|
+
In VS Code, open the Command Palette.
|
|
143
|
+
|
|
144
|
+
You can use a hotkey to open the VS Code Command Palette
|
|
145
|
+
- Mac: `Cmd + Shift + P`
|
|
146
|
+
- Windows/Linux: `Ctrl + Shift + P`
|
|
147
|
+
|
|
148
|
+
Or you can select `View` -> `Command Palette`
|
|
149
|
+
|
|
150
|
+
<img class="video-screenshot" src="/assets/img/product/byok-command-palette.webp"/>
|
|
151
|
+
|
|
152
|
+
Search for `AppMap Set OpenAPI Key`
|
|
153
|
+
|
|
154
|
+
<img class="video-screenshot" src="/assets/img/product/byok-search.webp"/>
|
|
155
|
+
|
|
156
|
+
Paste your key into the new field and hit enter.
|
|
157
|
+
|
|
158
|
+
You'll get a notification in VS Code that your key is set.
|
|
159
|
+
|
|
160
|
+
**NOTE:** You will need to reload your window for the setting to take effect. Use the Command Palette `Developer: Reload Window`
|
|
161
|
+
|
|
162
|
+
<img class="video-screenshot" src="/assets/img/product/byok-key-set.webp"/>
|
|
163
|
+
|
|
164
|
+
#### Delete a configured OpenAI Key
|
|
165
|
+
|
|
166
|
+
To delete your key, simply open the Command Palette
|
|
167
|
+
|
|
168
|
+
You can use a hotkey to open
|
|
169
|
+
- Mac: `Cmd + Shift + P`
|
|
170
|
+
- Windows/Linux: `Ctrl + Shift + P`
|
|
171
|
+
|
|
172
|
+
Or you can select `View` -> `Command Palette`
|
|
173
|
+
|
|
174
|
+
<img class="video-screenshot" src="/assets/img/product/byok-command-palette.webp"/>
|
|
175
|
+
|
|
176
|
+
Search for `AppMap Set OpenAPI Key`
|
|
177
|
+
|
|
178
|
+
<img class="video-screenshot" src="/assets/img/product/byok-search.webp"/>
|
|
179
|
+
|
|
180
|
+
And simply hit enter with the field blank. VS Code will notify you that the key has been unset.
|
|
181
|
+
|
|
182
|
+
**NOTE:** You will need to reload your window for the setting to take effect. Use the Command Palette `Developer: Reload Window`
|
|
183
|
+
|
|
184
|
+
<img class="video-screenshot" src="/assets/img/product/byok-key-erased.webp"/>
|
|
185
|
+
|
|
186
|
+
#### How is my API key saved securely?
|
|
187
|
+
|
|
188
|
+
For secure storage of API key secrets within AppMap, we use the default VS Code secret storage which leverages Electron's safeStorage API to ensure the confidentiality of sensitive information. Upon encryption, secrets are stored within the user data directory in a SQLite database, alongside other VS Code state information. This encryption process involves generating a unique encryption key, which, on macOS, is securely stored within `Keychain Access` under "Code Safe Storage" or "Code - Insiders Safe Storage," depending on the version. This method provides a robust layer of protection, preventing unauthorized access by other applications or users with full disk access. The safeStorage API, accessible in the main process, supports operations such as checking encryption availability, encrypting and decrypting strings, and selecting storage backends on Linux. This approach ensures that your secrets are securely encrypted and stored, safeguarding them from potential threats while maintaining application integrity.
|
|
189
|
+
|
|
56
190
|
## Examples
|
|
57
191
|
|
|
58
|
-
### OpenAI
|
|
192
|
+
### OpenAI
|
|
193
|
+
|
|
194
|
+
**Note:** We recommend configuring your OpenAI key using the code editor extension. Follow the [Bring Your Own Key](/docs/navie/bring-your-own-model.html#configuring-your-openai-key) docs for instructions.
|
|
59
195
|
|
|
60
196
|
Only `OPENAI_API_KEY` needs to be set, other settings can stay default:
|
|
61
197
|
|
|
@@ -22,6 +22,6 @@ This powerful technique provides the AI with many valuable pieces of information
|
|
|
22
22
|
|
|
23
23
|
Navie integrates seamlessly into your existing AppMap enabled project. Once you have the AppMap software libraries installed into your project, interact with your application or run tests to automatically generate AppMap Data. All of your code and AppMap Data will stay locally in your environment until you ask Navie a question. After asking a question to Navie, the relevant AppMap Diagrams and code snippets are located locally by the AppMap search and explain API, then this data is sent to OpenAI (available option to bring your own LLM), and the response is returned to the user.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+

|
|
26
26
|
|
|
27
27
|
For more details about the privacy and security of your AppMap Data, refer to the [AppMap Security FAQ](https://appmap.io/security)
|
|
@@ -14,9 +14,7 @@ That means you're not just working with static analysis anymore, and you're not
|
|
|
14
14
|
|
|
15
15
|
- [How Navie Works](/docs/navie/how-navie-works)
|
|
16
16
|
- [How to Open Navie](/docs/navie/how-to-open-navie)
|
|
17
|
-
- [
|
|
18
|
-
- [Bring Your Own Key](/docs/navie/bring-your-own-key)
|
|
19
|
-
- [Bring Your Own Model](/docs/navie/bring-your-own-llm)
|
|
17
|
+
- [Bring Your Own LLM Model](/docs/navie/bring-your-own-model)
|
|
20
18
|
|
|
21
19
|
**Install AppMap for your preferred code editor to get started.**
|
|
22
20
|
|
|
@@ -218,7 +218,7 @@ attribute is ignored.
|
|
|
218
218
|
The `appmap-java` annotations are provided in the package `com.appland:appmap-annotation`, available on [Maven Central](https://search.maven.org/artifact/com.appland/appmap-annotation). To use them, add that package as a dependency in your build configuration file (`pom.xml`, `build.gradle`).
|
|
219
219
|
|
|
220
220
|
### @Labels
|
|
221
|
-
`appmap-java` suports the addition of [code labels](
|
|
221
|
+
`appmap-java` suports the addition of [code labels](/docs/reference/appmap-java.html#annotations) through the `com.appland.appmap.annotation.Labels` annotation.
|
|
222
222
|
|
|
223
223
|
#### Usage
|
|
224
224
|
Once the `Labels` annotation is available, you can apply it to methods in your application. For example:
|
|
@@ -37,10 +37,15 @@ step: 4
|
|
|
37
37
|
|
|
38
38
|
## About
|
|
39
39
|
|
|
40
|
-
`appmap` is a Python package for
|
|
40
|
+
`appmap` is a Python package for creating [AppMap Diagrams](https://github.com/getappmap/appmap) of
|
|
41
|
+
your code.
|
|
41
42
|
|
|
42
43
|
{% include docs/what_is_appmap_snippet.md %}
|
|
43
44
|
|
|
45
|
+
`appmap` works by modifying the way python imports the modules of an application. After a module is
|
|
46
|
+
imported, `appmap` examines it for function definitions. Each function is instrumented, so that when
|
|
47
|
+
it is called, a trace event will be added to the current recording.
|
|
48
|
+
|
|
44
49
|
### Supported versions
|
|
45
50
|
|
|
46
51
|
{% include docs/python_support_matrix.html %}
|
|
@@ -48,21 +53,29 @@ step: 4
|
|
|
48
53
|
Support for new versions is added frequently, please check back regularly for updates.
|
|
49
54
|
|
|
50
55
|
## Installation
|
|
56
|
+
`appmap` works best when installed in a virtual environment, usually one associated with a project.
|
|
57
|
+
This helps ensure that the project's code will be instrumented, while reducing the chance of
|
|
58
|
+
interference with other python utilities.
|
|
59
|
+
|
|
60
|
+
If your project uses `pip` for dependency management, add the `appmap` package to the project's
|
|
61
|
+
requirements file or install it directly. Specifying the `--require-virtualenv` switch ensures that
|
|
62
|
+
it will only be installed in a virtual environment.
|
|
51
63
|
|
|
52
|
-
If your project uses `pip` for dependency management, add the `appmap` package to the requirements
|
|
53
|
-
file or install it directly with
|
|
54
64
|
```shell
|
|
55
|
-
pip install appmap
|
|
65
|
+
pip install --require-virtualenv appmap
|
|
56
66
|
```
|
|
57
67
|
{: .example-code}
|
|
58
68
|
|
|
59
|
-
For projects that use `poetry` , add the `appmap` package to `pyproject.toml`.
|
|
69
|
+
For projects that use `poetry` , add the `appmap` package to `pyproject.toml`. Note that, by
|
|
70
|
+
default, `poetry` manages dependencies using a virtual environment.
|
|
71
|
+
|
|
60
72
|
```
|
|
61
73
|
poetry add --group=dev appmap
|
|
62
74
|
```
|
|
63
75
|
{: .example-code}
|
|
64
76
|
|
|
65
|
-
`pipenv` is also supported
|
|
77
|
+
`pipenv` is also supported. Like `poetry`, `pipenv` installs dependencies in a virtual environment.
|
|
78
|
+
|
|
66
79
|
```
|
|
67
80
|
pipenv install --dev appmap
|
|
68
81
|
```
|
|
@@ -72,8 +85,14 @@ pipenv install --dev appmap
|
|
|
72
85
|
|
|
73
86
|
## Configuration
|
|
74
87
|
|
|
75
|
-
|
|
76
|
-
|
|
88
|
+
`appmap` is configured using a YAML file. By default, `appmap` looks in the current working
|
|
89
|
+
directory for a file named `appmap.yml`.
|
|
90
|
+
|
|
91
|
+
`appmap.yml` contains information used to create AppMap Data files. It allows you to specify the
|
|
92
|
+
application's name, as well as the modules that should be instrumented.
|
|
93
|
+
|
|
94
|
+
For each module, add the fully-qualified module name as the value of a `path` property. These names
|
|
95
|
+
should be in the format used in an `import` statement:
|
|
77
96
|
|
|
78
97
|
```
|
|
79
98
|
name: my_python_app
|
|
@@ -92,21 +111,28 @@ Add your modules as `path` entries in `appmap.yml`, and external packages
|
|
|
92
111
|
# exclude:
|
|
93
112
|
# - django.db
|
|
94
113
|
```
|
|
114
|
+
Notes about this example:
|
|
115
|
+
* The application has two modules that will be recorded: `app.mod1` and
|
|
116
|
+
`app.mod2`. When the python interpreter imports one of those modules (e.g. by evaluating `import
|
|
117
|
+
app.mod1`, `from app import mod1`, `from app import *`, etc), `appmap` will instrument the
|
|
118
|
+
functions in the imported module.
|
|
119
|
+
|
|
120
|
+
If the value of a `path` property cannot be parsed as a module name, `appmap` will issue an error
|
|
121
|
+
and exit.
|
|
95
122
|
|
|
96
|
-
|
|
97
|
-
|
|
123
|
+
* An `exclude` is resolved relative to the associated path. So, for example, this configuration
|
|
124
|
+
excludes `app.mod2.MyClass`.
|
|
98
125
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
[database of installed Python
|
|
102
|
-
This is generally the same package name
|
|
103
|
-
in `pyproject.toml`. You can additionally use `path` and
|
|
104
|
-
entries to limit the capture to specific patterns.
|
|
126
|
+
* An external [distribution
|
|
127
|
+
package](https://packaging.python.org/glossary/#term-Distribution-Package) can be specified using
|
|
128
|
+
the `dist` specifier. The names are looked up in the [database of installed Python
|
|
129
|
+
distributions](https://www.python.org/dev/peps/pep-0376/). This is generally the same package name
|
|
130
|
+
as you'd give to `pip install` or put in `pyproject.toml`. You can additionally use `path` and
|
|
131
|
+
`exclude` on `dist` entries to limit the capture to specific patterns.
|
|
105
132
|
|
|
106
|
-
By default, shallow capture is enabled on `dist` packages, suppressing tracking
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
You can also use `shallow: true` on `path` entries.
|
|
133
|
+
By default, shallow capture is enabled on `dist` packages, suppressing tracking of most internal
|
|
134
|
+
execution flow. This allows you to capture the interaction without getting bogged down with detail.
|
|
135
|
+
To see these details, set `shallow: false`. You can also use `shallow: true` on `path` entries.
|
|
110
136
|
|
|
111
137
|
## Enabling and disabling recording
|
|
112
138
|
|