diff --git a/getting-started/index.html b/getting-started/index.html index c078389..7211c69 100755 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -517,9 +517,9 @@
You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.
Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. abc12345
in the following examples):
https://abc12345.live.dynatrace.com
+https://abc12345.live.dynatrace.com
https://abc12345.apps.dynatrace.com
-
+
Reformat the URL like this: https://TENANT_ID.live.dynatrace.com
eg. https://abc12345.live.dynatrace.com
Gather Details: Create API Token#
k6 requires an API token to stream metrics to Dynatrace.
diff --git a/images/load-test-integration-flow-release-validation.jpg b/images/load-test-integration-flow-release-validation.jpg
new file mode 100755
index 0000000..6d73f6b
Binary files /dev/null and b/images/load-test-integration-flow-release-validation.jpg differ
diff --git a/images/load-test-integration-flow.jpg b/images/load-test-integration-flow.jpg
index 6d73f6b..780d112 100755
Binary files a/images/load-test-integration-flow.jpg and b/images/load-test-integration-flow.jpg differ
diff --git a/index.html b/index.html
index 6c9ebd2..56acd8e 100755
--- a/index.html
+++ b/index.html
@@ -499,10 +499,15 @@ 1. About
Logical Architecture#
Below is the "flow" of information and actors during this demo.
This architecture also holds true for other load testing tools (eg. JMeter).
+
+Tip
+This can (and should be) extended as demonstrated in the release validation Observability Lab)
+to include the ability to trigger automated deployment checks.
+
-
A load test is executed.
-The HTTP requests are annotated with the standard header values(target=_blank).
+The HTTP requests are annotated with the standard header values.
-
Metrics are streamed during the load test (if the load testing tool supports this)
@@ -513,22 +518,6 @@
Logical Architectureworkflow is triggered on receipt of this event.
-The workflow triggers the Site Reliability Guardian.
-
--
-
The Site Reliability Guardian processes the load testing metrics and to provide an automated load testing report.
-This can be used for information only or can be used as an automated "go / no go" decision point.
-
--
-
Dynatrace users can view the results in a dashboard, notebook or use the result as a trigger for further automated workflows.
-
--
-
Integrators have the choice to send (emit) the results to an external tool.
-This external tool can then use this result.
-One example would be sending the SRG result to Jenkins to progress or prevent a deployment.
-
Compatibility#
diff --git a/run-demo/index.html b/run-demo/index.html
index 782ce93..ae4c8b9 100755
--- a/run-demo/index.html
+++ b/run-demo/index.html
@@ -560,15 +560,15 @@ Import Dynatrace DashboardStart k6#
In the codespace terminal, type docker ps
and wait until Docker is running.
You should see this:
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
Now run k6 with the demo script. Copy and paste this as-is into the terminal window:
-docker run \
+docker run \
-e K6_DYNATRACE_URL=$DT_URL \
-e K6_DYNATRACE_APITOKEN=$DT_K6_TOKEN \
--mount type=bind,source=./k6scripts,target=/k6scripts hrexed/xk6-dynatrace-output:0.11 run /k6scripts/script.js \
-o output-dynatrace
-
+
Validate Metrics#
k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.
In Dynatrace:
@@ -581,10 +581,10 @@ Validate Metrics
View Events#
When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.
-// Run load with 2 virtual users for 1 minute
+// Run load with 2 virtual users for 1 minute
export const options = {
vus: 2,
- duration: '1m',
+ duration: '1m',
};
...
@@ -592,8 +592,8 @@ View EventsView Events
+
Notice that the event contains metadata such as the provider
and service
which can be used for filtering in Dynatrace (see DQL below).
This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.
In Dynatrace:
@@ -616,10 +616,10 @@ View EventsOpen an existing notebook or create a new one
Add a new DQL
section and paste the following
-fetch events
+fetch events
| filter event.kind == "SDLC_EVENT"
| filter event.provider == "k6"
-
+
User exercise: Modify the JSON body to also send the number of Virtual Users (VUs) used to Dynatrace. Re-run the load test to see the new event.
View Dashboard#
diff --git a/search/search_index.json b/search/search_index.json
index 074bda8..9658361 100755
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.
"},{"location":"#logical-architecture","title":"Logical Architecture","text":"Below is the \"flow\" of information and actors during this demo.
This architecture also holds true for other load testing tools (eg. JMeter).
-
A load test is executed. The HTTP requests are annotated with the standard header values(target=_blank).
-
Metrics are streamed during the load test (if the load testing tool supports this) or the metrics are send at the end of the load test.
-
The load testing tool is responsible for sending an SDLC event to signal \"test is finished\". Integrators are responsible for crafting this event to contain any important information required by Dynatrace such as the test duration.
-
A workflow is triggered on receipt of this event. The workflow triggers the Site Reliability Guardian.
-
The Site Reliability Guardian processes the load testing metrics and to provide an automated load testing report. This can be used for information only or can be used as an automated \"go / no go\" decision point.
-
Dynatrace users can view the results in a dashboard, notebook or use the result as a trigger for further automated workflows.
-
Integrators have the choice to send (emit) the results to an external tool. This external tool can then use this result. One example would be sending the SRG result to Jenkins to progress or prevent a deployment.
"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f - Click Here to Begin
"},{"location":"cleanup/","title":"4. Cleanup","text":"To cleanup resources, go to https://github.com/codespaces and delete the codespace.
You may also want to deactivate or delete the API token.
- What's Next?
"},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.
Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. abc12345
in the following examples):
https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n
Reformat the URL like this: https://TENANT_ID.live.dynatrace.com
eg. https://abc12345.live.dynatrace.com
"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"k6 requires an API token to stream metrics to Dynatrace.
Create an API token with the following permissions:
metrics.ingest
openpipeline.events_sdlc
"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"Click this button to launch the demo in a new tab.
- Click Here to Run the Demo
"},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":" - Sign up for a Dynatrace Trial
- k6 on Dynatrace Hub
- Dynatrace xk6 output plugin source code on GitHub
- This tutorial on GitHub
"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"While you are waiting for the environment, add the dashboard to your Dynatrace environment.
- Save the k6 dashboard to your local machine.
- In Dynatrace, navigate to
Dashboards
and click Upload
- Upload the dashboard JSON file
"},{"location":"run-demo/#start-k6","title":"Start k6","text":"In the codespace terminal, type docker ps
and wait until Docker is running.
You should see this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n
Now run k6 with the demo script. Copy and paste this as-is into the terminal window:
docker run \\\n -e K6_DYNATRACE_URL=$DT_URL \\\n -e K6_DYNATRACE_APITOKEN=$DT_K6_TOKEN \\\n --mount type=bind,source=./k6scripts,target=/k6scripts hrexed/xk6-dynatrace-output:0.11 run /k6scripts/script.js \\\n -o output-dynatrace\n
"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.
In Dynatrace:
- Press
ctrl + k
and search for notebooks
- Create a new notebook and add a new
DQL
section - Type the following:
timeseries avg(k6)
- Press
ctrl + =
to bring up auto completion. You should see the list of ingest
"},{"location":"run-demo/#view-events","title":"View Events","text":"When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.
// Run load with 2 virtual users for 1 minute\nexport const options = {\n vus: 2,\n duration: '1m',\n};\n\n...\n\nexport function teardown() {\n let post_params = {\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Api-Token ${__ENV.K6_DYNATRACE_APITOKEN}`\n },\n };\n\n // Send SDLC event at the end of the test\n let payload = {\n \"event.provider\": \"k6\",\n \"event.type\": \"test\",\n \"event.category\": \"finished\",\n \"service\": \"dummyservice\",\n \"duration\": options.duration\n }\n let res = http.post(`${__ENV.K6_DYNATRACE_URL}/platform/ingest/v1/events.sdlc`, JSON.stringify(payload), post_params);\n}\n
Notice that the event contains metadata such as the provider
and service
which can be used for filtering in Dynatrace (see DQL below).
This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.
In Dynatrace:
- Press
ctrl + k
and search for notebooks
- Open an existing notebook or create a new one
- Add a new
DQL
section and paste the following
fetch events\n| filter event.kind == \"SDLC_EVENT\"\n| filter event.provider == \"k6\"\n
User exercise: Modify the JSON body to also send the number of Virtual Users (VUs) used to Dynatrace. Re-run the load test to see the new event.
"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"Open the prebuilt dashboard you previously uploaded.
Go to Dashboards (ctrl + k
and search for Dashboards
)
The dashboard will begin to be populated with data.
The demo is complete.
- Click Here to Delete and Cleanup resources
"},{"location":"whats-next/","title":"5. What's Next?","text":"The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using xk6
.
You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.
View the resources page for more links and useful materials.
- View Resources
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.
"},{"location":"#logical-architecture","title":"Logical Architecture","text":"Below is the \"flow\" of information and actors during this demo.
This architecture also holds true for other load testing tools (eg. JMeter).
Tip
This can (and should be) extended as demonstrated in the release validation Observability Lab) to include the ability to trigger automated deployment checks.
-
A load test is executed. The HTTP requests are annotated with the standard header values.
-
Metrics are streamed during the load test (if the load testing tool supports this) or the metrics are send at the end of the load test.
-
The load testing tool is responsible for sending an SDLC event to signal \"test is finished\". Integrators are responsible for crafting this event to contain any important information required by Dynatrace such as the test duration.
"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f - Click Here to Begin
"},{"location":"cleanup/","title":"4. Cleanup","text":"To cleanup resources, go to https://github.com/codespaces and delete the codespace.
You may also want to deactivate or delete the API token.
- What's Next?
"},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.
Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. abc12345
in the following examples):
https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n
Reformat the URL like this: https://TENANT_ID.live.dynatrace.com
eg. https://abc12345.live.dynatrace.com
"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"k6 requires an API token to stream metrics to Dynatrace.
Create an API token with the following permissions:
metrics.ingest
openpipeline.events_sdlc
"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"Click this button to launch the demo in a new tab.
- Click Here to Run the Demo
"},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":" - Sign up for a Dynatrace Trial
- k6 on Dynatrace Hub
- Dynatrace xk6 output plugin source code on GitHub
- This tutorial on GitHub
"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"While you are waiting for the environment, add the dashboard to your Dynatrace environment.
- Save the k6 dashboard to your local machine.
- In Dynatrace, navigate to
Dashboards
and click Upload
- Upload the dashboard JSON file
"},{"location":"run-demo/#start-k6","title":"Start k6","text":"In the codespace terminal, type docker ps
and wait until Docker is running.
You should see this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n
Now run k6 with the demo script. Copy and paste this as-is into the terminal window:
docker run \\\n -e K6_DYNATRACE_URL=$DT_URL \\\n -e K6_DYNATRACE_APITOKEN=$DT_K6_TOKEN \\\n --mount type=bind,source=./k6scripts,target=/k6scripts hrexed/xk6-dynatrace-output:0.11 run /k6scripts/script.js \\\n -o output-dynatrace\n
"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.
In Dynatrace:
- Press
ctrl + k
and search for notebooks
- Create a new notebook and add a new
DQL
section - Type the following:
timeseries avg(k6)
- Press
ctrl + =
to bring up auto completion. You should see the list of ingest
"},{"location":"run-demo/#view-events","title":"View Events","text":"When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.
// Run load with 2 virtual users for 1 minute\nexport const options = {\n vus: 2,\n duration: '1m',\n};\n\n...\n\nexport function teardown() {\n let post_params = {\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Api-Token ${__ENV.K6_DYNATRACE_APITOKEN}`\n },\n };\n\n // Send SDLC event at the end of the test\n let payload = {\n \"event.provider\": \"k6\",\n \"event.type\": \"test\",\n \"event.category\": \"finished\",\n \"service\": \"dummyservice\",\n \"duration\": options.duration\n }\n let res = http.post(`${__ENV.K6_DYNATRACE_URL}/platform/ingest/v1/events.sdlc`, JSON.stringify(payload), post_params);\n}\n
Notice that the event contains metadata such as the provider
and service
which can be used for filtering in Dynatrace (see DQL below).
This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.
In Dynatrace:
- Press
ctrl + k
and search for notebooks
- Open an existing notebook or create a new one
- Add a new
DQL
section and paste the following
fetch events\n| filter event.kind == \"SDLC_EVENT\"\n| filter event.provider == \"k6\"\n
User exercise: Modify the JSON body to also send the number of Virtual Users (VUs) used to Dynatrace. Re-run the load test to see the new event.
"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"Open the prebuilt dashboard you previously uploaded.
Go to Dashboards (ctrl + k
and search for Dashboards
)
The dashboard will begin to be populated with data.
The demo is complete.
- Click Here to Delete and Cleanup resources
"},{"location":"whats-next/","title":"5. What's Next?","text":"The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using xk6
.
You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.
View the resources page for more links and useful materials.
- View Resources
"}]}
\ No newline at end of file