{"record":{"id":"2ee4f89380b2fdcb","repo":"fluent/fluentd","slug":"missing-type-parameter-in-store-section","errorCode":null,"errorMessage":"Missing '@type' parameter in <store> section","messagePattern":"Missing '@type' parameter in <store> section","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/multi_output.rb","lineNumber":87,"sourceCode":"\n      def multi_output?\n        true\n      end\n\n      def configure(conf)\n        super\n\n        @num_errors_metrics = metrics_create(namespace: \"fluentd\", subsystem: \"multi_output\", name: \"num_errors\", help_text: \"Number of count num errors\")\n        @emit_count_metrics = metrics_create(namespace: \"fluentd\", subsystem: \"multi_output\", name: \"emit_count\", help_text: \"Number of count emits\")\n        @emit_records_metrics = metrics_create(namespace: \"fluentd\", subsystem: \"multi_output\", name: \"emit_records\", help_text: \"Number of emit records\")\n        @emit_size_metrics =  metrics_create(namespace: \"fluentd\", subsystem: \"multi_output\", name: \"emit_size\", help_text: \"Total size of emit events\")\n        @enable_size_metrics = !!system_config.enable_size_metrics\n\n        @stores.each do |store|\n          store_conf = store.corresponding_config_element\n          type = store_conf['@type']\n          unless type\n            raise Fluent::ConfigError, \"Missing '@type' parameter in <store> section\"\n          end\n\n          log.debug \"adding store\", type: type\n\n          output = Fluent::Plugin.new_output(type)\n          output.context_router = self.context_router\n          output.configure(store_conf)\n          @outputs << output\n        end\n      end\n\n      def static_outputs\n        @outputs_statically_created = true\n        @outputs\n      end\n\n      # Child plugin's lifecycles are controlled by agent automatically.\n      # It calls `outputs` to traverse plugins, and invoke start/stop/*shutdown/close/terminate on these directly.","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/multi_output.rb#L69-L105","documentation":"Multi-output plugins (copy, redirect, etc. built on Fluent::Plugin::MultiOutput) instantiate one child output per <store> section via its @type. In configure, a store whose corresponding config element has no '@type' key raises before plugin instantiation — there is no way to know which output plugin to load.","triggerScenarios":"configure(conf) on a copy/routing output where a <store> block lacks `@type`, e.g. <store> <buffer>...</buffer> </store> or a bare <store> with only host/port keys pasted without the plugin line.","commonSituations":"Adding a third output branch to out_copy and forgetting @type; ERB loops emitting <store> from a hash that lost its type key; commenting out the @type line while debugging.","solutions":["Add `@type` to every <store> — e.g. @type stdout, @type forward, @type file","If using templated stores, assert the type key exists before rendering (fail the template early with a clearer message)","Run `fluentd --dry-run -c fluent.conf` in CI to catch this class of config error before deploy"],"exampleFix":"# before\n<match **>\n  @type copy\n  <store>\n    @type stdout\n  </store>\n  <store>\n    path /var/log/out.log\n  </store>\n</match>\n\n# after\n<match **>\n  @type copy\n  <store>\n    @type stdout\n  </store>\n  <store>\n    @type file\n    path /var/log/out.log\n  </store>\n</match>","handlingStrategy":"validation","validationCode":"conf.elements('store').each do |store|\n  unless store['@type']\n    raise ArgumentError, \"<store> at #{store.unused} missing @type\"\n  end\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every <store> starts with @type as a template convention","If stores are generated, make the type key required in the generator schema","Dry-run configs in CI"],"tags":["fluentd","output","copy","configuration","plugin-type"],"backgroundTag":"missing-plugin-type","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}