{"record":{"id":"298ba623f510fe1f","repo":"fluent/fluentd","slug":"parameter-name-string-doesn-t-have-tag-pl","errorCode":null,"errorMessage":"Parameter '#{name}: #{string}' doesn't have tag placeholder","messagePattern":"Parameter '#(.+?): #(.+?)' doesn't have tag placeholder","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/output.rb","lineNumber":747,"sourceCode":"          title = @argument[:title]\n          example = @argument[:example]\n          timekey = @argument[:timekey]\n          if !sec && timekey\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have timestamp placeholders for timekey #{timekey.to_i}\"\n          end\n          if sec && !timekey\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has timestamp placeholders, but chunk key 'time' is not configured\"\n          end\n          if sec && timekey && timekey < sec\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have timestamp placeholder for #{title}('#{example}') for timekey #{timekey.to_i}\"\n          end\n        end\n\n        def validate_tag!\n          parts = @argument[:parts]\n          tagkey = @argument[:tagkey]\n          if tagkey && parts.empty?\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have tag placeholder\"\n          end\n          if !tagkey && !parts.empty?\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has tag placeholders, but chunk key 'tag' is not configured\"\n          end\n        end\n\n        def validate_keys!\n          keys = @argument[:keys]\n          chunk_keys = @argument[:chunkkeys]\n          if (chunk_keys - keys).size > 0\n            not_specified = (chunk_keys - keys).sort\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have enough placeholders for keys #{not_specified.join(',')}\"\n          end\n          if (keys - chunk_keys).size > 0\n            not_satisfied = (keys - chunk_keys).sort\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has placeholders, but chunk keys doesn't have keys #{not_satisfied.join(',')}\"\n          end\n        end","sourceCodeStart":729,"sourceCodeEnd":765,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/output.rb#L729-L765","documentation":"The buffer chunks on `tag` (`tag` in chunk keys, so `tagkey` is truthy) but the parameter string contains no `${tag}` or `${tag[N]}` placeholder. All tag-keyed chunks would collapse to the same value, so `validate_tag!` (`tagkey && parts.empty?`) rejects the configuration.","triggerScenarios":"`<buffer tag>` with `path /logs/app.log` in a file output, or a `file`/`s3` `path` lacking `${tag}` while the buffer section chunks on tag; fires for any parameter run through `placeholder_validate!` where tag chunking is on but no tag placeholder appears.","commonSituations":"Adding `tag` to chunk keys to separate logs per tag but forgetting to put `${tag}` in the path; renaming the path to a constant during debugging while keeping tag chunking enabled.","solutions":["Add `${tag}` (or an indexed part like `${tag[0]}`) to the parameter: `path /logs/${tag}/app.log`","Or drop `tag` from the chunk keys if per-tag files are not intended","Use `${tag[1]}`-style parts when only a segment of the dotted tag should form the path"],"exampleFix":"# before\n<buffer tag>\n  @type file\n</buffer>\npath /logs/app.log\n\n# after\n<buffer tag>\n  @type file\n</buffer>\npath /logs/${tag}/app.log","handlingStrategy":"validation","validationCode":"fluentd --dry-run -c /etc/fluent/fluent.conf\n# lint: buffer chunk key 'tag' requires ${tag} (or ${tag[N]}) in the path","typeGuard":null,"tryCatchPattern":null,"preventionTips":["tag chunk key and ${tag} placeholder travel together","Use ${tag[N]} parts when full tags are too deep for paths","Dry-run catches it instantly"],"tags":["fluentd","placeholder","tag","path","configuration"],"backgroundTag":"template-placeholder-mismatch","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}