Skip to content

Commit

Permalink
Deployed 4468909 with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agardnerIT committed Oct 17, 2024
1 parent 8b65fdf commit 31912e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ <h2 id="logical-architecture">Logical Architecture<a class="headerlink" href="#l
<p>This architecture also holds true for other load testing tools (eg. JMeter).</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>This can (and should be) extended as demonstrated in the <a href="https://dt-url.net/obslab-release-validation" target="_blank">release validation Observability Lab</a>)
<p>This can (and should be) extended as demonstrated in the <a href="https://dt-url.net/obslab-release-validation" target="_blank">release validation Observability Lab</a>
to include the ability to trigger automated deployment checks.</p>
</div>
<ol>
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":"Dynatrace Observability Lab: Grafana k6 Observability","text":"<p>Support Policy</p> <p>This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.</p> <p>Support is provided via GitHub issues only. The materials provided in this repository are offered \"as-is\" without any warranties, express or implied. Use them at your own risk.</p> <p>View the Code</p> <p>The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.</p> <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> <p>Tip</p> <p>This can (and should be) extended as demonstrated in the release validation Observability Lab) to include the ability to trigger automated deployment checks.</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> </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>"},{"location":"snippets/disclaimer/","title":"Disclaimer","text":"<p>Support Policy</p> <p>This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.</p> <p>Support is provided via GitHub issues only. The materials provided in this repository are offered \"as-is\" without any warranties, express or implied. Use them at your own risk.</p>"},{"location":"snippets/view-code/","title":"View code","text":"<p>View the Code</p> <p>The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.</p>"}]}
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Dynatrace Observability Lab: Grafana k6 Observability","text":"<p>Support Policy</p> <p>This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.</p> <p>Support is provided via GitHub issues only. The materials provided in this repository are offered \"as-is\" without any warranties, express or implied. Use them at your own risk.</p> <p>View the Code</p> <p>The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.</p> <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> <p>Tip</p> <p>This can (and should be) extended as demonstrated in the release validation Observability Lab to include the ability to trigger automated deployment checks.</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> </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>"},{"location":"snippets/disclaimer/","title":"Disclaimer","text":"<p>Support Policy</p> <p>This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.</p> <p>Support is provided via GitHub issues only. The materials provided in this repository are offered \"as-is\" without any warranties, express or implied. Use them at your own risk.</p>"},{"location":"snippets/view-code/","title":"View code","text":"<p>View the Code</p> <p>The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.</p>"}]}

0 comments on commit 31912e8

Please sign in to comment.