Skip to content

Commit ad0a2e3

Browse files
committed
Remove command-c
1 parent 5fe315c commit ad0a2e3

File tree

12 files changed

+133
-33
lines changed

12 files changed

+133
-33
lines changed

content/en/ninja-workshops/10-advanced-otel/1-agent/1-3-fileexporter/1-test-fileexporter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You should now see a file named `agent.out` in the current directory. Since no m
4242
{{% /tab %}}
4343

4444
{{% notice note %}}
45-
On **Windows**, an open file may appear empty or cause issues when attempting to read it. To prevent this, make sure to stop the **Agent** or the `gateway` before inspecting the file, as instructed.
45+
On **Windows**, an open file may appear empty or cause issues when attempting to read it. To prevent this, make sure to stop the **Agent** or the **Gateway** before inspecting the file, as instructed.
4646
{{% /notice %}}
4747

4848
The span is written to the `agent.out` as a single line in OTLP/JSON format:

content/en/ninja-workshops/10-advanced-otel/2-gateway/2-2-prepare_agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 2
66

77
### Test Gateway
88

9-
Open a third terminal window, this one will be used to run the `gateway` and navigate to the`[WORKSHOP]/2-gateway` directory and run the following command to test the gateway configuration:
9+
Open a third terminal window, this one will be used to run the **Gateway** and navigate to the`[WORKSHOP]/2-gateway` directory and run the following command to test the gateway configuration:
1010

1111
```text
1212
../otelcol --config=gateway.yaml
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: 2.2 Test the gateway and prepare the agent
3+
linkTitle: 2.2 Test Gateway & Configure Agent
4+
weight: 2
5+
---
6+
7+
### Test Gateway
8+
9+
Open a third terminal window, this one will be used to run the **Gateway** and navigate to the`[WORKSHOP]/2-gateway` directory and run the following command to test the gateway configuration:
10+
11+
```text
12+
../otelcol --config=gateway.yaml
13+
```
14+
15+
If everything is set up correctly, the first and last lines of the output should look like:
16+
17+
```text
18+
2025/01/15 15:33:53 settings.go:478: Set config to [gateway.yaml]
19+
<snip to the end>
20+
2025-01-13T12:43:51.747+0100 info [email protected]/service.go:261 Everything is ready. Begin running and processing data.
21+
```
22+
23+
---
24+
25+
### Update Agent Configuration
26+
27+
Select your **Agent** terminal window, and also navigate to the `[WORKSHOP]/2-gateway` directory.
28+
Open the `agent.yaml` we copied earlier in your editor, and configure a `otlphttp` exporter by replacing the existing `file` exporter. (this is now the preferred exporter for Splunk Observability Cloud):
29+
30+
{{% notice title="Exercise" style="green" icon="running" %}}
31+
32+
- **Configure the `otlphttp` exporter**: Ensure the `endpoint` is set to the gateway endpoint and add the `X-SF-Token` header with a Splunk Access Token.
33+
34+
```yaml
35+
otlphttp:
36+
endpoint: "http://localhost:5318" # Gateway endpoint
37+
headers:
38+
X-SF-Token: "A_ACCESS_TOKEN" # New way to set an Splunk ACCESS_TOKEN
39+
```
40+
41+
- **Add a batch processor to the agent**: since the agent can send data from different sources, and benefit from retries, adding a Batch processor is useful too:
42+
43+
```yaml
44+
batch: # Processor Type
45+
metadata_keys: [X-SF-Token] # Array of metadata keys to batch
46+
```
47+
48+
- **Update Pipelines**: replace the `file:` exporter with the `otlphttp` exporter in the `traces`, `metrics`, and `logs` pipelines. Also, add the `hostmetrics` receiver to the `metrics` pipeline.
49+
50+
```yaml
51+
#traces:
52+
metrics:
53+
receivers:
54+
- otlp # OTLP Receiver
55+
- hostmetrics # Hostmetrics Receiver
56+
processors:
57+
- memory_limiter # Memory Limiter Processor
58+
- resourcedetection # Adds system attributes to the data
59+
- resource/add_mode # Adds collector mode metadata
60+
- batch # Batch Processor, groups data before send
61+
exporters:
62+
- debug # Debug Exporter
63+
- otlphttp # OTLP/HTTP EXporter used by Splunk O11Y
64+
# logs:
65+
```
66+
67+
{{% /notice %}}
68+
Again, validate the agent configuration using **[otelbin.io](https://www.otelbin.io/)**. For reference, this is the visualization for the `metrics` pipeline:
69+
70+
```mermaid
71+
%%{init:{"fontFamily":"monospace"}}%%
72+
graph LR
73+
%% Nodes
74+
REC1(hostmetrics<br>fa:fa-download):::receiver
75+
REC2(&nbsp;&nbsp;&nbsp;&nbsp;otlp&nbsp;&nbsp;&nbsp;&nbsp;<br>fa:fa-download):::receiver
76+
PRO1(memory_limiter<br>fa:fa-microchip):::processor
77+
PRO2(resourcedetection<br>fa:fa-microchip):::processor
78+
PRO3(resource<br>fa:fa-microchip):::processor
79+
PRO4(batch<br>fa:fa-microchip):::processor
80+
EXP1(otlphttp<br>fa:fa-upload):::exporter
81+
EXP2(&ensp;debug&ensp;<br>fa:fa-upload):::exporter
82+
%% Links
83+
subID1:::sub-metrics
84+
subgraph " "
85+
subgraph subID1[**Metrics**]
86+
direction LR
87+
REC1 --> PRO1
88+
REC2 --> PRO1
89+
PRO1 --> PRO2
90+
PRO2 --> PRO3
91+
PRO3 --> PRO4
92+
PRO4 --> EXP1
93+
PRO4 --> EXP2
94+
end
95+
end
96+
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
97+
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
98+
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
99+
classDef sub-metrics stroke:#38bdf8,stroke-width:1px, color:#38bdf8,stroke-dasharray: 3 3;
100+
```

content/en/ninja-workshops/10-advanced-otel/2-gateway/2-3-test-agent-gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ After executing the command, the gateway should generate a new file named `./gat
290290
{{% /tabs %}}
291291

292292
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
293-
Ensure that both `./gateway-metrics.out` and `./gateway-traces.out` include a resource attribute key-value pair for `otelcol.service.mode` with the value `gateway`.
293+
Ensure that both `./gateway-metrics.out` and `./gateway-traces.out` include a resource attribute key-value pair for `otelcol.service.mode` with the value **Gateway**.
294294

295295
In the provided `gateway.yaml` configuration, we modified the `resource/add_mode` processor to use the `upsert` action instead of `insert`. The `upsert` action updates the value of the resource attribute key if it already exists, setting it to `"gateway"`. If the key is not present, the `upsert` action will add it.
296296
{{% /notice %}}

content/en/ninja-workshops/10-advanced-otel/3-filelog/3-2-test-filelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,4 @@ This feature is designed to help users quickly identify and investigate issues b
207207
You may have noticed that every log line contains empty placeholders for `"traceId":""` and `"spanId":""`. The Filelog receiver will populate these fields only if they are not already present in the log line. For example, if the log line is generated by an application instrumented with an OpenTelemetry instrumentation library, these fields will already be included and will not be overwritten.
208208
{{% /notice %}}
209209

210-
Stop the Agent, Gateway and the Quotes generating script as well using `Command-c/Ctrl-c`.
210+
Stop the Agent, Gateway and the Quotes generating script as well using `Ctrl-C`.

content/en/ninja-workshops/10-advanced-otel/4-resilience/4-1-test-resilience.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ weight: 1
66

77
### Setup Test environment
88

9-
In this section we are going to simulate an outage on the network between the **Agent** and the `gateway` and see if our configuration helps the Collector recover from that issue:
9+
In this section we are going to simulate an outage on the network between the **Agent** and the **Gateway** and see if our configuration helps the Collector recover from that issue:
1010

1111
{{% notice title="Exercise" style="green" icon="running" %}}
1212

1313
**Run the Gateway**:
14-
Find your `Gateway` terminal window, and navigate to the `[WORKSHOP]/4-resilience` directory and restart the gateway.
14+
Find your **Gateway** terminal window, and navigate to the `[WORKSHOP]/4-resilience` directory and restart the gateway.
1515

1616
It should start up normally and state : `Everything is ready. Begin running and processing data.`
1717

@@ -31,20 +31,20 @@ If everything is working as expected, we can move on to testing the system’s r
3131

3232
### Testing System Resilience
3333

34-
To evaluate the system’s resilience, we’ll simulate a scenario where the Gateway becomes temporarily unreachable by stopping it and observing how the system responds. First, we’ll generate traffic to the agent by sending some traces. Since the Gateway is down, the agent will enter retry mode. Once we restart the agent, it will recover the traces from the persistent queue and successfully send them to the Gateway. Without the persistent queue, these traces would have been lost permanently.
34+
To evaluate the system’s resilience, we’ll simulate a scenario where the **Gateway** becomes temporarily unreachable by stopping it and observing how the system responds. First, we’ll generate traffic to the agent by sending some traces. Since the **Gateway** is down, the agent will enter retry mode. Once we restart the agent, it will recover the traces from the persistent queue and successfully send them to the Gateway. Without the persistent queue, these traces would have been lost permanently.
3535

3636
{{% notice title="Exercise" style="green" icon="running" %}}
3737
Let's start our "network failure":
3838

3939
**Simulate a Network Failure**:
40-
Stop the Gateway with `Command-c/Ctrl-c` and wait until the gateway console shows that it has stopped:
40+
Stop the **Gateway** with `Ctrl-C` and wait until the gateway console shows that it has stopped:
4141

4242
```text
4343
2025-01-28T13:24:32.785+0100 info [email protected]/service.go:309 Shutdown complete.
4444
```
4545

4646
**Create Traffic during the "Network Failure"**:
47-
While the Gateway is stopped, send 3–4 traces using the cURL command we used earlier.
47+
While the **Gateway** is stopped, send 3–4 traces using the cURL command we used earlier.
4848

4949
Notice that the agent’s retry mechanism is activated as it continuously attempts to resend the data. In the agent’s console output, you will see repeated messages similar to the following:
5050

@@ -72,10 +72,10 @@ This step is essential for clearly observing the recovery process when the agent
7272
Restart the Gateway. It should initialize as expected and be ready and waiting to receive data.
7373

7474
**Restart the Agent**
75-
Once the `gateway` is up and running, restart the **Agent**. It will resume sending data from the last checkpointed state, ensuring no data is lost. You should see the `gateway` begin receiving the previously missed traces without requiring any additional action on your part.
75+
Once the **Gateway** is up and running, restart the **Agent**. It will resume sending data from the last checkpointed state, ensuring no data is lost. You should see the **Gateway** begin receiving the previously missed traces without requiring any additional action on your part.
7676

7777
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
78-
Note that only the `gateway` will show that the checkpointed traces have arrived. The agent will not display any indication that data new or old has been sent.
78+
Note that only the **Gateway** will show that the checkpointed traces have arrived. The agent will not display any indication that data new or old has been sent.
7979
{{% /notice %}}
8080
{{% /notice %}}
8181

@@ -87,4 +87,4 @@ By implementing file-based checkpointing and queue persistence, you ensure the t
8787

8888
If you want to know more about the `FileStorage` extension, you can find it [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage)
8989

90-
Stop the **Agent** and `gateway` using Command-c/Ctrl-c.
90+
Stop the **Agent** and **Gateway** using Ctrl-C.

