Does fluentd loads gem in alphabetical order of their name? #5158
RamHaridas
started this conversation in
General
Replies: 2 comments
-
|
Basically depends on the version number included in the path. fluentd/lib/fluent/registry.rb Lines 85 to 89 in 7ba2227 By default, it prioritizes loading the latest version. If it conflicts with another gem, the result may differ because the paths are different.... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
it would be preferable to use properly maintained plugins. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have installed 2 gems
fluent-plugin-splunk-enterpriseandfluent-plugin-splunk-hec. Both gems have a plugin with same name@type splunk_hec.This creates a situation where splunk-hec overrides the type name to its own parameters, ending up in a situation where fluentd fails if
@type splunk_hecis used with parameters of splunk-enterprise.Now I do understand that this a default known behavior of fluentd where type names are registered uniquely.
In order to understand and overcome this, I installed both gems at different paths and tried loading them in different order using GEM_PATH environment variable.
/path/to/splunk-hec/path/to/splunk-enterpriseThen I tried loading them through
GEM_PATHin different ways:I even tried installing gems in a chronological order:
Regardless of how gems are installed or loaded, fluentd would still load HEC plugin second which ends up overriding the splunk_hec type.
I wanted to understand the order in which fluentd is loading gems. Is it in alphabetical order?
Because every time
fluent-plugin-splunk-hecis loaded second leading it to register type name splunk_hec for itself.Beta Was this translation helpful? Give feedback.
All reactions