-
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
[pkg/ottl] Ensure public API allows hierarchical optimizations #29016
Comments
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. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Reopening; This could be a meaningful speed increase and I'd like to determine that we don't want this if we're going to close it. |
I was just looking into this and worked on a PoC of how e.g. the opentelemetry-collector-contrib/processor/transformprocessor/internal/common/config.go Line 36 in 83f1fc6
Here, we could add additional global conditions, one for conditions on the resource, and one for the scope, i.e. something like:
This would then allow users to move statements with the same checks for e.g. specific resource attributes into the same group, and the transform processor, while iterating over e.g. a list of resource logs, could, in case the resource conditions are not fulfilled, immediately continue with the next resource log without iterating over all scopeLogs/logRecords of that resource:
I did some benchmark tests for my PoC, where I compared the performance of having a resource attribute condition in the
So the use of the |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Currently OTTL expects the following statement to be run for each log:
resource.attributes["a"] == "b" and body == "something"
For a group of logs in a resource, if
resource.attributes["a"] == "b"
is false, we do not need to evaluate the condition for the remaining logs, since they all share a resource and all would fail the condition.We need to ensure OTTL's API allows for this kind of optimization without a breaking change.
The text was updated successfully, but these errors were encountered: