Skip to content

Commit d9fe10f

Browse files
committed
scenario 3 basic syn links and formatting
1 parent 7be9f4a commit d9fe10f

File tree

14 files changed

+56
-63
lines changed

14 files changed

+56
-63
lines changed

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/1-uptime/1-create-uptime.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Creating a test
3+
linkTitle: 1.1 Creating a test
34
weight: 1
45
---
56

@@ -10,10 +11,8 @@ weight: 1
1011
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/1457c466-904f-4801-b06a-0062a3ea321a/ascreenshot.jpeg?tl_px=1160,671&br_px=2880,1632&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=632,276)
1112

1213
1. Name your test with \[yourName\] or \[yourDomain\] and any other details you'd like to include, like geographic region.
13-
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/bc5b4245-b4b1-4cd1-baa1-88875961db18/ascreenshot.jpeg?tl_px=101,119&br_px=1820,1080&force_format=png&width=50%&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=524,277)
1414

1515
1. For now let's test a **GET** request. Fill in the URL field. You can use one of your own, or one of ours like [https://frontend-eu.splunko11y.com](https://frontend-eu.splunko11y.com), [https://frontend-us.splunko11y.com](https://frontend-us.splunko11y.com), or [https://www.splunk.com](https://www.splunk.com).
16-
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/e7aaccb3-1c1a-4db3-9918-ceed2d4c50d0/ascreenshot.jpeg?tl_px=22,421&br_px=1741,1382&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=524,277)
1716

1817
1. Click {{% button %}}Try now{{% /button %}} to validate that the endpoint is accessible before the selected location before saving the test. {{% button %}}Try now{{% /button %}} does not count against your subscription, so this is a good practice to make sure you're not wasting test runs on a misconfigured test.
1918
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/4168460c-aa9e-4c47-b856-eab08ff0425d/ascreenshot.jpeg?tl_px=0,521&br_px=1719,1482&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=452,277)
@@ -27,7 +26,9 @@ weight: 1
2726
1. Change the frequency to test your more critical endpoints more often, up to one minute.
2827
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/74e0492f-13a5-4a93-9f3c-f1f311d3dd8a/ascreenshot.jpeg?tl_px=0,560&br_px=1719,1521&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=385,277)
2928

30-
1. Make sure "Round-robin" is on so the test will run from one location at a time, rather than from all locations at once. If an endpoint is **highly** critical, think about if it is worth it to have all locations tested at the same time every single minute. If you have automations built in with a webhook from a detector, or if you have strict SLAs you need to track, this *could* be worth it to have as much coverage as possible. But if you are doing more manual investigation, or if this is a less critical endpoint, you could be wasting test runs that are executing while an issue is being investigated.
29+
1. Make sure "Round-robin" is on so the test will run from one location at a time, rather than from all locations at once.
30+
- If an endpoint is **highly** critical, think about if it is worth it to have all locations tested at the same time every single minute. If you have automations built in with a webhook from a detector, or if you have strict SLAs you need to track, this *could* be worth it to have as much coverage as possible. But if you are doing more manual investigation, or if this is a less critical endpoint, you could be wasting test runs that are executing while an issue is being investigated.
31+
- Remember that your license is based on the number of test runs per month. Turning Round-robin off will multiply the number of test runs by the number of locations you have selected.
3132

3233
1. When you are ready for the test to start running, make sure "Active" is on, then scroll down and click {{% button style="blue" %}}Submit{{% /button %}} to save the test configuration. Now the test will start running with your saved configuration. Take a water break, then we'll look at the results!
3334
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/404871c6-55cd-40e0-83a2-a9a12dd183ce/ascreenshot.jpeg?tl_px=0,838&br_px=1719,1799&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=134,553)

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/1-uptime/2-understand-uptime-results.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
22
title: Understanding results
3+
linkTitle: 1.2 Understanding results
34
weight: 2
45
---
56

