Skip to content

Commit 4d6c7f0

Browse files
authored
Document Dynatrace output (#1106)
* add dynatrace output * add dynatrace to allowed words
1 parent 388428b commit 4d6c7f0

File tree

9 files changed

+77
-0
lines changed

9 files changed

+77
-0
lines changed

.vale/Vocab/docs/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ discoverability
6262
dcadwallader
6363
deserialized
6464
Dev
65+
Dynatrace
6566
enum
6667
errno
6768
erroring

src/data/markdown/translated-guides/en/01 Get started/04 Results Output.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The available built-in outputs include:
8585
- [Cloud](/results-output/real-time/cloud)
8686
- [CSV](/results-output/real-time/csv)
8787
- [Datadog](/results-output/real-time/datadog)
88+
- [Dynatrace](/results-output/real-time/dynatrace)
8889
- [Elasticsearch](/results-output/real-time/elasticsearch)
8990
- [Grafana Cloud / Prometheus](/results-output/real-time/grafana-cloud)
9091
- [InfluxDB](/results-output/real-time/influxdb-grafana)

src/data/markdown/translated-guides/en/03 Results output/200 Real-time.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ You can also stream real-time metrics to the following services:
3131
- [Apache Kafka](/results-output/real-time/apache-kafka)
3232
- [Cloud](/results-output/real-time/cloud)
3333
- [Datadog](/results-output/real-time/datadog)
34+
- [Dynatrace](/results-output/real-time/dynatrace)
3435
- [Elasticsearch](/results-output/real-time/elasticsearch)
3536
- [Grafana Cloud](/results-output/real-time/grafana-cloud)
3637
- [InfluxDB](/results-output/real-time/influxdb-grafana)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: 'Dynatrace'
3+
excerpt: Send k6 output to Dynatrace to visualize load test results and correlate performance testing metrics in Dynatrace.
4+
---
5+
6+
Using the [Dynatrace k6 extension](https://github.com/Dynatrace/xk6-output-dynatrace) you can send metrics to [Dynatrace](https://www.dynatrace.com/). That allows visualizing and correlating performance testing metrics with other monitored metrics in Dynatrace.
7+
8+
## Build the k6 version
9+
10+
<InstallationInstructions extensionUrl="github.com/Dynatrace/xk6-output-dynatrace"/>
11+
12+
## Run the test
13+
14+
Create a Dynatrace API token to send the data.
15+
16+
<Blockquote mod="attention">
17+
The Dynatrace API Token must have the scope name "metrics.ingest" (scope type "API v2").
18+
</Blockquote>
19+
20+
You can use the Dynatrace UI:
21+
22+
![Dynatrace API token](./images/Dynatrace/dynatrace-api-token.png)
23+
24+
Or a `curl` command (replace `<environment-id>` and the `Api-Token`):
25+
26+
```bash
27+
curl -X POST "https://<environment-id>.live.dynatrace.com/api/v2/apiTokens" -H "accept: application/json; charset=utf-8" -H "Content-Type: application/json; charset=utf-8" -d "{\"name\":\"\",\"scopes\":[\"metrics.ingest\"]}" -H "Authorization: Api-Token XXXXXXXX"
28+
```
29+
30+
Use the previously built k6 binary and run the test passing the Dynatrace URL and API token as follows:
31+
32+
```bash
33+
# export dynatrace variables
34+
export K6_DYNATRACE_URL=https://<environmentid>.live.dynatrace.com
35+
export K6_DYNATRACE_APITOKEN=<Dynatrace API token>
36+
37+
# run the test
38+
./k6 run script.js -o output-dynatrace
39+
```
40+
41+
You can now check the metrics in your Dynatrace environment, filtering for `k6`:
42+
43+
![Dynatrace Test result](./images/Dynatrace/dynatrace-k6-metrics.png)
44+
45+
![Dynatrace Test result](./images/Dynatrace/dynatrace-k6-test-result.png)
46+
47+
### Options
48+
49+
When streaming the k6 results to Dynatrace, you can configure the Dynatrace options below:
50+
51+
| Name | Value |
52+
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
53+
| `K6_DYNATRACE_APITOKEN` | Dynatrace API token to write the metrics. The token must have the scope `metrics.ingest API v2`. |
54+
| `K6_DYNATRACE_FLUSH_PERIOD` | Define how often metrics are sent to Dynatrace. The default value is 1 second. |
55+
| `K6_DYNATRACE_URL` | Dynatrace URL. The default value is `https://dynatrace.live.com`. |
56+
| `K6_DYNATRACE_INSECURE_SKIP_TLS_VERIFY` | If `true`, the HTTP client kips TLS verification on the endpoint. The default value is `true`. |
57+
| `K6_DYNATRACE_HEADER` | Pair of key/value headers to add to Dynatrace requests. |
321 KB
Loading
141 KB
Loading
306 KB
Loading

src/svg/dynatrace.inline.svg

Lines changed: 11 additions & 0 deletions
Loading

src/templates/docs/integrations.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import Buddy from 'svg/buddy.inline.svg';
2424
import CircleCI from 'svg/circleci.inline.svg';
2525
import CSV from 'svg/csv.inline.svg';
2626
import Datadog from 'svg/datadog.inline.svg';
27+
import Dynatrace from 'svg/dynatrace.inline.svg';
2728
import Elasticsearch from 'svg/elastic.inline.svg';
2829
import Flagger from 'svg/flagger.inline.svg';
2930
import GitHub from 'svg/github.inline.svg';
@@ -70,6 +71,11 @@ const iconsDataSet1 = [
7071
name: 'Datadog',
7172
to: '/results-output/real-time/datadog',
7273
},
74+
{
75+
Icon: Dynatrace,
76+
name: 'Dynatrace',
77+
to: '/results-output/real-time/dynatrace',
78+
},
7379
{
7480
Icon: Elasticsearch,
7581
name: 'Elasticsearch',

0 commit comments

Comments
 (0)