|
3 | 3 | <!-- status autogenerated section -->
|
4 | 4 | | Status | |
|
5 | 5 | | ------------- |-----------|
|
6 |
| -| Stability | [beta]: traces, metrics, logs | |
| 6 | +| Stability | [deprecated]: traces, metrics, logs | |
7 | 7 | | Distributions | [contrib] |
|
8 | 8 | | Issues | [](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Frouting) [](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Frouting) |
|
9 | 9 | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) |
|
10 | 10 |
|
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 |
12 | 12 | [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
|
13 | 13 | <!-- end autogenerated section -->
|
14 | 14 |
|
| 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 | +
|
15 | 83 | Routes logs, metrics or traces to specific exporters.
|
16 | 84 |
|
17 | 85 | 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
|
114 | 182 | - [traces](./testdata/config_traces.yaml)
|
115 | 183 |
|
116 | 184 | [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 |
0 commit comments