Skip to content

Conversation

@bacherfl
Copy link
Contributor

@bacherfl bacherfl commented Jan 17, 2025

Description

This PR adds the ParseSeverity function, as discussed in the linked ticket. I also had to make a minor change to the
internal mapGetter, handling the map literals to return a raw map[string]any, instead of a pcommon.Map. This is because if there is a map literal within a slice, the pcommon.Slice.FromRaw cannot handle the pcommon.Map, as it only works with raw data types.

This change is however transparent, and the behavior to the outside of this package does not change.
EDIT: After merging main with the support for value expressions, introduced in #36883, this would affect the type of values returned by ParseValueExpression - previously this could potentially return map[string]any/[]any, but with the changes introduced in this PR, this would return a pcommon.Map/pcommon.Slice.
Please let me know if I should do this change in a separate PR though.

Link to tracking issue

Fixes #35079

Testing

Added unit and e2e tests

Documentation

Describe new function in the readme

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]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
@github-actions
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 Feb 18, 2025
@TylerHelmuth
Copy link
Member

@bacherfl is this still draft?

@github-actions github-actions bot removed the Stale label Feb 19, 2025
@github-actions
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 20, 2025
@edmocosta edmocosta removed the Stale label Aug 20, 2025
@github-actions
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 Sep 17, 2025
@bacherfl bacherfl removed the Stale label Sep 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

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 Oct 2, 2025
@bacherfl bacherfl removed the Stale label Oct 2, 2025
@github-actions
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 Oct 17, 2025
@edmocosta edmocosta removed the Stale label Oct 20, 2025
@bacherfl bacherfl marked this pull request as ready for review November 6, 2025 14:00
@bacherfl
Copy link
Contributor Author

bacherfl commented Nov 6, 2025

@edmocosta I have now updated the PR to convert the mapping literal at the time of the function's initialisation, rather than parsing it at each invocation of the function.

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.

[pkg/ottl] ParseSeverity function

8 participants