Routing OpenTelemetry data to different back ends by value

Routing OpenTelemetry data by value sends high-value telemetry to fast storage and the rest to cheaper archives or per-tenant back ends. This page covers the routing connector, OTTL conditions, trade-offs and setup.

On this page

Routing OpenTelemetry data by value to control back-end cost

Value-based routing makes sense once one back end receives everything and storage cost keeps climbing, even though not all telemetry needs fast or expensive storage. Most teams start by sending every span, metric and log to one platform because it is the simplest path. Over time, the bill grows with volume, and much of that volume is low-value data such as successful health checks, verbose debug logs from internal jobs and traces from a non-production tenant that nobody queries. OpenTelemetry does not solve this by itself because it is not an observability back end. It generates, exports and collects telemetry, and storage and query are left to other tools. The routing decision therefore lives in the OpenTelemetry Collector, which receives data from applications and infrastructure and decides where each record goes before it reaches paid storage.

Routing is a different tool from filtering and sampling, and the difference should drive the choice. Filtering removes data you never want to keep, and sampling reduces volume by keeping a fraction of it. Routing keeps the data but sends it to a different destination, such as fast storage for errors and slow requests, a cheaper archive for everything else, or a separate back end for each customer tenant with its own retention rules. Teams usually need routing when the same telemetry stream has to be retained for different lengths of time or for different owners, or when compliance requires some data to stay in a specific region or account. If the only question is how much to keep, filtering or sampling is the simpler answer.

Before you design routes, confirm three things with your back-end vendors and internal owners: which exporters each destination requires, how long each destination must retain data, and whether the routing decision depends on fields that exist at ingestion time. The Collector configuration docs at Collector configuration describe how receivers, processors, connectors and exporters fit together, which is the starting point for mapping each route to a pipeline. Also confirm which Collector distribution and version your team will run, since component stability varies and the routing connector and its conditions must be available in that build.

Which routing pattern fits which goal

This table compares four ways to route OpenTelemetry data with the routing connector and OTTL conditions: tiered storage by signal value, a cheaper archive for the remainder, per-tenant back ends, and routing by environment or service. Read each row as a goal, the condition style that expresses it, the upkeep it creates, and the conditions under which it is worth the effort.

PatternGoal and OTTL condition styleOperational burdenWhen it fits
Tiered storage by signal valueKeep errors, slow requests and key customers in fast storage. Conditions match on span status, duration or attributes such as customer tier.Medium. Rules must track attribute names and be retested after service changes.Fast back end is costly and a small share of data drives most investigations.
Archive for the remainderSend everything not routed to fast storage to a cheaper store for later audit or replay. Often a catch-all route after the value rules.Medium. Archive retrieval and retention rules must be documented and tested.Compliance or forensic needs require retention that the fast back end cannot economically hold.
Per-tenant back endsSeparate telemetry by tenant or business unit so each has its own storage, access and retention. Conditions match a tenant resource attribute.High. Each back end needs its own capacity, access model, backups and upgrades.Tenants have contractual or regulatory isolation requirements that a shared store cannot meet.
Routing by environmentKeep production telemetry on the production back end and send non-production to a smaller store. Conditions match the deployment environment attribute.Low to medium. Requires consistent resource attributes across all services.Non-production volume is high and teams want to limit spend without touching production data.
Routing by serviceGive critical services dedicated pipelines or back ends. Conditions match the service name resource attribute.Medium. Every new service needs a routing decision, so the list must be maintained.A few services produce most of the cost or carry the most operational risk.
Routing by signal typeSend traces, metrics and logs to the back ends built for each. Conditions use the pipeline split rather than attribute matching.Low. Each back end is configured once per signal.Your current back ends are already specialized per signal and the goal is fit, not cost.

How telemetry flows from applications to routed back ends

Telemetry starts in applications that export OTLP to a gateway Collector. The routing connector then evaluates OTTL conditions on each record, sending matches to the fast-storage back end, low-value data to the archive, and tenant-tagged data to per-tenant back ends. Anything no condition matches falls through to the default route, so check that it exists and that unmatched data lands somewhere you can find it.

Gateway Collector routing telemetry to back ends by OTTL condition.

How to set up value-based routing in the Collector

