Skip to content

Commit

Permalink
Add APM data stream rerouting docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Apr 6, 2024
1 parent 37089b2 commit df95443
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/en/observability/apm/data-streams.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,31 @@ Logs are stored in the following data streams:
- APM app logging: `logs-apm.app.<service.name>-<namespace>`
// end::logs-data-streams[]

[discrete]
[[apm-data-stream-rerouting]]
=== APM data stream rerouting

APM supports rerouting APM data to user-defined APM data stream names other than the defaults described above.
This can be achieved by using a `reroute` processor in ingest pipelines to set the data stream dataset or namespace.

For example, consider traces that would originally be indexed to `traces-apm-default`. To set the data stream namespace from the trace's `service.environment` and fallback to a static string `"default"` if `service.environment` does not exist, add an ingest pipeline named `traces-apm@custom`:

[source, json]
----
[
{
"reroute": {
"namespace": [
"{{service.environment}}",
"default"
]
}
}
]
----

For more about reroute processor, see {es-ref}/reroute-processor.html[Reroute processor reference].

[discrete]
[[apm-data-streams-next]]
=== What's next?
Expand Down

0 comments on commit df95443

Please sign in to comment.