content/en/ninja-workshops/10-advanced-otel/5-dropping-spans/5-1-test-filter-processor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Copy the following JSON and save to a file called `health.json` in the `5-droppi
6969
{{% /tab %}}
7070
{{% /tabs %}}
7171

72-
Ensure that both the **Agent** and `gateway` are started from the `[WORKSHOP]/5-dropping-spans` directory using their respective configuration.yaml files. Next, update and use the **cURL** command we used earlier to send the `health.json` payload.
72+
Ensure that both the **Agent** and **Gateway** are started from the `[WORKSHOP]/5-dropping-spans` directory using their respective configuration.yaml files. Next, update and use the **cURL** command we used earlier to send the `health.json` payload.
7373

74-
Once the `span` payload is sent, the agent will process it, which you can confirm by checking the agent’s debug output to see the span data. The **Agent** will then forward the span to the `gateway`. However, because the `gateway` is configured with a filter to drop spans named `"/_healthz"`, the span will be discarded and not processed further.
74+
Once the `span` payload is sent, the agent will process it, which you can confirm by checking the agent’s debug output to see the span data. The **Agent** will then forward the span to the **Gateway**. However, because the **Gateway** is configured with a filter to drop spans named `"/_healthz"`, the span will be discarded and not processed further.
7575

7676
The gateway console will remain unchanged, showing no indication that the data was received or handled.
7777

@@ -115,4 +115,4 @@ This will drop spans with the names `"/_healthz"` and `"/internal/metrics"`.
115115

116116
You can further extend this configuration to filter out spans based on different attributes, tags, or other criteria, making the OpenTelemetry Collector more customizable and efficient for your observability needs.
117117

118-
Stop the **Agent** and `gateway` using Command-c/Ctrl-c.
118+
Stop the **Agent** and **Gateway** using Ctrl-C.

content/en/ninja-workshops/10-advanced-otel/6-sensitive-data/6-1-test-delete-tag.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ weight: 1
66

77
### Test the Attribute Processor tag updates
88

9-
Restart your `gateway` terminal window, and wait until it is ready to receive data.
9+
Restart your **Gateway** terminal window, and wait until it is ready to receive data.
1010

1111
{{% notice title="Exercise" style="green" icon="running" %}}
1212
In this exercise, we will **delete** the `user.account_password`, **update** the `user.phone_number` **attribute** & **hash** the `user.email` in the span data before it is exported by the **Agent**.
1313

1414
- **Disable the `redaction/redact` processor** in the `traces` pipeline by adding the comment character `#` in front of it.
1515
- **Start the **Agent** Collector** from the **Agent** terminal window.
1616
- **Send a span containing `Sensitive data`** by running the **cURL** command to send `trace.json`.
17-
- **Check the debug output** of both the **Agent** and `Gateway` to confirm that `user.account_password` has been removed, and both `user.phone_number` & `user.email` have been updated.
17+
- **Check the debug output** of both the **Agent** and **Gateway** to confirm that `user.account_password` has been removed, and both `user.phone_number` & `user.email` have been updated.
1818
{{% tabs %}}
1919
{{% tab title="New Debug Output" %}}
2020

@@ -143,4 +143,4 @@ In this exercise, we will **delete** the `user.account_password`, **update** the
143143
{{% /tabs %}}
144144

145145
{{% /notice %}}
146-
Stop the **Agent** and `gateway` using Command-c/Ctrl-c.
146+
Stop the **Agent** and **Gateway** using Ctrl-C.

content/en/ninja-workshops/10-advanced-otel/6-sensitive-data/6-2-test-redaction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ This is achieved using the `redaction` processor you added earlier, where we def
2424
2525
### Test the Redaction Processor
2626
27-
Delete the `*.out` files and clear the screen. Restart your `gateway` terminal window, and wait until it is ready to receive data.
27+
Delete the `*.out` files and clear the screen. Restart your **Gateway** terminal window, and wait until it is ready to receive data.
2828

