Skip to content

Commit

Permalink
Deployed c0dc166 with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agardnerIT committed Sep 18, 2024
1 parent 379a1ed commit c244ad7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,20 +502,20 @@ <h2 id="logical-architecture">Logical Architecture<a class="headerlink" href="#l
<ol>
<li>
<p>A load test is executed.
The HTTP requests are annotated with the standard header values.</p>
The HTTP requests are annotated with <a href="https://docs.dynatrace.com/docs/platform-modules/automations/cloud-automation/test-automation#tag-tests-with-http-headers">the standard header values</a>(target=_blank).</p>
</li>
<li>
<p>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</p>
or the metrics are send at the end of the load test.</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>A workflow is triggered on receipt of this event.
The workflow triggers the Site Reliability Guardian.</p>
<p>A <a href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows" target="_blank">workflow</a> is triggered on receipt of this event.
The workflow triggers the <a href="https://docs.dynatrace.com/docs/platform-modules/automations/site-reliability-guardian" target="_blank">Site Reliability Guardian</a>.</p>
</li>
<li>
<p>The Site Reliability Guardian processes the load testing metrics and to provide an automated load testing report.
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"<p>This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.</p> <p></p>"},{"location":"#logical-architecture","title":"Logical Architecture","text":"<p>Below is the \"flow\" of information and actors during this demo.</p> <p>This architecture also holds true for other load testing tools (eg. JMeter).</p> <ol> <li> <p>A load test is executed. The HTTP requests are annotated with the standard header values.</p> </li> <li> <p>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</p> </li> <li> <p>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.</p> </li> <li> <p>A workflow is triggered on receipt of this event. The workflow triggers the Site Reliability Guardian.</p> </li> <li> <p>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.</p> </li> <li> <p>Dynatrace users can view the results in a dashboard, notebook or use the result as a trigger for further automated workflows.</p> </li> <li> <p>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.</p> </li> </ol> <p></p>"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f <ul> <li>Click Here to Begin </li> </ul>"},{"location":"cleanup/","title":"4. Cleanup","text":"<p>To cleanup resources, go to https://github.com/codespaces and delete the codespace.</p> <p>You may also want to deactivate or delete the API token.</p> <ul> <li>What's Next? </li> </ul>"},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"<p>You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.</p> <p>Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. <code>abc12345</code> in the following examples):</p> <pre><code>https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n</code></pre> <p>Reformat the URL like this: <code>https://TENANT_ID.live.dynatrace.com</code> eg. <code>https://abc12345.live.dynatrace.com</code></p>"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"<p>k6 requires an API token to stream metrics to Dynatrace.</p> <p>Create an API token with the following permissions:</p> <ul> <li><code>metrics.ingest</code></li> <li><code>openpipeline.events_sdlc</code></li> </ul>"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"<p>Click this button to launch the demo in a new tab.</p> <p></p> <ul> <li>Click Here to Run the Demo </li> </ul>"},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":"<ul> <li>Sign up for a Dynatrace Trial</li> <li>k6 on Dynatrace Hub</li> <li>Dynatrace xk6 output plugin source code on GitHub</li> <li>This tutorial on GitHub</li> </ul>"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"<p>While you are waiting for the environment, add the dashboard to your Dynatrace environment.</p> <ol> <li>Save the k6 dashboard to your local machine.</li> <li>In Dynatrace, navigate to <code>Dashboards</code> and click <code>Upload</code></li> <li>Upload the dashboard JSON file</li> </ol>"},{"location":"run-demo/#start-k6","title":"Start k6","text":"<p>In the codespace terminal, type <code>docker ps</code> and wait until Docker is running.</p> <p>You should see this:</p> <pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n</code></pre> <p>Now run k6 with the demo script. Copy and paste this as-is into the terminal window:</p> <pre><code>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</code></pre>"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"<p>k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Create a new notebook and add a new <code>DQL</code> section</li> <li>Type the following: <code>timeseries avg(k6)</code></li> <li>Press <code>ctrl + =</code> to bring up auto completion. You should see the list of ingest</li> </ul> <p></p>"},{"location":"run-demo/#view-events","title":"View Events","text":"<p>When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.</p> <pre><code>// 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</code></pre> <p>Notice that the event contains metadata such as the <code>provider</code> and <code>service</code> which can be used for filtering in Dynatrace (see DQL below).</p> <p>This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Open an existing notebook or create a new one</li> <li>Add a new <code>DQL</code> section and paste the following</li> </ul> <pre><code>fetch events\n| filter event.kind == \"SDLC_EVENT\"\n| filter event.provider == \"k6\"\n</code></pre> <p></p> <p>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.</p>"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"<p>Open the prebuilt dashboard you previously uploaded.</p> <p>Go to Dashboards (<code>ctrl + k</code> and search for <code>Dashboards</code>)</p> <p>The dashboard will begin to be populated with data.</p> <p></p> <p>The demo is complete.</p> <ul> <li>Click Here to Delete and Cleanup resources </li> </ul>"},{"location":"whats-next/","title":"5. What's Next?","text":"<p>The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using <code>xk6</code>.</p> <p>You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.</p> <p>View the resources page for more links and useful materials.</p> <ul> <li>View Resources </li> </ul>"}]}
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"<p>This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.</p> <p></p>"},{"location":"#logical-architecture","title":"Logical Architecture","text":"<p>Below is the \"flow\" of information and actors during this demo.</p> <p>This architecture also holds true for other load testing tools (eg. JMeter).</p> <ol> <li> <p>A load test is executed. The HTTP requests are annotated with the standard header values(target=_blank).</p> </li> <li> <p>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.</p> </li> <li> <p>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.</p> </li> <li> <p>A workflow is triggered on receipt of this event. The workflow triggers the Site Reliability Guardian.</p> </li> <li> <p>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.</p> </li> <li> <p>Dynatrace users can view the results in a dashboard, notebook or use the result as a trigger for further automated workflows.</p> </li> <li> <p>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.</p> </li> </ol> <p></p>"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f <ul> <li>Click Here to Begin </li> </ul>"},{"location":"cleanup/","title":"4. Cleanup","text":"<p>To cleanup resources, go to https://github.com/codespaces and delete the codespace.</p> <p>You may also want to deactivate or delete the API token.</p> <ul> <li>What's Next? </li> </ul>"},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"<p>You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.</p> <p>Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. <code>abc12345</code> in the following examples):</p> <pre><code>https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n</code></pre> <p>Reformat the URL like this: <code>https://TENANT_ID.live.dynatrace.com</code> eg. <code>https://abc12345.live.dynatrace.com</code></p>"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"<p>k6 requires an API token to stream metrics to Dynatrace.</p> <p>Create an API token with the following permissions:</p> <ul> <li><code>metrics.ingest</code></li> <li><code>openpipeline.events_sdlc</code></li> </ul>"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"<p>Click this button to launch the demo in a new tab.</p> <p></p> <ul> <li>Click Here to Run the Demo </li> </ul>"},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":"<ul> <li>Sign up for a Dynatrace Trial</li> <li>k6 on Dynatrace Hub</li> <li>Dynatrace xk6 output plugin source code on GitHub</li> <li>This tutorial on GitHub</li> </ul>"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"<p>While you are waiting for the environment, add the dashboard to your Dynatrace environment.</p> <ol> <li>Save the k6 dashboard to your local machine.</li> <li>In Dynatrace, navigate to <code>Dashboards</code> and click <code>Upload</code></li> <li>Upload the dashboard JSON file</li> </ol>"},{"location":"run-demo/#start-k6","title":"Start k6","text":"<p>In the codespace terminal, type <code>docker ps</code> and wait until Docker is running.</p> <p>You should see this:</p> <pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n</code></pre> <p>Now run k6 with the demo script. Copy and paste this as-is into the terminal window:</p> <pre><code>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</code></pre>"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"<p>k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Create a new notebook and add a new <code>DQL</code> section</li> <li>Type the following: <code>timeseries avg(k6)</code></li> <li>Press <code>ctrl + =</code> to bring up auto completion. You should see the list of ingest</li> </ul> <p></p>"},{"location":"run-demo/#view-events","title":"View Events","text":"<p>When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.</p> <pre><code>// 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</code></pre> <p>Notice that the event contains metadata such as the <code>provider</code> and <code>service</code> which can be used for filtering in Dynatrace (see DQL below).</p> <p>This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Open an existing notebook or create a new one</li> <li>Add a new <code>DQL</code> section and paste the following</li> </ul> <pre><code>fetch events\n| filter event.kind == \"SDLC_EVENT\"\n| filter event.provider == \"k6\"\n</code></pre> <p></p> <p>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.</p>"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"<p>Open the prebuilt dashboard you previously uploaded.</p> <p>Go to Dashboards (<code>ctrl + k</code> and search for <code>Dashboards</code>)</p> <p>The dashboard will begin to be populated with data.</p> <p></p> <p>The demo is complete.</p> <ul> <li>Click Here to Delete and Cleanup resources </li> </ul>"},{"location":"whats-next/","title":"5. What's Next?","text":"<p>The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using <code>xk6</code>.</p> <p>You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.</p> <p>View the resources page for more links and useful materials.</p> <ul> <li>View Resources </li> </ul>"}]}

0 comments on commit c244ad7

Please sign in to comment.