You can use the data transformation feature in TLS to distribute logs from a source log topic to multiple target log topics according to certain rules. This topic provides typical examples of distribution and replication scenarios for data.
In replication and distribution scenarios, you can send logs from a single source topic to multiple target topics.
For example, an HTTP service may return status codes such as 200, 400, and 500. After collecting service operation logs into TLS, you may need to distribute logs with different status codes to different log topics for further analysis.
Raw log
Configure output target
Set aliases for three target log topics as "topic-200", "topic-400", and "topic-500".
DSL transformation rules
Processing result
The data written to the log topic with the alias topic-200 is as follows:
The data written to the log topic with the alias topic-400 is as follows:
The data written to the log topic with the alias topic-500 is as follows: