Dynatrace Extensions leverages the full power of your VS Code editor to help you create better extensions faster.
Read on to learn how to make the most out of these features.
| Feature type | Description |
|---|---|
Suggestions for auto-completing words or fields of the manifest | |
Commands generating or editing the content of your extension's manifest | |
Additional commands to interact with extension data | |
A workflow focused on speed of delivery | |
Additional diagnostics beyond simple schema validation |
Code completions or suggestions happen at key points within the extension manifest. Either automatically or on-demand (using Ctrl + Space), these offer known values that can be inserted at the location of your cursor.
| Keyword trigger | Effects |
|---|---|
On | Browse metrics and dimensions scraped using the Prometheus code lens |
On | For those metrics that have been scraped using the Prometheus code lens, add the description from the scraped data |
Code actions happen on key lines of your extension manifest. Your editor will automatically show a lightbulb icon
whenever actions are relevant to the clicked line. Typically these will generate and insert content into
your extension manifest or fix issues highlighted by
Dynatrace Extensions.
| Action trigger | Effects |
|---|---|
When clicking on | Automatically add details from a scraped Prometheus endpoint |
Code lenses are actionable, contextual information interspersed with your code. For Dynatrace Extensions, these can help trigger code-related actions to your Dynatrace environment or other external endpoints.
The lens appears automatically at the top of unified analysis (JSON) documents and shows:
Infrastructure & Operations
Infrastructure & OperationsThe lens appears automatically when the Prometheus data source is defined and shows:
After the data has been scraped, this can be used with Code actions to:
prometheus section of the manifestprometheus section of the manifestmetrics section of the manifestThe lens appears automatically over queries inside the WMI data source definition and shows:
The full results of running the WMI query are displayed in a separate panel. After a query is run, you can use the results with Code completions.
Fast development mode is a workflow designed to allow advanced developers to gain immediate feedback on the current state of their extension and minimize the steps and time it takes to see updates in their connected Dynatrace environment.
When enabled, every time the extension manifest saves, the extension version automatically increments, and the extension is packaged, signed, and uploaded to your connected environment. The workflow is hands-free, so if the maximum number of extension versions is reached, one will be removed automatically so the upload can succeed.
An accompanying status bar confirms the mode is active and displays the status of the last attempted build.
With this workflow, pre-upload validation is skipped in favor of speed, and any issues are communicated immediately via an output channel.
When developing your static assets, such as the unified analysis pages, this mode is the quickest way to cycle through a variety of changes before finding your ideal configuration.
Often, perfectly valid YAML still produces a manifest that causes issues when we upload the extension to Dynatrace or later when it tries to run. Many of these situations can be caught early, and Dynatrace Extensions aims to bring these to light so you can fix them and reduce the number of failed deployment attempts.
On every edit of your extension manifest, the diagnostics suite will trigger an update of all diagnostic items applicable to that file. Based on findings, relevant content is highlighted within the manifest, and hovering over the highlight will provide more details about the issue.
Some issues may provide a Quick fix link as part of the hover information. If this is available, it will trigger a content change of the document to resolve the highlighted issue.
Diagnostic severities:
Error - these findings are highlighted in red and represent issues that would break your extension when deployed. The Build command won't work if Error severity diagnostics are in your manifest.Warning - these findings are highlighted in yellow and represent issues that would not stop an extension from functioning but may still produce undesired behaviors.| Code | Severity | What does it mean? |
|---|---|---|
DED001 |
| Your extension doesn't have a name, which is mandatory. |
DED002 |
| Your extension's name needs to be less than 50 characters. |
DED003 |
| Your extension's name is invalid. It should only contain lowercase letters, numbers, hyphens, underscores, or dots. |
DED004 |
| Your extension's name needs to start with custom: but it doesn't. |
DED005 |
| Internal Dynatrace extension names shouldn't start with custom:. |
DED006 |
| Metrics of type count should have keys ending in .count or _count. |
DED007 |
| Metrics of type gauge shouldn't have keys ending in .count or _count. |
DED008 |
| You referenced this card key in a screen layout, but it doesn't have a definition. |
DED009 |
| You defined this card, but you're not referencing it in the screen layout. |
DED010 |
| There is no online data about this Object Identifier (OID). You may want to validate it. |
DED011 |
| This OID isn't readable. The access permissions (MAX-ACCESS) don't allow it. |
DED012 |
| This OID returns a string, but you're using it as a metric value. |
DED013 |
| This OID returns a Counter, but you're using it as a Gauge metric. |
DED014 |
| This OID returns a Gauge, but you're using it as a Counter metric. |
DED015 |
| Invalid OID syntax. OID shouldn't start/end with '.' and may only contain dots and digits. |
DED016 |
| Invalid OID syntax. OIDs shouldn't end in '.0' when 'table' is set to 'true' in the subgroup. |
DED017 |
| Invalid OID syntax. OIDs needs to end in '.0' when 'table' is set to 'false' in the subgroup. |
DED018 |
| Online data lists this OID as static, but you're using it inside a 'table' subgroup. |
DED019 |
| Online data maps this OID to table entries, but you're not using it inside a 'table' subgroup. |
The code itself doesn't mean anything; it just provides a unique identifier within all diagnostics that may come up in VS Code. We chose the DED prefix to stand for Dynatrace Extensions Diagnostic.
ExtensionsInfrastructure Observability