Open pkcll opened 1 week ago
Thanks for opening this @pkcll. I agree this is an issue since replace_pattern
and replace_match
both check that the target is a string before working with it.
Could you please sign the CLA?
@evan-bradley
Could you please sign the CLA?
Will do shortly. Let me double check which one should I sign individual CLA or corporate
Fix empty string matching for replace_all_patterns, replace_all_matches OTTL functions
Description
OTTL functions replace_all_patterns, replace_all_matches apply pattern matching on all attribute values including non string types by casting value to string using
value.Str()
method (see here, here) . For non string typesStr()
returns empty string. In case when empty string patterns is used that creates unintended side effect when pattern matching is applied for non string types.Example:
Current behavior:
Expected behavior:
Testing
Added new test case here and here