-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
A new ottl function/converter to convert telemetry data to its hash value or digest #22725
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This is functionality we should provide an a necessary step towards eventually replacing the attributes processor with OTTL (#18643). I think to start providing a The converter function should take a |
With @bogdandrutu suggestion we should name the function based on its algorithm like If we want to hash only parts of the string we can create a function similar to |
@TylerHelmuth @jpkrohling wanted to confirm, the suggestion was to use to consider using fnv hashing (non-cryptographic) instead of sha1 or sh256? |
I think we could provide functions for all the needed hash functions, but based on the link you provided starting with fnv is in line with collector guidelines, but we should also supply SHA265 options to be compatible with the attributes processor. |
@TylerHelmuth, a new issue has been created #22787 for addressing this comment above #22725 (comment)
I can start working on this issue, i.e work on the following hash functions/converters
and then the new issue created could use these functions. Please let me know your thoughts on this. |
@rnishtala-sumo with the functions merged into OTTL they are ready to be added to the function lists of the dependent components. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Closing as resolved by #22968. These functions are now provided in OTTL's standard set of Converters. @TylerHelmuth I see you removed the stale label a few months ago, please reopen this if you don't feel it has been resolved. |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
A new ottl function/converter when invoked will transform the underlying telemetry data to a hash value or digest.
Hashing is commonly used for
Describe the solution you'd like
The hashing converter/function could be used with the
replace_all_matches
editor like belowThe replace_all_matches function replaces any matching string value with its hash value.
target
is a path expression to apdata.Map
type field. pattern is a string following filepath.Match syntax.sha1
is the hashing function.Each string value in target that matches pattern will get replaced with its hash value. Non-string values are ignored.
We could define two hash functions for the following two algorithms
or with the
set
editor like belowDescribe alternatives you've considered
An alternative to using this could be to use the attributes processor
With the hash action
Additional context
No response
The text was updated successfully, but these errors were encountered: