Skip to content

Commit 725a9fc

Browse files
committed
Markdown linting and rewording
1 parent edc42e0 commit 725a9fc

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

content/en/ninja-workshops/10-advanced-otel/10-agent-setup/1-initialtest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Once you've updated the configuration, you’re ready to proceed to running the
99
Start or reuse your initial terminal window, we will use this to run the `Agent`.
1010

1111
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
12-
To improve organization during the workshop, consider customizing your terminal windows or shells with unique names and colours. This will make it easier to identify and switch between them quickly.
12+
To improve organization during the workshop, consider customizing your terminal windows or shells with unique names and colors. This will make it easier to identify and switch between them quickly.
1313
{{% /notice %}}
1414

1515
Run the following command from the `1-agent` directory (ensure you’re using the correct OpenTelemetry Collector binary you downloaded):
@@ -220,7 +220,7 @@ Attributes:
220220
-> user.visa: Str(4111 1111 1111 1111)
221221
-> user.amex: Str(3782 822463 10005)
222222
-> user.mastercard: Str(5555 5555 5555 4444)
223-
{"kind": "exporter", "data_type": "traces", "name": "debug"}
223+
{"kind": "exporter", "data_type": "traces", "name": "debug"}
224224
```
225225

226226
If everything worked as expected, you’re ready to continue building out the agent's YAML configuration file.

content/en/ninja-workshops/10-advanced-otel/80-routing/8-1-routing-test.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It should also start up normally and state : `Everything is ready. Begin running
2020

2121
- **Create a trace for different Environments**
2222
Find your `Test` terminal window and navigate to the `[WORKSHOP]/8-routing`.
23-
To test your configuration, you need to generate span data with the correct `ResourceSpan` attributes to trigger the routing rule. Copy the following JSON and save it as `security.json` in the `[WORKSHOP]\8-routing` directory.
23+
To test your configuration, you need to generate span data with the correct `ResourceSpan` attributes to trigger the routing rule. Copy the following JSON and save it as `security.json` in the `[WORKSHOP]/8-routing` directory.
2424

2525
{{% tabs %}}
2626
{{% tab title="Compacted JSON" %}}
@@ -100,27 +100,29 @@ To test your configuration, you need to generate span data with the correct `Res
100100
### Testing the routing scenario
101101

102102
{{% notice title="Exercise" style="green" icon="running" %}}
103-
Make sure the are **NO** `*.out` files in the `[WORKSHOP]/8-routing` folder.
103+
Before proceeding, ensure that there are no `*.out` files in the `[WORKSHOP]/8-routing` directory.
104104

105105
- **Send a Regular Span**:
106-
Find your `Test` terminal window and navigate to the `[WORKSHOP]/8-routing` folder. From there, send a regular span using the `trace.json` file to confirm that communication is functioning as expected.
107-
Both the `agent` and `gateway` should display debug information, including the span you just sent. Additionally, the gateway should generate a new `gateway-traces-default.out` file, as this is now the destination for regular spans.
106+
1. Open your test terminal and navigate to the `[WORKSHOP]/8-routing` directory.
107+
2. Send a regular span using the `trace.json` file to confirm proper communication.
108+
109+
Both the `agent` and `gateway` should display debug information, including the span you just sent. The gateway will also generate a new `gateway-traces-default.out` file, as this is now the designated destination for regular spans.
108110

109111
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
110112
If you check `gateway-traces-default.out`, it should contain the `span` sent using the `cURL` command. You will also see an empty `gateway-traces-security.out` file, as the routing configuration creates output files immediately, even if no matching spans have been processed yet.
111113
{{% /notice %}}
112114

113115
- **Send a Security Span**:
114-
Make sure both the `agent` and `gateway` are running, then send a security span using the `security.json` file to test the routing rule in the gateway.
115-
Both the `agent` and `gateway` should display debug information, including the span you just sent. Additionally, the gateway should write a line to the `gateway-traces-security.out` file, as this is the destination for spans where the `deployment.environment` resourceSpan attribute matches `"security_applications"`.
116+
1. Ensure both the `agent` and `gateway` are running.
117+
2. Send a security span using the `security.json` file to test the gateway’s routing rule.
118+
119+
Again, both the `agent` and `gateway` should display debug information, including the span you just sent. This time, the `gateway` will write a line to the `gateway-traces-security.out` file, which is designated for spans where the `deployment.environment` resource attribute matches `"security_applications"`.
116120

117121
{{% notice title="Tip" style="primary" icon="lightbulb" %}}
118-
If you verify the `./gateway-traces-security.out` is should only contain the spans from the `"security_applications"` deployment.environment.
122+
If you verify the `./gateway-traces-security.out` it should only contain the spans from the `"security_applications"` deployment.environment.
119123
{{% /notice %}}
120124

121-
You can repeat this scenario multiple times, and each trace should be written to its corresponding output file.
122-
123-
125+
You can repeat this scenario multiple times, and each trace will be written to its corresponding output file.
124126
{{% /notice %}}
125127

126128
### Conclusion
@@ -135,6 +137,6 @@ By inspecting the output files, we confirmed that the OpenTelemetry Collector *c
135137

136138
You can now extend this approach by defining additional routing rules to further categorize spans, metrics, and logs based on different attributes.
137139

138-
If you want to know more about the `routing` connector , you can find it [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector)
140+
If you want to know more about the `routing` connector, you can find it [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector)
139141

140-
Stop the `agent` and `gateway` using Command-c/Ctrl-c.
142+
Stop the `agent` and `gateway` using `Ctrl-C`.

content/en/ninja-workshops/10-advanced-otel/80-routing/_index.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ WORKSHOP
3535

3636
{{% /tab %}}
3737

38-
Open the `gateway.yaml` and add the following configuration:
38+
In the following exercise, you will configure the `routing connector` in the `gateway.yaml` file. This setup will enable the `gateway` to route traces based on the `deployment.environment` attribute in the spans you send. By doing so, you can process and handle traces differently depending on their attributes.
3939

4040
{{% notice title="Exercise" style="green" icon="running" %}}
41-
42-
In this exercise, you will configure the `routing connector` in the `gateway.yaml` file. This setup will enable the `gateway` to route traces based on the `deployment.environment` attribute in the spans you send. By doing so, you can process and handle traces differently depending on their attributes.
41+
Open the `gateway.yaml` and add the following configuration:
4342

4443
- **Add the `connectors:` section**:
4544
In OpenTelemetry configuration files, `connectors` have their own dedicated section, similar to receivers and processors. In the `gateway.yaml`file, insert the `connectors:` section below the receivers section and above the processors section.
@@ -53,8 +52,9 @@ In OpenTelemetry configuration files, `connectors` have their own dedicated sect
5352
```
5453

5554
- **Add the `routing` connector**:
56-
We are setting up a `resourceSpans` attribute rule. In this configuration, spans will be routed if the `deployment.environment` resourceSpan attribute matches `"security_applications"`.
57-
This same approach can also be applied to `metrics` and `logs`, allowing you to route them based on attributes in `resourceMetrics` or `resourceLogs` in a similar way. Add the following under the `connectors:` section:
55+
In this configuration, spans will be routed if the `deployment.environment` resource attribute matches `"security_applications"`.
56+
57+
This same approach can also be applied to `metrics` and `logs`, allowing you to route them based on attributes in `resourceMetrics` or `resourceLogs` similarly. Add the following under the `connectors:` section:
5858

5959
```yaml
6060
routing:
@@ -101,17 +101,16 @@ To enable routing we need to define two pipelines for traces:
101101

102102
```yaml
103103
pipelines:
104-
#traces:
105-
#traces/standard:
104+
#traces:
105+
#traces/standard:
106106
traces/security: # Array of Trace Receivers
107107
receivers: [routing] # Only receives spans from the routing connector
108108
processors:
109109
- memory_limiter
110110
- resource/add_mode
111111
exporters: [file/traces/security] # Location for spans matching rule
112-
#metrics:
112+
#metrics:
113113
```
114-
115114

116115
- **Update the `traces` pipeline to handle routing**:
117116
To enable `routing`, you need to update the original `traces` pipeline by adding `routing` as an exporter. This will send your span data through the `routing connector` for evaluation.

0 commit comments

Comments
 (0)