fluent-plugin-rewrite-tag-filter
fluent-plugin-rewrite-tag-filter copied to clipboard
Why can't I change back to the original tag?
I want to keep the original tag, but I can't.
Use record_transformer before apply this plugin.
I'm new to fluentd but as far as I can tell, record_transformer
isn't applicable when you want to rewrite some records based on tags but not all of them. For example, the below doesn't seem to work:
<match service.**>
@type rewrite_tag_filter
<rule>
key $.request.remote_address
pattern /10\.[023]\.*/
tag ${tag}
</rule>
<rule>
key $.request.remote_address
pattern /10\.6\.*/
tag region.${tag}
</rule>
</match>
I'm new to fluentd but as far as I can tell,
record_transformer
isn't applicable when you want to rewrite some records based on tags but not all of them. For example, the below doesn't seem to work:
Do you see why not,After the tag is modified, it will be rerouted, and the result will be returned to the logic of your modified tag
Ah so it re-enters from the top? I had assumed it would be re-emitted from that match and continue down. Like I said, I'm new 😅 Anyway I understand now with your explanation, thank you!