6-
1. Click into a test summary view and play with the [Performance KPIs chart](https://docs.splunk.com/observability/en/synthetics/uptime-test/uptime-test-results.html#customize-the-performance-kpis-chart) filters to see how you can slice and dice your data. This is a good place to get started understanding trends in your data. Later we will see what custom charts look like, so that you can have a consistent view of what you care about most.
7+
1. Click into a test summary view and play with the [Performance KPIs chart](https://docs.splunk.com/observability/en/synthetics/uptime-test/uptime-test-results.html#customize-the-performance-kpis-chart) filters to see how you can slice and dice your data. This is a good place to get started understanding trends in your data. Later, we will see what custom charts look like, so that you can have a consistent view of what you care about most.
78
![KPI chart filters](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-09/c040b5f6-a868-4977-8d3b-bc3e431ffcc8/user_cropped_screenshot.jpeg?tl_px=1160,0&br_px=2880,961&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=755,44)
8-
{{% notice title="Workshop Question" style="tip" icon="question" %}}
9-
How does the data look? Is it consistent across time and locations? Do certain locations run slower than others? Are there any spikes or failures?
9+
{{% notice title="Workshop Question: Using the Performance KPIs chart" style="tip" icon="question" %}}
10+
What metrics are available? Is your data consistent across time and locations? Do certain locations run slower than others? Are there any spikes or failures?
1011
{{% /notice %}}
1112

12-
1. Click into a recent run either in the chart or in the table below. If there are failures, look at the response to see if you need to add a response code assertion (302 is a common one), if there is some authorization needed, or different request headers added.
13+
1. Click into a recent run either in the chart or in the table below.
1314
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/dd23b173-e567-4858-997e-bdcc5233d4e4/ascreenshot.jpeg?tl_px=0,838&br_px=1719,1799&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=167,363)
1415

15-
1. Here we have information about this particular test run including if it succeeded or failed, the location, timestamp, and duration in addition to the other Uptime test metrics. Click through to see the response, request, and connection info as well.
16+
1. If there are failures, look at the response to see if you need to add a response code assertion (302 is a common one), if there is some authorization needed, or different request headers added. Here we have information about this particular test run including if it succeeded or failed, the location, timestamp, and duration in addition to the other Uptime test metrics. Click through to see the response, request, and connection info as well.
1617
![image](https://ajeuwbhvhr.cloudimg.io/colony-recorder.s3.amazonaws.com/files/2024-02-01/719d3bab-606e-4f67-9f2d-2835f0d136af/ascreenshot.jpeg?tl_px=0,240&br_px=1719,1201&force_format=png&width=1120.0&wat=1&wat_opacity=0.7&wat_gravity=northwest&wat_url=https://colony-recorder.s3.us-west-1.amazonaws.com/images/watermarks/FB923C_standard.png&wat_pad=216,276)
1718
If you need to edit the test for it to run successfully, click the test name in the top left breadcrumb on this run result page, then click {{% button %}}Edit test{{% /button %}} on the top right of the test overview page. Remember to scroll down and click {{% button style="blue" %}}Submit{{% /button %}} to save your changes after editing the test configuration.
1819

@@ -21,7 +22,6 @@ If you need to edit the test for it to run successfully, click the test name in
2122
1. Go back to the test overview page and change the Performance KPIs chart to display First Byte time, and change the interval if needed to better see trends in the data.
2223
![Performance KPIs for Uptime Tests](../_img/ttfb.png)
2324
In the example above, we can see that TTFB varies consistently between locations. Knowing this, we can keep location in mind when reporting on metrics. We could also improve the experience, for example by serving users in those locations an endpoint hosted closer to them, which should reduce network latency. We can also see some slight variations in the results over time, but overall we already have a good idea of our baseline for this endpoint's KPIs. When we have a baseline, we can alert on worsening metrics as well as visualize improvements.
24-
2525
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
2626
We are not setting a detector on this test yet, to make sure it is running consistently and successfully. If you are testing a highly critical endpoint and want to be alerted on it ASAP (and have tolerance for potential alert noise), jump to Single Test Detectors.
2727
{{% /notice %}}

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/1-uptime/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 1
55

66
## Introduction
77

8-
The simplest way to keep an eye on endpoint availability is with an Uptime test. This lightweight test can run internally or from around the world, as frequently as every minute. Because this is the easiest (and cheapest!) test to set up, and because this is ideal for monitoring availability of your most critical enpoints and ports, let's start here.
8+
The simplest way to keep an eye on endpoint availability is with an [Uptime test](https://docs.splunk.com/observability/en/synthetics/uptime-test/uptime-test.html). This lightweight test can run internally or externally around the world, as frequently as every minute. Because this is the easiest (and cheapest!) test to set up, and because this is ideal for monitoring availability of your most critical enpoints and ports, let's start here.
99

1010
## Pre-requisites
1111

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/2-api-test/1-global-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Global Variables
3-
linkTitle: 1.1 Global Variables
3+
linkTitle: 2.1 Global Variables
44
weight: 1
55
---
66

7-
## Global Variables
7+
[Global variables](https://docs.splunk.com/observability/en/synthetics/test-config/global-variables.html) allow us to use stored strings in multiple tests, so we only need to update them in one place.
88

99
View the global variable that we'll use to perform our API test. Click on **Global Variables** under the cog. The global variable named `env.encoded_auth` will be the one that we'll use to build the spotify API transaction.
1010

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Create new API test
3-
linkTitle: 1.2 Create new API test
3+
linkTitle: 2.2 Create new API test
44
weight: 2
55
---
66

7-
## Create a new API test
8-
97
Create a new API test by clicking on the {{< button style="blue" >}}Add new test{{< /button >}} button and select **API test** from the dropdown. Name the test using **your initials** followed by **Spotify API** e.g. **RWC - Spotify API**
108

119
![placeholder](../_img/new-api-check.png)

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/2-api-test/3-authentication-request.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Authentication Request
3-
linkTitle: 1.3 Authentication Request
3+
linkTitle: 2.3 Authentication Request
44
weight: 3
55
---
66

7-
## Add Authentication Request
8-
97
Click on {{< button >}}+ Add requests{{< /button >}} and enter the request step name e.g. **Authenticate with Spotify API**.
108

119
![placeholder](../_img/add-request.png)
@@ -22,14 +20,14 @@ In the **Payload body** section enter the following:
2220
grant_type=client_credentials
2321
```
2422

25-
Next, add two request headers with the following key/value pairings:
23+
Next, add two {{< button >}}+ Request headers{{< /button >}} with the following key/value pairings:
2624

2725
- **CONTENT-TYPE: application/x-www-form-urlencoded**
2826
- **AUTHORIZATION: Basic {{env.encoded_auth}}**
2927

3028
Expand the **Validation** section and add the following extraction:
3129

32-
- **Extract** from **Response body** **JSON** **$.access_token** **as** **access_token**.
30+
- **Extract** from **Response body** **JSON** **$.access_token** as **access_token**
3331

3432
This will parse the JSON payload that is received from the Spotify API, extract the access token and store it as a custom variable.
3533

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
title: Search Request
3-
linkTitle: 1.4 Search Request
3+
linkTitle: 2.4 Search Request
44
weight: 4
55
hidden: false
66
---
77

8-
## Add Search Request
9-
108
Click on {{< button >}}+ Add Request{{< /button >}} to add the next step. Name the step **Search for Tracks named "Up around the bend"**.
119

1210
Expand the **Request** section and change the request method to **GET** and enter the following URL:
@@ -19,13 +17,22 @@ Next, add two request headers with the following key/value pairings:
1917

2018
- **CONTENT-TYPE: application/json**
2119
- **AUTHORIZATION: Bearer {{custom.access_token}}**
20+
- This uses the custom variable we created in the previous step!
2221

2322
![Add search request](../_img/add-search-request.png)
2423

2524
Expand the **Validation** section and add the following extraction:
2625

27-
- **Extract** from **Response body** **JSON** **$.tracks.items[0].id** **as** **track.id**.
26+
- **Extract** from **Response body** **JSON** **$.tracks.items[0].id** as **track.id**
2827

2928
![Add search payload](../_img/add-search-payload.png)
3029

31-
Click on {{< button style="blue" >}}< Return to test{{< /button >}} to return to the test configuration page. And then click {{< button style="blue" >}}Save{{< /button >}} to save the API test.
30+
To validate the test before saving, change the location as needed and click {{< button >}}Try now{{< /button >}}. See the docs for more information on the [try now feature](https://docs.splunk.com/observability/en/synthetics/test-config/try-now.html).
31+
32+
![try now](../_img/try-now.png)
33+
34+
When the validation is successful, click on {{< button style="blue" >}}< Return to test{{< /button >}} to return to the test configuration page. And then click {{< button style="blue" >}}Save{{< /button >}} to save the API test.
35+
36+
{{% notice title="Extra credit" style="green" icon="running" %}}
37+
Have more time to work on this test? Take a look at the Response Body in one of your run results. What additional steps would make this test more thorough? Edit the test, and use the {{< button >}}Try now{{< /button >}} feature to validate any changes you make before you save the test.
38+
{{% /notice %}}
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
22
title: View results
3-
linkTitle: 1.5 View Results
3+
linkTitle: 2.5 View Results
44
weight: 5
55
hidden: false
66
---
77

8-
## View results
9-
10-
Wait for a few minutes for the test to provision and run. Once you see the test has run successfully, click on the run to view the test results:
8+
Wait for a few minutes for the test to provision and run. Once you see the test has run successfully, click on the run to view the results:
119

1210
![API test result](../_img/api-test-result.png)
1311

14-
## 6. Resources
12+
## Resources
1513

1614
- [How to Create an API Test](https://docs.splunk.com/Observability/synthetics/api-test/set-up-api-test.html)
17-
1815
- [API Test Overview](https://docs.splunk.com/Observability/synthetics/api-test/api-test.html)

content/en/scenarios/3-optimize-end-user-experiences/1-synthetics/2-api-test/_index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ hidden: false
77

88
The API Test provides a flexible way to check the functionality and performance of API endpoints. The shift toward API-first development has magnified the necessity to monitor the back-end services that provide your core front-end functionality.
99

10-
Whether you're interested in testing the multi-step API interactions or you want to gain visibility into the performance of your endpoints, the API Test can help you accomplish your goals.
10+
Whether you're interested in testing multi-step API interactions or you want to gain visibility into the performance of your endpoints, the API Test can help you accomplish your goals.
11+
12+
This excercise will walk through a multi-step test on the Spotify API. You can also use it as an example when you are building tests on your own APIs or on those of your critical third parties.
1113

1214
![API test result](../_img/api-test-result.png)

0 commit comments

Comments
 (0)