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

[pkg/ottl] Add Decode function #33942

Merged
merged 40 commits into from
Sep 5, 2024

Conversation

bacherfl
Copy link
Contributor

@bacherfl bacherfl commented Jul 8, 2024

Description: This PR adds a Decode function that accepts a string or byte array, and a encoding name as an input and transforms it to UTF-8

Link to tracking Issue: #32493

Testing: Added unit and e2e tests

Documentation: Added an entry in the readme to describe the new function

bacherfl added 5 commits July 5, 2024 08:09
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
bacherfl added 5 commits July 8, 2024 09:26
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
@bacherfl bacherfl marked this pull request as ready for review July 8, 2024 09:07
@bacherfl bacherfl requested a review from a team July 8, 2024 09:07
bacherfl added 4 commits July 9, 2024 07:24
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. I think if we expand the type coverage a bit more we'll be good to go.

pkg/ottl/ottlfuncs/func_decode_test.go Show resolved Hide resolved
pkg/ottl/ottlfuncs/func_decode.go Show resolved Hide resolved
Signed-off-by: Florian Bacher <[email protected]>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mark base64decode as deprecated and link to decode in this doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point - i added a deprecation notice to the base64decode function

pkg/ottl/ottlfuncs/func_decode.go Show resolved Hide resolved
bacherfl added 5 commits July 23, 2024 08:16
Signed-off-by: Florian Bacher <[email protected]>
# Conflicts:
#	pkg/ottl/go.mod
#	pkg/ottl/go.sum
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
pkg/ottl/ottlfuncs/func_decode.go Outdated Show resolved Hide resolved
pkg/ottl/ottlfuncs/func_decode.go Outdated Show resolved Hide resolved
bacherfl added 3 commits July 30, 2024 08:51
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
@bacherfl
Copy link
Contributor Author

bacherfl commented Aug 6, 2024

@evan-bradley @TylerHelmuth this one should be ready for another review now

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 Aug 24, 2024
@github-actions github-actions bot removed the Stale label Aug 26, 2024
@TylerHelmuth TylerHelmuth merged commit a733b01 into open-telemetry:main Sep 5, 2024
156 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 5, 2024
evan-bradley pushed a commit that referenced this pull request Sep 5, 2024
**Description:**
Follow up to
#33942.
I'd like to share the exact override key strings so that they don't get
out of sync. Maybe this is too much effort, but wanted to discuss

It looks like there is some more reuse between textutils and stanza, but
that could be done in a separate PR.
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this pull request Sep 12, 2024
**Description:** This PR adds a `Decode` function that accepts a string
or byte array, and a encoding name as an input and transforms it to
UTF-8

**Link to tracking Issue:** open-telemetry#32493

**Testing:** Added unit and e2e tests

**Documentation:** Added an entry in the readme to describe the new
function

---------

Signed-off-by: Florian Bacher <[email protected]>
Co-authored-by: Daniel Jaglowski <[email protected]>
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this pull request Sep 12, 2024
**Description:**
Follow up to
open-telemetry#33942.
I'd like to share the exact override key strings so that they don't get
out of sync. Maybe this is too much effort, but wanted to discuss

It looks like there is some more reuse between textutils and stanza, but
that could be done in a separate PR.
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.

4 participants