fluent-plugin-s3
fluent-plugin-s3 copied to clipboard
Placeholder replacement order
Describe the bug
Unable to use placeholder values within interpolation expression for path property.
Example: path "#{'eye.test'.sub('.', '/') + '${tag}'.sub('.', '/')}/%Y-%m-%d/" ${tag} = 'his.blahbalh'
results in 'eye/testhis.blahblah' because the ${tag} placeholder replacement doesn't happen until after the outer #{} interpolation has already executed.
To Reproduce
See path value above.
Expected behavior
Shouldn't placeholder replacement happen prior to evaluating the resulting string?
Your Environment
- Fluentd version:
- TD Agent version:
- fluent-plugin-s3 version:
- aws-sdk-s3 version:
- aws-sdk-sqs version:
- Operating system:
- Kernel version:
Your Configuration
<store>
@type s3 #send logs to s3 for longterm storage
s3_bucket fluend-poc
s3_region us-west-2
path "#{'eye.test'.sub('.', '/') + '${tag}'.sub('.', '/')}/%Y-%m-%d/"
<buffer tag,time>
@type file
path /var/log/fluent/s3
timekey 60 #900 # 15 min partition
timekey_wait 1m
timekey_use_utc true # use utc
chunk_limit_size 256m
</buffer>
</store>
Your Error Log
No errors produced
Additional context
No response
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days
This issue was automatically closed because of stale in 30 days