Tutorial Feedback

Use the form below to provide feedback on this page / tutorial as a whole.

Skip to content

2. Getting Started

Gather Details: Tenant ID & Environment#

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.apps.dynatrace.com

Gather Details: Environment Type#

Make a note of your "environment type" based on your URL.

If you are unsure, use live.

URL Environment Type
abc12345.apps.dynatrace.com live
abc12345.live.dynatrace.com live
abc12345.sprint.dynatracelabs.com sprint
abc12345.dev.dynatracelabs.com dev

Gather Details: Create API Token#

k6 requires an API token to stream metrics to Dynatrace.

This demo also sends an SDLC event after the test has finished. For this, it needs the events_sdlc API permission.

Create an API token with the following permissions:

  • metrics.ingest
  • openpipeline.events_sdlc

Recap Required Info

You should now have three pieces of information:

  • Environment ID
  • Environment Type
  • API Token

Start Demo#

Enter Required Information

During the next step you will be prompted for some details.

Enter the relevant details in the GitHub form.

Click this button to launch the demo in a new tab.

Open in GitHub Codespaces

  1. Clone the repository to your local machine
    git clone https://github.com/dynatrace/obslab-k6
    
  2. Open the folder in Visual Studio code
  3. Ensure the Microsoft devcontainer extension is installed in VSCode
  4. Open a new terminal in VSCode and set your environment variables as appropriate:

    set DT_ENVIRONMENT_ID=abc12345
    set DT_ENVIRONMENT_TYPE=live
    set DT_API_TOKEN=dt0c01.******.***********
    

  5. Start Docker / Podman

  6. Create the environment

    devcontainer up
    

It will take a few moments but you should see:

{"outcome":"success","containerId":"...","remoteUser":"root","remoteWorkspaceFolder":"/workspaces/obslab-k6"}

  1. Connect to the demo environment. This will launch a new Visual Studio Code window
    devcontainer open
    

In the new Visual Studio code window, open a new terminal and continue with the tutorial.