Skip to main content

Settings

You can define all settings either globally or for each workspace.

Note

You can learn more about accessing these settings in Visual Studio Code's official documentation.

Credentials

Dynatrace Extensions can either generate all the credentials required for Extension 2.0 development or allow you to bring your own credential files.

When using your credentials

You need to provide your files by using these settings:

SettingDescription
dynatraceExtensions.developerCertkeyLocationThis is the path to your developer credential file.
dynatraceExtensions.rootOrCaCertificateLocationis the path to your root (CA) certificate.

Example usage:

./vscode/settings.json
{
"dynatraceExtensions.developerCertkeyLocation": "C:\\Temp\\certificates\\dev.pem",
"dynatraceExtensions.rootOrCaCertificateLocation": "C:\\Temp\\certificates\\ca.pem"
}

When generating credentials

You can customize the details that are embedded into the generated certificates by using these settings:

SettingDefault valueDescription
dynatraceExtensions.certificateCommonNameExtension DeveloperThe certificate's common name (CN) attribute.
dynatraceExtensions.certificateOrganizationThe certificate's organization (O) attribute.
dynatraceExtensions.certificateOrganizationUnitThe certificate's organization unit (OU) attribute.
dynatraceExtensions.certificateStateOrProvinceThe certificate's state or province (ST) attribute.
dynatraceExtensions.certificateCountryCodeThe certificate's country code (C) attribute.

Behavior

The add-on aims to allow users to customize their extension development experience as much as possible. The following settings allow turning various features on or off on demand.

Features

SettingDefault valueDescription
dynatraceExtensions.metricSelectorsCodeLenstrueMetric selector code lens
dynatraceExtensions.entitySelectorsCodeLenstrueEntity selector code lens
dynatraceExtensions.fastDevelopmentModefalseFast development mode
dynatraceExtensions.wmiCodeLenstrueWMI queries code lens
dynatraceExtensions.screenCodeLenstrueUnified analysis screen code lens

Logging

SettingDefault valueDescription
dynatraceExtensions.logging.levelINFOThe minimum level of log messages
dynatraceExtensions.logging.maxFiles10The maximum number of log files (by age) kept on disk.
dynatraceExtensions.logging.maxFileSize10The maximum size of a single log file (in MB).

Tenant Connectivity Settings

The add-on always performs web requests to your Dynatrace environment over HTTPS. In specific scenarios—for example, in Dynatrace Managed—your environment may be accessible through a dedicated endpoint that uses either a custom-signed or a self-signed SSL certificate. While valid for encryption, most frameworks and browsers don't recognize these certificates as trusted, which causes requests to fail.

The dynatraceExtensions.tenantConnectivitySettings setting is only available from your settings.json file and represents an array of environment endpoints that require special settings for HTTPS connectivity. Each entry in the array is an object with the following details:

AttributeDefault valueDescription
tenantUrl""The base URL to your Dynatrace environment. The add-on will use the URL to decide when to apply special connectivity settings on web requests.
certificatePath""The path on disk to a Root/CA file in .pem or .crt format. The add-on will load this file and add it to the list of trusted CAs for the given tenantUrl.
disableSSLVerificationfalseWhen enabled, the add-on ignores SSL certificates for the given tenantUrl. Enable this only when using self-signed certificates on your Dynatrace endpoint.

Example:

  • Adding a custom certificate to the trusted CAs:

    settings.json
    "dynatraceExtensions.tenantConnectivitySettings": [
    {
    "tenantUrl": "https://10.0.0.1:5555/e/my-tenant",
    "certificatePath": "C:\\Temp\\my_custom.crt"
    }
    ]
  • Using a self-signed certificate on an endpoint:

    settings.json
    "dynatraceExtensions.tenantConnectivitySettings": [
    {
    "tenantUrl": "https://my.custom.endpoint/e/my-other-tenant",
    "disableSSLVerification": true
    }
    ]

Diagnostics

SettingDefault valueDescription
dynatraceExtensions.diagnostics.alltrueAll diagnostics
dynatraceExtensions.diagnostics.extensionNametrueThe name of the extension
dynatraceExtensions.diagnostics.metricKeystrueKeys used for metric definitions
dynatraceExtensions.diagnostics.cardKeystrueKeys of cards referenced/defined in the screens section
dynatraceExtensions.diagnostics.snmptrueSNMP data source, especially the use of OIDs
Tip

Learn more about Dynatrace Extensions custom diagnostics.

Python environment

The settings in this section allow you to customize the details of your virtual environment when working with Python extensions.

SettingDefault valueDescription
dynatraceExtensions.pythonExtraPlatforms[ "linux_x86_64", "win_amd64" ]A list of platforms to build Python packages for.
Still have questions?
Find answers in the Dynatrace Community