-
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
Implement an 'InterpolateString' function in the OTTL parser. #35749
Closed
michaelsafyan
wants to merge
8
commits into
open-telemetry:main
from
michaelsafyan:ottl_string_interpolation
Closed
Implement an 'InterpolateString' function in the OTTL parser. #35749
michaelsafyan
wants to merge
8
commits into
open-telemetry:main
from
michaelsafyan:ottl_string_interpolation
Conversation
This file contains 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
michaelsafyan
requested review from
TylerHelmuth,
bogdandrutu,
evan-bradley and
a team
as code owners
October 11, 2024 19:38
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
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
Provide an
InterpolateString
function in the OTTL parser library. This will enable OTTL expressions to be used to construct URIs from patterns that contain OTTL sub-expressions to substitute, allowing pieces of the input signal to be used to be used to derive the URI. This will be helpful for configuring a mechanism to write-aside pieces of a signal.Links to related issues
Testing
This adds integration tests to
e2e_test.go
that verify that this interpolation works. The tests verify that:In addition, this implementation is identical to that being used in the prototype in
blobattributeuploadconnector
, and the end-to-end tests for the connector that makes use of this function additionally verifies correct behavior.Documentation
The function, itself, has comments documenting this function. However, we have not added more documentation beyond that. I think it would be ideal to get this in as-is at this stage and to defer any additional documentation to later, especially given that this library function is not directly invocable by users, and there is not yet evidence that other component authors have any confusion regarding how to use this function (and thus it is not clear what additional docs are needed).