Skip to content

Commit b751554

Browse files
committed
Fixes to flow #357
1 parent 50af4dd commit b751554

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

content/en/ninja-workshops/3-opentelemetry-collector-workshops/2-advanced-collector/4-building-resilience/4-4-recovery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: 4.4 Simulate Recovery
3-
linkTitle: 4.4 Simulate Recovery
2+
title: 4.4 Recovery
3+
linkTitle: 4.4 Recovery
44
weight: 4
55
---
66

content/en/ninja-workshops/3-opentelemetry-collector-workshops/2-advanced-collector/6-sensitive-data/6-2-test-delete-tag.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ In this exercise, we will **delete** the `user.account_password`, **update** the
1010

1111
**Start the Gateway**: In your **Gateway terminal** window start the `gateway`.
1212

13+
```bash
14+
../otelcol --config=gateway.yaml
15+
```
16+
1317
**Start the Agent**: In your **Agent terminal** window start the `agent`.
1418

19+
```bash
20+
../otelcol --config=agent.yaml
21+
```
22+
1523
**Start the Load Generator**: In the **Spans terminal** window start the `loadgen`:
1624

1725
```bash

content/en/ninja-workshops/3-opentelemetry-collector-workshops/2-advanced-collector/6-sensitive-data/6-3-test-redaction.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,35 @@ In this exercise, we will **redact** the `user.visa` & `user.mastercard` **value
1313

1414
**Start the Gateway**: In your **Gateway terminal** window start the `gateway`.
1515

16+
```bash
17+
../otelcol --config=gateway.yaml
18+
```
19+
1620
**Enable the `redaction/redact` processor**: In the **Agent terminal** window, edit `agent.yaml` and remove the `#` we inserted in the previous exercise.
1721

22+
```yaml
23+
traces:
24+
receivers:
25+
- otlp
26+
processors:
27+
- memory_limiter
28+
- attributes/update # Update, hash, and remove attributes
29+
- redaction/redact # Redact sensitive fields using regex
30+
- resourcedetection
31+
- resource/add_mode
32+
- batch
33+
exporters:
34+
- debug
35+
- file
36+
- otlphttp
37+
```
38+
1839
**Start the Agent**: In your **Agent terminal** window start the `agent`.
1940

41+
```bash
42+
../otelcol --config=agent.yaml
43+
```
44+
2045
**Start the Load Generator**: In the **Spans terminal** window start the `loadgen`:
2146

2247
```bash
@@ -67,25 +92,29 @@ By including `summary:debug` in the redaction processor, the debug output will i
6792

6893
{{% /notice %}}
6994

70-
**Check file output**: In the newly created `gateway-traces.out` file to verify confirm that `user.visa` & `user.mastercard` have been updated.
95+
**Check file output**: Using `jq` verify that `user.visa` & `user.mastercard` have been updated in the `gateway-traces.out`.
7196

7297
{{% tabs %}}
7398
{{% tab title="Validate attribute changes" %}}
7499

75100
```bash
76-
jq '.resourceSpans[].scopeSpans[].spans[].attributes[] | select(.key == "user.visa" or .key == "user.mastercard") | {key: .key, value: .value.stringValue}' ./gateway-traces.out
101+
jq '.resourceSpans[].scopeSpans[].spans[].attributes[] | select(.key == "user.visa" or .key == "user.mastercard" or .key == "user.amex") | {key: .key, value: .value.stringValue}' ./gateway-traces.out
77102
```
78103

79104
{{% /tabs %}}
80105
{{% tab title="Output" %}}
81106

82-
Notice that the `user.account_password` has been removed, and the `user.phone_number` & `user.email` have been updated:
107+
Notice that `user.amex` has not been redacted because a matching regex pattern was not added to `blocked_values`:
83108

84109
```json
85110
{
86111
"key": "user.visa",
87112
"value": "****"
88113
}
114+
{
115+
"key": "user.amex",
116+
"value": "3782 822463 10005"
117+
}
89118
{
90119
"key": "user.mastercard",
91120
"value": "****"

0 commit comments

Comments
 (0)