2929
{{% notice title="Exercise" style="green" icon="running" %}}
3030
In this exercise, we will **redact** the `user.visa` & `user.mastercard` **values** in the span data before it is exported by the **Agent**.
3131

3232
- **Enable the `redaction/redact` processor** in the `traces` pipeline by removing the `#` in front of it and then restart the **Agent**.
3333
- **Start the **Agent** Collector** from the **Agent** terminal window.
3434
- **Send a span containing `Sensitive data`** by running the **cURL** command to send `trace.json`.
35-
- **Check the debug output** of both the **Agent** and `Gateway` to confirm the values for `user.visa` & `user.mastercard` have been updated. Notice `user.amex` attribute value was NOT redacted because a matching regex pattern was not added to `blocked_values`
35+
- **Check the debug output** of both the **Agent** and **Gateway** to confirm the values for `user.visa` & `user.mastercard` have been updated. Notice `user.amex` attribute value was NOT redacted because a matching regex pattern was not added to `blocked_values`
3636

3737
{{% tabs %}}
3838
{{% tab title="New Debug Output" %}}
@@ -178,4 +178,4 @@ Add the Amex card regex to `blocked_values` and restart **Agent** collector.
178178

179179
These are just a few examples of how `attributes` and `redaction` processors can be configured to protect sensitive data.
180180

181-
Stop the **Agent** and `gateway` using Command-c/Ctrl-c.
181+
Stop the **Agent** and **Gateway** using Ctrl-C.

content/en/ninja-workshops/10-advanced-otel/7-transform-data/7-1-test-transform.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The script will begin writing lines to a file named `./quotes.log`, while displa
2020
```
2121

2222
**Run the Gateway**:
23-
Find your `Gateway` terminal window, and navigate to the `[WORKSHOP]/7-transform-data` directory and restart the gateway.
23+
Find your **Gateway** terminal window, and navigate to the `[WORKSHOP]/7-transform-data` directory and restart the gateway.
2424

2525
It should start up normally and state : `Everything is ready. Begin running and processing data.`
2626

@@ -32,7 +32,7 @@ It should also start up normally and state : `Everything is ready. Begin running
3232
{{% notice title="Exercise" style="green" icon="running" %}}
3333
In this exercise, we will **remove the** `com.splunk/source` and `os.type` **metadata** from the log resource attributes before it is exported by the **Agent**. We will also parse the log body to set the `SeverityText` and `SeverityNumber` on the `LogRecord` and promote the log `body` json fields to log `attributes`.
3434

35-
- **Check the debug output** of both the **Agent** and `Gateway` to confirm that `com.splunk/source` and `os.type` have been removed.
35+
- **Check the debug output** of both the **Agent** and **Gateway** to confirm that `com.splunk/source` and `os.type` have been removed.
3636

3737
{{% tabs %}}
3838
{{% tab title="New Debug Output" %}}
@@ -59,7 +59,7 @@ In this exercise, we will **remove the** `com.splunk/source` and `os.type` **met
5959
{{% /tab %}}
6060
{{% /tabs %}}
6161

62-
- **Check the debug output** of both the **Agent** and `Gateway` to confirm that `SeverityText` and `SeverityNumber` in the `LogRecord` is now defined with the severity `level` from the log body. Confirm that the JSON fields from the body can be accessed as top-level log `Attributes`.
62+
- **Check the debug output** of both the **Agent** and **Gateway** to confirm that `SeverityText` and `SeverityNumber` in the `LogRecord` is now defined with the severity `level` from the log body. Confirm that the JSON fields from the body can be accessed as top-level log `Attributes`.
6363

6464
{{% tabs %}}
6565
{{% tab title="New Debug Output" %}}
@@ -243,4 +243,4 @@ In this exercise, we will **remove the** `com.splunk/source` and `os.type` **met
243243

244244
{{% /notice %}}
245245

246-
Stop the **Agent** and `gateway` using Command-c/Ctrl-c.
246+
Stop the **Agent** and **Gateway** using Ctrl-C.

0 commit comments

Comments
 (0)