This sequence takes a team from an inventory of signals and attributes to a Collector that sends high-value telemetry to fast storage and the rest to cheaper destinations. Each step ends with a check so the routing decisions are confirmed before they reach paid back ends.

  1. Inventory signals and attributes

    Engineers list every telemetry stream the Collector receives, including traces, metrics and logs, and note the resource and record attributes that could separate valuable data from routine data, such as service name, deployment environment, HTTP status, log severity and tenant identifier. Export a representative sample of each stream so the attribute names and value shapes are known from real traffic rather than from memory. Done when every stream has a named owner and a sample file that the team has reviewed.

  2. Define value criteria with owners

    Service owners, the security team and the operations lead agree in writing which data is high value and which destination each class goes to. Criteria should be expressed as conditions the Collector can evaluate, for example errors on production services, audit-relevant logs or traffic from a named tenant. Record who approves each rule and what happens to data that matches no rule. Done when the criteria document is signed off and every rule has a destination and an owner.

  3. Build the Collector with only the components needed

    Platform engineers assemble a Collector distribution with the Collector Builder, including the routing connector, the receivers, processors and exporters that the criteria require, and nothing else. The OpenTelemetry security guidance recommends building with only the needed components, so unused components are left out of the image. Keep the build manifest in version control and confirm the components are marked stable or record their stability level from each component's README. Done when the build succeeds and the component list matches the criteria.

  4. Write and test OTTL conditions against sample data

    Engineers write the OTTL conditions that the routing connector evaluates and run them against the exported sample files before any configuration reaches a running Collector. Each condition is tested with matching and non-matching examples, including missing attributes and unexpected value types, so the team can see which route each record takes. Store the test inputs and expected routes next to the configuration. Done when every test case produces the expected route and no record falls through unexpectedly.

  5. Configure exporters and the default route

    Engineers define one exporter per back end, with its own endpoint, authentication and retry settings, and wire each route in the routing connector to the matching pipeline. A default route catches anything that matches no condition so no data is silently discarded. Secure the configuration as the security best practices describe: store it securely, encrypt connections and keep credentials out of plain text. Done when the Collector starts cleanly, each pipeline shows the expected exporters and the default route is listed.

  6. Verify each back end receives the expected data

    The team sends controlled test traffic through a staging Collector and checks each back end for the records the criteria assigned to it, along with the absence of records that belong elsewhere. Compare the counts on the default route with the expected unmatched traffic and review any unexpected flow. Confirm that the Collector's own internal telemetry shows no export failures before promoting the configuration. Done when each back end's contents match the test plan and the team signs off the routing rules for production.

Trade-offs by team and environment

A platform team that runs a shared Collector gateway usually owns the routing connector, its OTTL conditions and the back-end exporters for every tenant. Routing is attractive here because one gateway can fan data out to fast storage, cheaper archives and per-team back ends without each application changing its SDK configuration. The cost is that every routing rule becomes a shared dependency, so a mistake in one condition affects many teams at once.

  • Added latency: Each routing hop adds processing time and memory use inside the gateway. Measure this under realistic load before you add a second routing tier.
  • Configuration complexity: Conditions written in OTTL grow quickly as tenants are added. Keep rules in version control and review them like application code.
  • Duplicated pipelines: Sending the same data to two back ends doubles export traffic and storage for that subset. Confirm which copies are truly needed.
  • Misrouted data: A condition that matches too broadly can send one team's telemetry to another team's back end. Test with sample payloads before each change.
  • Ownership boundaries: Agree in writing who approves changes to routing rules and who responds when a tenant's data stops arriving.

Before rollout, confirm the Collector build includes only the components you need, and check the stability level of each routing component in its README.

Security and operational risks when routing telemetry

Routing sends different telemetry to different destinations, so a single mistake can put sensitive data in the wrong archive or expose the Collector itself. The cards below cover the risks that connect routing decisions to data protection and day-to-day operations, along with the checks to run before and after each change.

Misrouted sensitive data

A routing condition that matches too broadly can send records with personal or regulated fields to a cheaper archive that more people can query. Review every route against the data classes it may carry, and test conditions with sample records that include edge cases such as missing attributes or unexpected body formats. Confirm who can read each destination before it receives production traffic.

Collector security practices

Collector endpoint exposure

Receivers that accept telemetry from many sources become a target if they listen on all interfaces without access controls. Current Collector releases bind server components to localhost by default, but gateways that must accept remote traffic need deliberate network policies and TLS. Confirm which interfaces each receiver binds to and which networks can reach them.

Localhost binding default
v0.110.0

Authentication on receivers

Authenticator extensions can check incoming connections on receivers, for example with OIDC, so only known clients can send telemetry into a routing gateway. Without this check, anyone who reaches the endpoint can inject data that the routing rules then deliver to paid or shared back ends. Confirm which senders authenticate and how credentials are rotated.

Separate secrets for each exporter

Each destination needs its own credentials, and the oauth2client extension can attach them to outgoing requests. Shared tokens let a compromise of one archive grant access to the others, and they make rotation disruptive. Store Collector configuration securely, keep exporter credentials out of plain-text files in the repository, and set each one to the narrowest write permission the destination allows.

Redaction before export

The redaction processor removes sensitive attributes before data leaves the Collector, which protects every destination at once. Place it ahead of routing so that archives, tenant back ends and shared stores never receive fields they should not hold. Verify the redaction rules against real samples, because a rule that misses one attribute name leaves that field in every route.

Monitoring for dropped or unrouted data

A condition that matches nothing sends data to no destination, and a full exporter queue can drop records silently. Monitor the Collector's own telemetry for refused, dropped and failed exports, and alert when a route's volume falls to zero or jumps unexpectedly. Check these signals after every routing change, because the savings and the silent losses appear in the same place.

Questions teams ask before routing OpenTelemetry data

What drives the cost of routing OpenTelemetry data by value?

Cost depends mostly on how many back ends are involved, how many routing rules you need, and how well your telemetry is already tagged. Each destination adds configuration, credentials, retention settings and a separate operating burden. Rules that depend on attributes missing from your instrumentation take longer to design because the fix may belong in the SDKs rather than the Collector. Costs are split between design work, Collector configuration, testing against real traffic, and the ongoing effort of running two or more storage tiers. Ask any partner to price these components separately, and ask which parts are one-time and which recur, such as rule changes as services evolve. A written scope should list each destination and each rule category so the quote follows from it.

How long does routing work take, and what sets the duration?

Duration is set by the number of destinations, the number of rule categories, and the state of the existing pipeline. A single Collector with one fast store and one archive is a smaller job than a multi-tenant layout with separate back ends per customer or business unit. Discovery of what telemetry exists, which teams own it, and what retention each team requires often takes longer than the Collector work itself. Validation against live traffic, and any approval steps for data residency or access, add time at the end. Ask for a timeline tied to named milestones in the written scope, and ask which dependencies sit outside the implementation team's control.

What does the work need from our team?

You need named owners for three things: the telemetry you want to classify, the back ends that will receive it, and the retention and access rules each data class must follow. Platform engineers need access to the Collector deployment, its configuration store and the pipelines that feed it. Application teams must confirm which resource and span attributes they set, because routing conditions depend on them. Security or compliance staff should approve which data may leave a given zone or tenant boundary. Plan time for these people in advance, since waiting for attribute decisions or access approvals is a common source of delay.

Can our in-house team build routing on the OpenTelemetry Collector?

A team with Collector experience and a clear data classification can build basic routing in-house. The routing connector and OTTL conditions are configuration-driven, so the work is mostly deciding rules, testing them and keeping them in version control. Difficulty rises when you need per-tenant isolation, encrypted and authenticated exporters, or consistent behavior across agents and gateways. Check the stability level of each component you plan to use, because the OpenTelemetry status documentation records mixed stability across core components. Also decide who will maintain the rules after launch. If no one on the team has run Collector pipelines in production, an outside review of the design before rollout is a reasonable step.

How does routing interact with sampling and metric derivation?

Routing decides where data goes, while sampling decides which data is kept, so the order of these stages changes results. If tail sampling runs before routing, a route may receive only the traces the sampler kept, which can hide data you planned to archive. If you derive metrics from spans, check that the connector sees all spans before any drop or sampling step so dashboards stay accurate. Trace-level decisions must stay consistent: a routing rule that splits spans from one trace across back ends can break trace views. Document the pipeline order, and test that each back end receives the data class its owner expects.

How do we test routing rules safely before they affect production data?

Test routing in a staging pipeline fed with representative traffic, and compare what each destination receives against expected counts and attributes. Use a debug exporter or a temporary copy of the pipeline to confirm that conditions match the intended spans, logs and metrics without writing to paid storage. Roll changes out one destination at a time, and keep the previous configuration ready for rollback. Watch the Collector's own telemetry during rollout for dropped data and memory pressure. Record each rule with its owner and the test evidence, so that later changes can be reviewed. Ask any partner to show how they will verify routing before cutover.

Do we need a partner to handle data residency for tenant back ends?

