Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Depends on #9
Add env() support to expressions
To provide support for using environment variables for labeling,
tagging, and routing entries, this commit adds the
env()
functionto expressions.
An example expression:
env("FOO")
.In addition, this commit fixes an issue with the algorithm for parsing
expressions from
ExprString
s where there are paranthesis nested insidethe expression. This issue was made clear by trying to use the
env()
function inside an
ExprString
.This commit also adds the
GetExprEnv
andPutExprEnv
functions whichprovide a way to re-use allocated environment maps. This keeps us from
having to allocate a map for every entry that is rendered as an
expression, which should help improve performance of plugins that
make heavy use of expressions.
Also adds another checkbox to PR templates for adding a changelog entry
Please check that the PR fulfills these requirements