Skip to content
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

Conversation

michaelsafyan
Copy link
Contributor

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:

  • This works with more than one type of OTTL signal / "TransformContext" type
  • This handles reference both to present and absent values in the signal
  • This handles the use of a ":default" suffix to fallback where a property or attribute is missing

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).

@michaelsafyan
Copy link
Contributor Author

@songy23 hope you're doing well! I'm new to contributing to this repo, so pardon if I'm missing some of the process ... roughly what timetable can I expect a review? Is there a possibility of this getting reviewed some time soon?

This is blocking me from upstreaming other parts of #33737 . Thanks!

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 12, 2024
@michaelsafyan michaelsafyan marked this pull request as draft November 21, 2024 16:10
@github-actions github-actions bot removed the Stale label Nov 22, 2024
Copy link
Contributor

github-actions bot commented Dec 7, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 7, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants