From 31912e8b61c6de753fa80bbdf7497df6a7a63b5c Mon Sep 17 00:00:00 2001 From: Adam Gardner Date: Thu, 17 Oct 2024 14:27:53 +1000 Subject: [PATCH] Deployed 4468909 with MkDocs version: 1.6.0 --- index.html | 2 +- search/search_index.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 6290a2d..6e00dc3 100755 --- a/index.html +++ b/index.html @@ -511,7 +511,7 @@

Logical Architecture

Tip

-

This can (and should be) extended as demonstrated in the release validation Observability Lab) +

This can (and should be) extended as demonstrated in the release validation Observability Lab to include the ability to trigger automated deployment checks.

    diff --git a/search/search_index.json b/search/search_index.json index 4326736..b571f0e 100755 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Dynatrace Observability Lab: Grafana k6 Observability","text":"

    Support Policy

    This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.

    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.

    View the Code

    The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.

    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.

    1. A load test is executed. The HTTP requests are annotated with the standard header values.

    2. 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.

    3. 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.

    1. Save the k6 dashboard to your local machine.
    2. In Dynatrace, navigate to Dashboards and click Upload
    3. 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
    "},{"location":"snippets/disclaimer/","title":"Disclaimer","text":"

    Support Policy

    This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.

    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.

    "},{"location":"snippets/view-code/","title":"View code","text":"

    View the Code

    The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Dynatrace Observability Lab: Grafana k6 Observability","text":"

    Support Policy

    This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.

    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.

    View the Code

    The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.

    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.

    1. A load test is executed. The HTTP requests are annotated with the standard header values.

    2. 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.

    3. 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.

    1. Save the k6 dashboard to your local machine.
    2. In Dynatrace, navigate to Dashboards and click Upload
    3. 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
    "},{"location":"snippets/disclaimer/","title":"Disclaimer","text":"

    Support Policy

    This is a demo project created by the Developer Relations team at Dynatrace, showcasing integrations with open source technologies.

    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.

    "},{"location":"snippets/view-code/","title":"View code","text":"

    View the Code

    The code for this repository is hosted on GitHub. Click the \"View Code on GitHub\" link above.

    "}]} \ No newline at end of file