Skip to content

Commit a5eb19e

Browse files
djaglowskisbylica-splunk
authored andcommitted
[processor/routing] Deprecate processor (open-telemetry#36692)
Resolves open-telemetry#36616
1 parent f00d48f commit a5eb19e

File tree

5 files changed

+108
-15
lines changed

5 files changed

+108
-15
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: deprecation
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: routingprocessor
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Deprecated in favor of the routing connector.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [36616]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user, api]

connector/routingconnector/README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ connectors:
133133
default_pipelines: [logs/other]
134134
table:
135135
- context: request
136-
condition: reqeust["X-Tenant"] == "acme"
136+
condition: request["X-Tenant"] == "acme"
137137
pipelines: [logs/acme]
138138
- context: request
139-
condition: reqeust["X-Tenant"] == "ecorp"
139+
condition: request["X-Tenant"] == "ecorp"
140140
pipelines: [logs/ecorp]
141141

142142
service:
@@ -263,10 +263,10 @@ connectors:
263263
condition: severity_number < SEVERITY_NUMBER_ERROR
264264
pipelines: [logs/cheap]
265265
- context: request
266-
condition: reqeust["X-Tenant"] == "acme"
266+
condition: request["X-Tenant"] == "acme"
267267
pipelines: [logs/acme]
268268
- context: request
269-
condition: reqeust["X-Tenant"] == "ecorp"
269+
condition: request["X-Tenant"] == "ecorp"
270270
pipelines: [logs/ecorp]
271271

272272
service:
@@ -285,10 +285,6 @@ service:
285285
exporters: [file/ecorp]
286286
```
287287
288-
## Differences between the Routing Connector and Routing Processor
289-
290-
- The connector routes to pipelines, not exporters as the processor does.
291-
292288
[Connectors README]:https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md
293289
294290
[OTTL]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/README.md

processor/routingprocessor/README.md

+73-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,83 @@
33
<!-- status autogenerated section -->
44
| Status | |
55
| ------------- |-----------|
6-
| Stability | [beta]: traces, metrics, logs |
6+
| Stability | [deprecated]: traces, metrics, logs |
77
| Distributions | [contrib] |
88
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Frouting%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Frouting) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Frouting%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Frouting) |
99
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) |
1010

11-
[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta
11+
[deprecated]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#deprecated
1212
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
1313
<!-- end autogenerated section -->
1414

15+
## Deprecation Notice
16+
17+
This processor has been deprecated in favor of the [`routing` connector][routing_connector].
18+
19+
### Migration
20+
21+
The routing connector supports all features of the routing processor and more. However, the configuration is different. The general idea is the same, but there are a few key differences:
22+
23+
- Rather than routing directly to exporters, the routing connector routes to pipelines. This allow for processors to be included after routing decisions.
24+
- The connector is configured within the `connectors` section, rather than the `processors` section of the configuration.
25+
- Usage of the connector in pipelines is different. You must use it as an exporter AND as a receiver in each pipeline to which it can route.
26+
- Configuration is primarily based on [OTTL][OTTL].
27+
- Each route can be evaluated in a different [OTTL Context][ottl_contexts].
28+
29+
#### Example
30+
31+
Starting from the example configuration below, we can achieve the same result with the routing connector:
32+
33+
```yaml
34+
processors:
35+
routing:
36+
from_attribute: X-Tenant
37+
default_exporters: [jaeger]
38+
table:
39+
- value: acme
40+
exporters: [jaeger/acme]
41+
exporters:
42+
jaeger:
43+
endpoint: localhost:14250
44+
jaeger/acme:
45+
endpoint: localhost:24250
46+
service:
47+
pipelines:
48+
traces:
49+
receivers: [otlp]
50+
processors: [routing]
51+
exporters: [jaeger, jaeger/acme]
52+
```
53+
54+
```yaml
55+
connectors:
56+
routing:
57+
match_once: true
58+
default_pipelines: [traces/jaeger]
59+
table:
60+
- context: request
61+
condition: request["X-Tenant"] == "acme"
62+
pipelines: [traces/jaeger/acme]
63+
exporters:
64+
jaeger:
65+
endpoint: localhost:14250
66+
jaeger/acme:
67+
endpoint: localhost:24250
68+
service:
69+
pipelines:
70+
traces:
71+
receivers: [otlp]
72+
exporters: [routing]
73+
traces/jaeger:
74+
receivers: [routing]
75+
exporters: [jaeger]
76+
traces/jaeger/acme:
77+
receivers: [routing]
78+
exporters: [jaeger/acme]
79+
```
80+
81+
## Overview
82+
1583
Routes logs, metrics or traces to specific exporters.
1684
1785
This processor will either read a header from the incoming HTTP request (gRPC or plain HTTP), or it will read a resource attribute, and direct the trace information to specific exporters based on the value read.
@@ -114,4 +182,6 @@ The full list of settings exposed for this processor are documented [here](./con
114182
- [traces](./testdata/config_traces.yaml)
115183

116184
[context_docs]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md
117-
[OTTL]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/processing.md#telemetry-query-language
185+
[OTTL]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl#opentelemetry-transformation-language
186+
[ottl_contexts]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/contexts/README.md#opentelemetry-transformation-language-contexts
187+
[routing_connector]: http://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector/README.md

processor/routingprocessor/internal/metadata/generated_status.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

processor/routingprocessor/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type: routing
33
status:
44
class: processor
55
stability:
6-
beta: [traces, metrics, logs]
6+
deprecated: [traces, metrics, logs]
77
distributions: [contrib]
88
codeowners:
99
active: [jpkrohling]

0 commit comments

Comments
 (0)