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 ByteSliceLikeGetter interface #33536

Merged
merged 6 commits into from
Jun 21, 2024

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Jun 13, 2024

Description:
Adds ByteSliceLikeGetter interface due to future support of Hex() converter

Link to tracking Issue: #31929

Testing:

Documentation:

odubajDT added 2 commits June 13, 2024 10:57
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT odubajDT force-pushed the add-byteslicelikegetter branch from db581c1 to 3ab6d09 Compare June 13, 2024 08:58
@odubajDT odubajDT marked this pull request as ready for review June 13, 2024 08:59
@odubajDT odubajDT requested a review from a team June 13, 2024 08:59
@odubajDT odubajDT force-pushed the add-byteslicelikegetter branch from 3ab6d09 to e85589e Compare June 13, 2024 09:35
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression_test.go Outdated Show resolved Hide resolved
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
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.

This looks good to me.

pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/expression.go Outdated Show resolved Hide resolved
@evan-bradley
Copy link
Contributor

@TylerHelmuth please take a look.

pkg/ottl/expression.go Outdated Show resolved Hide resolved
pkg/ottl/functions.go Show resolved Hide resolved
@evan-bradley
Copy link
Contributor

@odubajDT Could you look at using encoding/binary.Write to do the translation to []byte? I didn't realize that package existed before, but I think that may be a better way to go.

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@odubajDT
Copy link
Contributor Author

@odubajDT Could you look at using encoding/binary.Write to do the translation to []byte? I didn't realize that package existed before, but I think that may be a better way to go.

Adapted!

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
@evan-bradley evan-bradley merged commit 0bf1a75 into open-telemetry:main Jun 21, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 21, 2024
evan-bradley pushed a commit that referenced this pull request Jul 3, 2024
**Description:** <Describe what has changed.>
Adds a Hex function to the OTTL package. This function can be applied to
following values:

- float64
- string
- bool
- int64
- []byte

The resulting value will be of type []byte.

**Link to tracking Issue:**
#31929

**Testing:**
- unit tests
- e2e tests

Depends on
#33536

---------

Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants