Overview

<aside> ⚠️ Playwright Tracing support is Experimental (under active development). Please let us know if you notice any issues or improvements.

</aside>

Datadog requires a running instance of the Datadog Agent in order to use some of its features (like APM tracing). When you run a test on Fargate, Artillery will run a Datadog Agent automatically, but for testing Playwright tracing on your local machine you will need to run the agent yourself. This guide describes how you can run the agent locally.

Note: running the Agent locally will automatically send some metrics from your machine (e.g. CPU and memory usage) to Datadog.

Requirements

Running the agent locally

  1. Run the following Docker CLI command in a Terminal (Mac/Linux) or Command Prompt (Windows), making sure to replace DD_API_KEY and DD_HOSTNAME with the correct values:
docker run --rm \\
	-e DD_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \\
	-e DD_HOSTNAME=ADD_A_UNIQUE_NAME_FOR_YOUR_MACHINE \\
	-e DD_SITE="datadoghq.com" \\
	-e DD_APM_TRACE_BUFFER=100 \\
	-e DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT=0.0.0.0:4318 \\
	-p 4318:4318 \\
	datadog/agent
  1. Wait a few moments. You should start seeing logs while the agent starts up.
  2. After that, you can run your Artillery script (example configuration below).

Configuring your Artillery Test

Add the following configuration to your config to enable traces: