This repo is the companion to this video and this blog post.
You will need:
- A Linux VM with docker and docker compose installed
- A Dynatrace environment (sign up for a free trial)
- Make a note of your Dynatrace environment URL (e.g.
https://abc12345.live.dynatrace.com
without the trailing slash) - Create a new Access Token with the following permissions:
ReadConfig
,WriteConfig
,settings.write
,Create and read synthetic monitors, locations, and nodes
,CaptureRequestData
Clone this repository to the Linux VM:
cd ~
git clone https://github.com/dynatrace-perfclinics/openfeature-with-dynatrace
cd ~/openfeature-with-dynatrace
Modify the following with your details and run:
export DT_ENVIRONMENT=https://abc12345.live.dynatrace.com # Note: without trailing slash
export DT_TOKEN=dtc01.*****.*****
export VM_IP=1.2.3.4
These variables are used later by Monaco to parameterise your Dynatrace configuration.
DT_ENVIRONMENT
andDT_TOKEN
are used to know where Monaco should apply the config (i.e. Which DT environment)VM_IP
is used to set the application detection rule so RUM data is routed to the correct DT application
The OpenFeature demo contains 3 important span attributes.
Tell Dynatrace to automatically capture and store the values.
chmod +x ~/openfeature-with-dynatrace/scripts/trackSpanAttributes.sh
~/openfeature-with-dynatrace/scripts/trackSpanAttributes.sh $DT_ENVIRONMENT $DT_TOKEN
Note: you may receive 401
responses if some / all of those span attributes are already monitored. That's OK, just proceed.
Install a FullStack OneAgent: Go to your environment and click on "Deploy Dynatrace" > "Start Installation" > "Linux".
Best practice: Always set a host group. For example: openfeature-demo
Your installation command should look similar to this:
sudo /bin/sh Dynatrace-OneAgent-Linux-1.***.***.sh --set-infra-only=false --set-app-log-content-access=true --set-host-group=openfeature-demo
cd ~
git clone https://github.com/open-feature/playground
cd playground
docker compose up --detach
The OpenFeature demo should now be accessible via a browser on port 30000
of your Linux VM.
Finally, apply the Dynatrace configuration using Monaco.
First, change directory to the monaco
folder and download the latest Monaco binary to that directory:
cd ~/openfeature-with-dynatrace/monaco
wget -O monaco https://github.com/dynatrace-oss/dynatrace-monitoring-as-code/releases/download/v1.8.7/monaco-linux-amd64
chmod +x monaco
export NEW_CLI=1
./monaco deploy -e environments.yaml
This will automatically create the following pieces of configuration:
- An application & detection rules
- Auto tagging rules
- Calculate service metrics and request attributes based on the span attribute values capture from OpenTelemetry
- A management zone
- 2x synthetic monitors
Go to "Dashboards" and look for "OpenFeature Dashboard". In a few moments, you should see data flowing into the system (some tiles will be blank - that's OK).
Modify the flags in the demo system http://VM_IP:30000
and the dashboard should automatically track and report your changes.
Please create an Issue in this repo.