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 string access for span kind #21773

Merged

Conversation

TylerHelmuth
Copy link
Member

Description:
Adds a new access available to ottlspan and ottlspanevent that allows getting and setting the span kind using a string. This accessor is necessary to facilitate #21054, as the current internal/filterspan logic allows filtering span kind based on the string interpretation.

Testing:
Added new tests

Documentation:
Updated ottlspan README with new accessor.

@TylerHelmuth
Copy link
Member Author

/cc @dmitryax bc I had to add a new function to traceutil and it looks like we want to get rid of those eventually.

@github-actions github-actions bot added processor/routing Routing processor processor/transform Transform processor labels May 10, 2023
@jiekun
Copy link
Member

jiekun commented May 12, 2023

cmiiw OTTL user (like tail sampling processor) will benefit from all those new OTTL feature right? I'm trying to be understand that what kind of change will benefit OTTL user component, and what will not :/

Edit: OK so the core idea is to secure that I am writing the correct code for tail sampling processor, allowing it to get the latest update of OTTL (everytime, in the future) :)

@TylerHelmuth
Copy link
Member Author

@jiekun A change like this would be immediately useable by any component that uses OTTL's standard contexts (in Contrib all the components using OTTL use the standard contexts) so the tailsamplingprocessor would get it.

That is in contrast to new functions which a component needs to opt into.

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.

Looks good to me.

@TylerHelmuth TylerHelmuth force-pushed the ottl-path-accessor-for-string-kind branch from 53fad0f to 62c9c72 Compare May 15, 2023 21:39
pkg/ottl/contexts/internal/span.go Outdated Show resolved Hide resolved
pkg/ottl/contexts/internal/span.go Outdated Show resolved Hide resolved
@TylerHelmuth TylerHelmuth merged commit 80961b0 into open-telemetry:main May 18, 2023
@TylerHelmuth TylerHelmuth deleted the ottl-path-accessor-for-string-kind branch May 18, 2023 16:15
@github-actions github-actions bot added this to the next release milestone May 18, 2023
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.

6 participants