Closed ganmacs closed 4 years ago
@repeatedly ?
record_modifier uses pre-eval based implementation and it is faster: https://github.com/repeatedly/fluent-plugin-record-modifier/blob/dc86ba87d1484b948d25dd792077244eb35ba8bf/lib/fluent/plugin/filter_record_modifier.rb#L164 Can we use this for prometheus?
I don't think so.
This class which makes users be able to use ruby in ${}
seems to be too much for this feature. also, if we use this, ${hostname}
should be changed to ${@hostname}
, right? (or another way?). It's breaking change we want to avoid.
${hostname}
should be changed to${@hostname}
, right?
Add hostname
method to expander resolves it. But if support existing features is hard with pre-eval approach, this implementation is good.
Can I merge this? @repeatedly @kazegusuri
@kazegusuri how about this change?
ah sorry. I think it's okay to keep the compatibility and make it easy. LGTM to merge this.
btw I'm wondering long time that fluentd officially provides the way to expand placeholder by messages to 3rd party plugins or not. Otherwise every plugins coping this implementation or implement their own exapander with a different UI.
btw I'm wondering long time that fluentd officially provides the way to expand placeholder by messages to 3rd party plugins or not. Otherwise every plugins coping this implementation or implement their own exapander with a different UI.
Right. Currently, fluentd doesn't provide a consistent way to expand placeholders for 3rd party plugins. It'd be good to do it.
I raised the issue. https://github.com/fluent/fluentd/issues/2800
fix https://github.com/fluent/fluent-plugin-prometheus/issues/125, https://github.com/fluent/fluent-plugin-prometheus/issues/84