You need a partner when residency rules, tenant isolation and audit requirements are complex enough that internal teams cannot cover them with confidence. DeployOpen plans, implements and documents self-hosted OpenTelemetry pipelines inside your own cloud accounts, data centers or air-gapped networks, and prepares the configuration and evidence your compliance team reviews. It does not issue audit reports or certifications, which independent auditors and certification bodies provide. Ask for the scope in writing, including which destinations, tenants and rule categories are covered, and which controls you will own after handover.

Official OpenTelemetry sources for routing configuration

Before you write a routing configuration, read the official Collector sources that define how routing works, because the exact connector names, OTTL function behavior and component stability levels are what your configuration will depend on. Start with the OpenTelemetry Collector documentation for the pipeline model, then the Collector configuration reference for the settings you will set, including how receivers, connectors and exporters are wired into pipelines. Confirm in the component README for the routing connector and the OTTL-based processors you plan to use, since core Collector components have mixed stability levels and a routing setup that works in one release may change in another.

Treat the security best practices page as a design input, not a final review step. It recommends storing Collector configuration securely, using encryption and authentication, building only the components you need with the Collector Builder, and using the redaction processor to remove sensitive attributes. Those points matter for routing because a router that sends data to a second back end is also a second place where regulated or tenant-specific data can leave its intended boundary. Read the configuration best practices page before you decide which exporters appear in the build, and note that server components bind to localhost by default since Collector v0.110.0, so confirm any receiver you expose to other networks is bound and authenticated on purpose.

Pin the Collector version you test against and check the release page before each rollout. Releases ship the contrib distribution with signed artifacts, SHA256 checksums and SBOM files, which your team should verify as part of its supply chain controls. Ask the team that owns your back ends to confirm which exporters and routing features they support in the version you select, and record that answer alongside your configuration so a future upgrade starts from known behavior.

How DeployOpen scopes and delivers value-based routing

The sequence moves from a written scope to a routing design agreed with the data owners, then to a tested Collector configuration running in your infrastructure, and finally to ongoing support if you want it. Each step closes with a named output so you can see what was decided and what was verified.

  1. Agree the written scope and data sources

    DeployOpen and your team define which signals, sources and back ends are in scope, which Collector deployments will carry the routing, and what the destinations are. The output is a written scope with deliverables and an agreed list of telemetry sources. Work does not start until both sides have signed off on that scope, since most engagements are fixed-scope.

  2. Inventory current telemetry and its value

    Engineers catalog the traces, metrics and logs already flowing through the pipeline, including volume by source and the attributes each carries. Data owners then label which streams matter for incident response, audit, customer support and capacity planning. The output is an inventory that maps each stream to a value tier and to the team accountable for it.

  3. Design the routing tiers with data owners

    DeployOpen drafts the routing design with the teams that own each data class, covering which tier goes to fast storage, which goes to a lower-cost archive, and which is split per tenant. Security, privacy and compliance reviewers check that routing rules do not move regulated fields into destinations that lack the required controls. The output is an approved routing matrix with the OTTL conditions written out per tier.

  4. Confirm the Collector components and build

    Engineers confirm that the routing connector and the processors the design needs are available in the Collector distribution you plan to run, and check the stability level of each component in its README. Where a custom build is needed, the build includes only the components the design uses. The output is a component list with stability notes and a build manifest the client can review.

  5. Implement the configuration in your environment

    DeployOpen writes the Collector configuration in version-controlled files, deploys it into the cloud accounts, data centers or air-gapped networks you control, and stores credentials through your secrets handling. Exporter authentication and receiver access controls are configured as part of the same change. The output is a deployed configuration and a record of every routing rule in the repository.

  6. Test routing and unrouted data

    Test telemetry is sent through each condition to confirm that every record reaches the intended destination and nothing lands in the wrong tier. Engineers check for data that matches no route, verify that sensitive attributes are removed before export, and compare the counts received by each back end with the counts sent. The output is a test report with the rule set that passed and the failures fixed and retested.

  7. Hand over runbooks and knowledge

    DeployOpen documents the routing matrix, the conditions, the deployment steps and the rollback procedure, then walks your operators through how to change a route safely. Your team confirms it can read Collector health signals and identify dropped data after a change. The output is a handover package and a trained operations team able to make routing changes without outside help.

  8. Continue with support or a retainer

    If you want help after handover, DeployOpen can provide ongoing support, upgrades and continuous testing under a retainer, with the terms agreed in writing. Ongoing work typically covers Collector version upgrades, changes to data owners' routing needs and periodic retesting of routes. The output is an agreed support arrangement, or a confirmed decision to run the pipeline with your own team.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.