-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[processor/transform] Fix basic config cache access #39290
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
Merged
TylerHelmuth
merged 5 commits into
open-telemetry:main
from
edmocosta:fix-transform-processor-shared-cache
Apr 10, 2025
Merged
[processor/transform] Fix basic config cache access #39290
TylerHelmuth
merged 5 commits into
open-telemetry:main
from
edmocosta:fix-transform-processor-shared-cache
Apr 10, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lector-contrib into fix-transform-processor-shared-cache # Conflicts: # processor/transformprocessor/internal/common/logs.go # processor/transformprocessor/internal/common/metrics.go # processor/transformprocessor/internal/common/processor.go # processor/transformprocessor/internal/common/traces.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edmocosta can you add a new test somewhere, either in the transformprocessor or OTTL's e2e tests, for
log_statements:
- merge_maps(log.cache, ParseJSON(log.body), "upsert") where IsMatch(log.body, "^\\{")
- set(log.body, log.cache["log"])
Hi @TylerHelmuth, thanks for reviewing, I've added a few tests that although are using different statements, does check the exactly same condition. |
TylerHelmuth
approved these changes
Apr 10, 2025
TylerHelmuth
pushed a commit
that referenced
this pull request
Apr 11, 2025
…rom all OTTL contexts (#39338) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR removes the experimental transform context option `WithCache` from all OTTL contexts, since they're not used/needed anymore (see #39290).
akshays-19
pushed a commit
to akshays-19/opentelemetry-collector-contrib
that referenced
this pull request
Apr 23, 2025
…9290) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR removes the shared cache logic we introduced to support Basic Config statements, and changes the approach to group all Basic config statements together into the same sharing-cache `common.ContextStatements`, embracing the limitation of not being able to infer the context depending on the user's statements (similar to the advanced config). To help with that limitation, the context inferrer validation was improved, and it now returns specific errors that better describe why it couldn't infer a valid context. This PR also introduces a **breaking change**, that consists in forcing users to use either basic or advanced configuration, for example, mixed configurations like the following won't be valid anymore, and it will require users to use only one style: ```yaml log_statements: - set(resource.attributes["foo"], "foo") - statements: - set(resource.attributes["bar"], "bar") ``` --- Another PR will be open for removing the `WithCache` option from all OTTL contexts. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#38926 <!--Describe what testing was performed and which tests were added.--> #### Testing Unit tests <!--Describe the documentation added.--> #### Documentation Updated README <!--Please delete paragraphs that you did not use before submitting.-->
akshays-19
pushed a commit
to akshays-19/opentelemetry-collector-contrib
that referenced
this pull request
Apr 23, 2025
…rom all OTTL contexts (open-telemetry#39338) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR removes the experimental transform context option `WithCache` from all OTTL contexts, since they're not used/needed anymore (see open-telemetry#39290).
Fiery-Fenix
pushed a commit
to Fiery-Fenix/opentelemetry-collector-contrib
that referenced
this pull request
Apr 24, 2025
…9290) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR removes the shared cache logic we introduced to support Basic Config statements, and changes the approach to group all Basic config statements together into the same sharing-cache `common.ContextStatements`, embracing the limitation of not being able to infer the context depending on the user's statements (similar to the advanced config). To help with that limitation, the context inferrer validation was improved, and it now returns specific errors that better describe why it couldn't infer a valid context. This PR also introduces a **breaking change**, that consists in forcing users to use either basic or advanced configuration, for example, mixed configurations like the following won't be valid anymore, and it will require users to use only one style: ```yaml log_statements: - set(resource.attributes["foo"], "foo") - statements: - set(resource.attributes["bar"], "bar") ``` --- Another PR will be open for removing the `WithCache` option from all OTTL contexts. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#38926 <!--Describe what testing was performed and which tests were added.--> #### Testing Unit tests <!--Describe the documentation added.--> #### Documentation Updated README <!--Please delete paragraphs that you did not use before submitting.-->
Fiery-Fenix
pushed a commit
to Fiery-Fenix/opentelemetry-collector-contrib
that referenced
this pull request
Apr 24, 2025
…rom all OTTL contexts (open-telemetry#39338) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR removes the experimental transform context option `WithCache` from all OTTL contexts, since they're not used/needed anymore (see open-telemetry#39290).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the shared cache logic we introduced to support Basic Config statements, and changes the approach to group all Basic config statements together into the same sharing-cache
common.ContextStatements
, embracing the limitation of not being able to infer the context depending on the user's statements (similar to the advanced config).To help with that limitation, the context inferrer validation was improved, and it now returns specific errors that better describe why it couldn't infer a valid context.
This PR also introduces a breaking change, that consists in forcing users to use either basic or advanced configuration, for example, mixed configurations like the following won't be valid anymore, and it will require users to use only one style:
Another PR will be open for removing the
WithCache
option from all OTTL contexts.Link to tracking issue
Fixes #38926
Testing
Unit tests
Documentation
Updated README