Skip to content

Commit ef5c11c

Browse files
committed
Formatting fixes
1 parent f5077c6 commit ef5c11c

File tree

1 file changed

+8
-16
lines changed
  • content/en/ninja-workshops/10-advanced-otel/8-routing

1 file changed

+8
-16
lines changed

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ time: 10 minutes
55
weight: 8
66
---
77

8-
The routing connector in OpenTelemetry is a powerful feature that allows you to direct data (`traces`, `metrics`, or l`ogs`) to different pipelines based on specific criteria. This is especially useful in scenarios where you want to apply different processing or exporting logic to subsets of your telemetry data.
8+
The routing connector in OpenTelemetry is a powerful feature that allows you to direct data (`traces`, `metrics`, or `logs`) to different pipelines based on specific criteria. This is especially useful in scenarios where you want to apply different processing or exporting logic to subsets of your telemetry data.
99

1010
For example, you might want to send *production* data to one exporter while directing *test* or *development* data to another. Similarly, you could route certain spans based on their attributes, such as service name, environment, or span name, to apply custom processing or storage logic.
1111

@@ -26,9 +26,9 @@ WORKSHOP
2626
├── 7-transform-data
2727
├── 8-routing
2828
│ ├── agent.yaml
29+
│ ├── health.json
2930
│ ├── gateway.yaml
3031
│ ├── log-gen.sh (or .ps1)
31-
│ ├── health.json
3232
│   └── trace.json
3333
└── otelcol
3434
```
@@ -41,13 +41,12 @@ In the following exercise, you will configure the `routing connector` in the `ga
4141
Open the `gateway.yaml` and add the following configuration:
4242

4343
- **Add the `connectors:` section**:
44-
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.
44+
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.
4545

4646
```yaml
4747
connectors: # Section to configure connectors
4848

4949
processors:
50-
#memory_limiter:
5150

5251
```
5352

@@ -67,7 +66,7 @@ In OpenTelemetry configuration files, `connectors` have their own dedicated sect
6766
```
6867
6968
- **Configure two `file:` Exporters**:
70-
The `routing connector` requires different targets for routing. To achieve this, update the default `file/traces:` exporter and name it `file/traces/default` and add a second file exporter called `file/traces/security:`. This will allow the routing connector to direct data to the appropriate target based on the rules you define.
69+
The `routing connector` requires different targets for routing. To achieve this, update the default `file/traces:` exporter and name it `file/traces/default:` and add a second file exporter called `file/traces/security:`. This will allow the routing connector to direct data to the appropriate target based on the rules you define.
7170

7271
```yaml
7372
file/traces/standard: # Exporter Type/Name (For regular traces)
@@ -80,15 +79,12 @@ The `routing connector` requires different targets for routing. To achieve this,
8079
append: false # Overwrite the file each time
8180
```
8281

83-
- **Add both the `standard` and `security traces` pipelines**:
84-
To enable routing we need to define two pipelines for traces:
82+
- **Add both the `standard` and `security` traces pipelines**:
8583

86-
1. **Standard** pipeline.
87-
This pipeline will handle all spans that do not match the routing rule. Add it below the regular `traces:` pipeline, and leave the configuration unchanged for now.
84+
1. **Standard** pipeline: This pipeline will handle all spans that do not match the routing rule. Add it below the regular `traces:` pipeline, and leave the configuration unchanged for now.
8885

8986
```yaml
9087
pipelines:
91-
#traces:
9288
traces/standard: # New Default Traces/Spans Pipeline
9389
receivers:
9490
- routing # Routing Connector, Only receives data from Connector
@@ -100,12 +96,10 @@ To enable routing we need to define two pipelines for traces:
10096
- file/traces/standard # File Exporter for spans NOT matching rule
10197
```
10298

103-
- The Target pipeline, that will handle all spans that match the routing rule.
99+
- **Target pipeline**: This pipepline will handle all spans that match the routing rule.
104100

105101
```yaml
106102
pipelines:
107-
#traces:
108-
#traces/standard:
109103
traces/security: # New Security Traces/Spans Pipeline
110104
receivers:
111105
- routing # Routing Connector, Only receives data from Connector
@@ -115,11 +109,9 @@ To enable routing we need to define two pipelines for traces:
115109
exporters:
116110
- debug # Debug Exporter
117111
- file/traces/security # File Exporter for spans matching rule
118-
#metrics:
119112
```
120113

121-
- **Update the `traces` pipeline to handle routing**:
122-
To enable `routing`, update the original `traces:` pipeline by adding `routing` as an exporter. This ensures that all span data is sent through the routing connector for evaluation.
114+
- **Update the `traces` pipeline to handle routing**: To enable `routing`, update the original `traces:` pipeline by adding `routing` as an exporter. This ensures that all span data is sent through the routing connector for evaluation.
123115

124116
For clarity, we are removing the `debug` exporter from this pipeline, so that debug output is only shown from the new exporters behind the routing connector.
125117

0 commit comments

Comments
 (0)