-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback values for templated fields #1692
Comments
Yep, I think this could potentially fall into a larger "field interpolation macros" project. Ex: a liquid style syntax with support for defaults, truncation, etc. I definitely do not want to explode scope on this issue, but it's worth a quick discussion around that before we implement our own templating syntax. |
Should this support falling back to For example, I'm trying to use: [sinks.s3]
type = "aws_s3"
endpoint = "${AWS_S3_ENDPOINT_URL}"
region = "${AWS_REGION}" But when This could be a corner case. Or maybe this should be handled in the s3 sink. |
We think VRL could be a good fit here if there isn't significant performance overhead. Ref: #17501 |
We saw a lot of errors in vectors because of some labels that are not present on certain containers.
I implemented the workaround with transforms and VRL. But I would prefer a simpler way to just drop the label if it cannot find the key.
|
Related #17487 |
When interpolating event fields, it would be helpful to specify a fallback value for when the specified field is not present.
Some questions to answer before implementing:
The text was updated successfully, but these errors were encountered: