{"record":{"id":"83843d801f5cbd67","repo":"fluent/fluentd","slug":"this-plugin-self-class-allows-buffer-tag-on","errorCode":null,"errorMessage":"this plugin '#{self.class}' allows <buffer tag> only","messagePattern":"this plugin '#(.+?)' allows <buffer tag> only","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"critical","filePath":"lib/fluent/compat/output.rb","lineNumber":501,"sourceCode":"              if older == 'buffer_queue_full_action' && conf[older] == 'exception'\n                buf_params[newer] = 'throw_exception'\n              else\n                buf_params[newer] = conf[older]\n              end\n            end\n          end\n\n          conf.elements << Fluent::Config::Element.new('buffer', 'tag', buf_params, [])\n        end\n\n        ParserUtils.convert_parser_conf(conf)\n        FormatterUtils.convert_formatter_conf(conf)\n\n        super\n\n        if config_style == :v1\n          if @buffer_config.chunk_keys == ['tag']\n            raise Fluent::ConfigError, \"this plugin '#{self.class}' allows <buffer tag> only\"\n          end\n        end\n\n        self.extend BufferedChunkMixin\n      end\n\n      def format_stream(tag, es) # for BufferedOutputTestDriver\n        if @compress == :gzip\n          es.to_compressed_msgpack_stream(time_int: @time_as_integer)\n        else\n          es.to_msgpack_stream(time_int: @time_as_integer)\n        end\n      end\n\n      def write(chunk)\n        write_objects(chunk.metadata.tag, chunk)\n      end\n","sourceCodeStart":483,"sourceCodeEnd":519,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/compat/output.rb#L483-L519","documentation":"Raised as Fluent::ConfigError in Fluent::Compat::ObjectBufferedOutput#configure, the shim for v0.12 ObjectBufferedOutput plugins (plugins implementing write_objects(tag, chunk)). config_style is :v1 when an explicit <buffer> section is present; when the chunk keys parsed from it are exactly ['tag'] the shim raises. Despite the message text ('allows <buffer tag> only'), what is rejected is precisely an explicitly written <buffer tag> section: tag-flushed buffering is wired internally by the shim (it appends its own <buffer tag> when translating v0-style config), not through v1 buffer syntax.","triggerScenarios":"A v1-style config with an explicit <buffer tag> section on a v0.12 ObjectBufferedOutput plugin; reusing a config written for a v1 plugin on an unmigrated legacy plugin.","commonSituations":"Copying modern config examples onto old plugin versions; config-management templates shared across plugins of mixed API generations.","solutions":["Remove the explicit <buffer tag> section and configure buffering with the plugin's v0.12 parameters (buffer_type, flush_interval, retry_limit)","Upgrade the plugin to a v1-API version that supports <buffer ...> sections natively","Check compatibility with fluentd --dry-run -c <config> before restart"],"exampleFix":"# before (v0.12 ObjectBufferedOutput plugin, v1-style config)\n<match app.**>\n  @type legacy_object_output\n  <buffer tag>\n    @type memory\n  </buffer>\n</match>\n\n# after\n<match app.**>\n  @type legacy_object_output\n  buffer_type memory\n  flush_interval 5s\n</match>","handlingStrategy":"validation","validationCode":"# catch it before deploy:\n#   fluentd --dry-run -c /etc/fluent/fluent.conf\n# in code, detect the incompatible combination:\nlegacy = plugin.class.ancestors.any? { |a| a.name == 'Fluent::Compat::ObjectBufferedOutput' }\nbuffer_arg = conf.elements.find { |e| e.name == 'buffer' }&.arg.to_s.strip\nabort 'v0.12 ObjectBufferedOutput plugin rejects an explicit <buffer tag> section' if legacy && buffer_arg == 'tag'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not write v1-style <buffer tag> sections for v0.12 ObjectBufferedOutput plugins","Track which plugins are still on the v0.12 API in your inventory","Dry-run every config change in a staging gem environment identical to production"],"tags":["fluentd","config","buffer","v012-compat","plugin-migration"],"backgroundTag":"plugin-api-version-mismatch","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}