-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
OTTP: Add math expression for logarithm #18076
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@mterhar I imagine this would be a Converter function that would take a number and return a number, so it would still need to be used with Also, do you think it is worth defining the base as a parameter? |
Addresses issue open-telemetry#18076
Thanks for pointing me toward the place to add it. The pattern seemed simple enough to replicate from how Int is implemented, tested, and documented in the readme. |
I looked at some logs with different bases and it does not seem important at this point. If there's a compelling reason to follow a slightly different curve at the expense of double (or more) complexity, then I'll let someone else make the case. |
Addresses issue open-telemetry#18076
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. |
Addresses issue open-telemetry#18076
Addresses issue open-telemetry#18076
* Add Log() to ottlfuncs Addresses issue #18076 * redo the logarithm ottl with the new format * Handle negatives and zero as nil rather than NaN * replace lots of logic with FloatLikeGetter * Updated tests to work with FloatLikeGetter * Update readme with suggestion Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
* Add Log() to ottlfuncs Addresses issue open-telemetry#18076 * redo the logarithm ottl with the new format * Handle negatives and zero as nil rather than NaN * replace lots of logic with FloatLikeGetter * Updated tests to work with FloatLikeGetter * Update readme with suggestion Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
closed via #22014 |
Component(s)
processor/transform
Is your feature request related to a problem? Please describe.
The transform processor has the ability to do a lot of very cool stuff. One thing it can't do is log(duraion). The example has
sum([1, 2, 3, 4])
but that doesn't seem implemented.Describe the solution you'd like
I'd like to see the a
log(x)
function that can be called as a math expression and return the log of the number. This could be combined with rounding down or coercing to integer to make buckets with durations which can then be used for sampling.Describe alternatives you've considered
The existing soution is just to have a bunch of
set() where
statements. To get good resolution out of this, there would need to be a ton more and they don't seem to have an "else" option so it always evaluates all of them even if the 1st or 2nd one is the only one that would be true.Additional context
No response
The text was updated successfully, but these errors were encountered: