Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digma-ai/digma-vscode-plugin
๐งโ๐ป Visual Studio Code extension for Digma
https://github.com/digma-ai/digma-vscode-plugin
continuous-delivery csharp dotnet intellisense python vscode vscode-extension
Last synced: about 2 months ago
JSON representation
๐งโ๐ป Visual Studio Code extension for Digma
- Host: GitHub
- URL: https://github.com/digma-ai/digma-vscode-plugin
- Owner: digma-ai
- License: mit
- Created: 2021-12-20T06:18:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-06T13:01:18.000Z (over 1 year ago)
- Last Synced: 2023-07-06T14:25:28.871Z (over 1 year ago)
- Topics: continuous-delivery, csharp, dotnet, intellisense, python, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://www.digma.ai/
- Size: 26.5 MB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 83
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Digma Visual Studio Code Plugin
This is a [Visual Studio Code](https://code.visualstudio.com) extension for Digma, providing continuous feedback to developers. With this extension, developer can see insights related to their code, derived from sources such as OpenTelemetry, right in the IDE. To read more about the Digma platform visit our [main repo](https://github.com/digma-ai/digma).
โ ๏ธ Note that this is still a *pre-release* extension, and will probably not be very useful without a Digma backend. If we've picked your interest and you'd like to try it out please join our early [beta program](https://www.digma.ai/) which will be released soon! (pending feedback ๐ค). Also notice that there's guaranteed to be a slew of breaking changes between now and the public release.
## ๐คจ What does this extension do?
It provides code objects insights and runtime analytics inside the IDE. The IDE is intended to be extensible (currently refactoring toward that), so that anyone would be able to define new types of insights based on the collected data.
- [Digma Visual Studio Code Plugin](#digma-visual-studio-code-plugin)
- [๐คจ What does this extension do?](#-what-does-this-extension-do)
- [๐ฌ Code Objects Discovery](#-code-object-discovery)
- [๐งโ๐ป Pull Request Insights (WIP)](#-pull-request-insights-wip)
- [๐งโ๐ฌ Code Insights](#-code-insights)
- [๐ชณ Runtime Errors](#-runtime-errors)
- [? What is a code object flow ?](#-what-is-a-code-object-flow-)
- [๐ Runtime Errors Drilldown](#-runtime-errors-drilldown)
- [๐ฆ Code Objects Annotation](#-code-objects-annotation)
- [๐ฏ Usage Analytics](#-usage-analytics)
- [แจ Selecting Environments](#-selecting-environments)
- [How to Build](#how-to-build)
- [License](#license)### ๐ฌ Code Object Discovery
Discovering code objects is a key part of the extension functionality. Code objects can be anything that can be found in the code on the client side, and from the observability data on the backend. Code objects are associated with aggregated data and insights.
In the below example, you can see some potential code objects to discover marked out in red:
There are many types of possible code objects, this is where the platform is extensible to support them both on client and server. Here is some of current backlog:
- โ Functions/methods
- โ REST endpoints
- โ OTEL Spans
- โ GRPC endpoints (WIP)
- RabbitMQ event classes
- Kafka producer
- Classes/modules
- More...Of course code object discovery is language specific, sometimes platform or library specific.
More basic method/function discovery is done using the language server for that specific programming language already installed in the IDE.
### ๐งโ๐ป Pull Request Insights (WIP)
Commits are a way to group code object feedback together. Digma's backend already tags each metric and trace by the relevant commit identifier.
TBD
### ๐งโ๐ฌ Code Insights
Based on the code section currently focused on the IDE, the Code Insights sidebar panel displays the relevant insights for the discovered code objects in that section. While focused on a specific function in the code I'll be able to see all relevant insights.
The IDE extension in this case simply queries the backend API with the discovered code object identifier. The backend provides back a list of insights that were gleaned from the observability data that relate to these objects.
![Insights](/.github/assets/insights_tab.png)
### ๐ชณ Runtime Errors
The runtime errors panel provides analytics over the error behavior of both the specific code object and the different code object flows it participates in.
The errors are not displayed as raw data ๐ฅฉ. Digma already groups together errors which essentially signify the same problem and also highlights those errors that are "interesting". What makes an error interesting? That is something decided by the backend scoring processes but some reasons may include:
- ๐ It is trending up!
- ๐ It is something that started recently
- ๐ฃ It is affecting multiple services
- ๐ณ It is not handled internally some other place
#### ? What is a code object flow ?
Digma identifies flows which describe how code objects are used together. It can be useful to think about a code flow like a 'proto-trace'. Basically grouping together all traces that are extremely similar as a 'flow' within the application and starting to aggregate information about that flow.
### ๐ Runtime Errors Drilldown
There are multiple ways in which additional information is provided regarding the errors.
Including highlighting of specific lines within the code itself. However, by double clicking into a specific error type we can get more information about it as well as navigate the callstack to understand its origins:![Errors Drilldown](/.github/assets/error_drilldown.png)
### ๐ฆ Code Objects Annotation
Some insights can be highlighting in the code itself using code annotations. Based on the information passed on from the backend the extension will proactively display annotations or even highlight a specific code object to provide feedback.
![Insight annotation](/.github/assets/annotation.png)
Another way to provide feedback on code object behavior is through their tooltips. For example, looking at this function object I can already see which runtime error types I should be expecting:
Insights on runtime data can also be displayed. For example, in this case Digma has identified that in all different occurrences of this specific error, a parameter is always `None`:
![Parameter data insights](/.github/assets/data_info.png)
### ๐ฏ Usage Analytics
Some of the insights provide additional information regarding how the code is used and what is the change impact radius. Below we can see different span sources reaching the selection code section with a simple breakdown.
![Parameter data insights](/.github/assets/usage.png)
### แจ Selecting Environments
The observability data is typically collected from multiple environments (staging, dev, prod, CI, etc.). The Context panel allows the user to choose the environment he would like to see feedback from.
Environments can be easily assigned to observability data collected via an env variable on the running process.
![context-panel](/.github/assets/context-panel.png)
## โ๏ธ Extension Settings
This extension contributes the following settings:
| Key | Description |
| :--- | :--- |
| `digma.enableCodeLens` | Enable/disable methods codelens regarding errors. |
| `digma.url` | Digma api endpoint url. |
| `digma.environment` | Filter the telemetry data by environment.
Can be set from the [Context](#context-panel) panel, by selecting from the **Environment** dropdown. |
| `digma.hideFramesOutsideWorkspace` | Show/Hide frame of files that do not belong to the opened workspace(s)
Can be in [Error Flow Details](#error-flow-details-panel) panel, by checking/unchecking the **Workspace only** checkbox). |
| `digma.sourceControl` | Workspace's source control - used to open files in specific revision.
Only `git` is supported for now. |
| `digma.enableNotifications` | Enable/disable insight event notifications.|## How to Build
```shell
npm install
vsce package
```## License
[MIT](/LICENSE)