Closed williampratt closed 9 years ago
Thanks @williampratt . It's doable but I would like to hear @repeatedly 's opinion. Is removing tag prefix a common requirement?
In the v0.10, removing tag prefix is popular because fluentd does't have a filter. In the v0.12 or later, we have a filter and modifying tag becomes rare case. Personally speaking, we don't need remove_tag_prefix or similar parameters in almost cases.
But of course, if there are useful cases, we can adopt these parameters.
The mixpanel plugin that we use implements it. For my specific setup, it's easier to do it as a config option than a filter as the filter would break my routing.
To elaborate, I prepend the output plugin name to the event name as we have some events headed to influx, some to mixpanel and some to both. Since filters run before the output matches happen, I can no longer match on those, which breaks my routing.
Also, the code is minimal and it's optional so I don't see much impact here. I greatly appreciate your gem. I'm glad I didn't have to start from scratch. I plan to write a test suite for it and submit that in a pr as well.
Hmm... for complex cases, handling tag is useful for now. In the future, I hope label and filter removes tag handling.
Don't merge until I give the thumbs up. I'm still testing.
This is working great for us and ready to merge unless you have any issues with it.
Thanks for the testing! I will releaes new version later.
This allows you to remove the prefix from a tag