Using tags to organize and label all the monitored entities in your environment provides an invaluable means of filtering your server-side services for purposes of developing component-specific dashboard charts and assigning responsibility to specific team members or groups. However, managing and applying tags within large, dynamic environments can be a real challenge. Dynatrace already allows users to define automated rule-based tags to address this issue. In many cases, however, it’s more convenient to assign tags when your applications are initially deployed. This is why Dynatrace now enables you to define tags based on environment variables.
Define tags as an environment variable
You can now define an environment variable called
DT_TAGS on the process or host level. The format of the variable is simple. The variable can contain simple strings or key/value pairs (for example,
DT_TAGS=MikesStuff easyTravel=Mike). As you can see in the Windows process example below, you can define multiple tags. Spaces are used to separate tag values.
In the Dynatrace UI, the example environment variable shown above results in new filters being displayed on the related process overview page (see below). Process group overview pages display the sum of all the tags of all processes in the group.
At the moment this feature applies only to processes that are deep monitored via Dynatrace OneAgent (Java, Apache Webserver, Nginx, .NET, Node.js, PHP, Go , and IIS, but we will soon extend it to cover more).
We’re now working on enabling use of environment-variable based tags throughout all Dynatrace analysis views, so stay tuned for updates.
Note: This feature requires OneAgent version 125 or above.