-
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
New AdjustedCount converter function #36572
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Created a PR to show how this looks like: #36573 |
@lahsivjar OTTL has access to the If not adding support for this otel feature is appropriate. I wonder tho if a converter or a new path segment is better. We could add to the @evan-bradley what do you think? |
I agree, At a quick glance of the |
I believe it's worth having, and should use pkg/sampling, as the math is slightly tricky. Even if OTTL could do it, this is important to get right. I have a couple of cautions:
|
Agreed on using the pkg/sampling, I initially tried using OTTL expression to do this but in addition to it being complicated to reason/maintain the OTTL expression can get outdated if the spec around sampling evolves.
Introducing this as a path also sounds good to me, and, IIANM, we could still use the pkg/sampling to do this.
How do we deal with this? Are there any concerns about evolving/introducing breaking changes in the OTTL implementation if the spec changes?
ACK, I have planned to work on at least the SamplingProbability as a follow-up but I can also include the SamplingThreshold. Going back to the implementation, should we keep these as converters, or are paths more suitable? I don't have a strong inclination either way but I don't have in-depth knowledge about OTTL grammar -- the points presented in #36572 (comment) sound reasonable to me though. |
I would still like to stick to implementing these as paths. Converters are usually for converting arbitrary input data to some output format. In this case, we're looking to access data on a specific location on the span. |
I have a draft PR for adding |
We support some other get-only paths (metric type), it is ok if we don't implement a set for the path if setting an |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Adjusted count provides a measure of how many spans an individually sampled span represents. It would be nice to have a function in OTTL that could calculate the adjusted count for a span.
Describe the solution you'd like
Add a new
AdjustedCount
converter function. The function will be applicable only for spans (similar to IsRootSpan function). The adjusted count can be calculated by using the sampling pkg, something like:Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: