Skip to content

[pkg/ottl]: Create ctxprofilecommon for common attribute handling#42107

Merged
edmocosta merged 21 commits into
open-telemetry:mainfrom
florianl:ctxprofilecommon
Sep 30, 2025
Merged

[pkg/ottl]: Create ctxprofilecommon for common attribute handling#42107
edmocosta merged 21 commits into
open-telemetry:mainfrom
florianl:ctxprofilecommon

Conversation

@florianl
Copy link
Copy Markdown
Member

@florianl florianl commented Aug 19, 2025

Description

Most Profiling messages do have some attributes. Create ctxprofilecommon for shared functionality.

Follow up to #41814 (comment)

Link to tracking issue

Fixes

Testing

Documentation

…various profiling sub messages

Most Profiling messages do have some attributes. Create ctxprofilecommon for shared functionality.

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
florianl and others added 2 commits August 20, 2025 14:22
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Copy link
Copy Markdown
Contributor

@edmocosta edmocosta left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!

It seems this PR has introduced more changes than #41814 (comment) suggested, which is fine, but I would recommend keeping it at the minimum for now, and only tackle those two functions that implements the shared profile set attribute logic, so we can focus and move other profiles PRs faster.

Unit tests are also failing, which maybe means we broke some existing behavior.

florianl and others added 2 commits August 20, 2025 16:00
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl
Copy link
Copy Markdown
Member Author

@edmocosta thanks for the feedback. When testing the changes locally, I did skip the e2e tests as I was not aware of them. So having them fail, uncovered already an issue and differences in the attribute handling between ctxprofile and ctxprofilesample.

I managed to fix this now in ctxprofilecommon and so now we can also be sure, that attribute handling is always the same across all profile sub messages.

Comment thread pkg/ottl/contexts/ottlprofile/profile.go Outdated
Comment thread pkg/ottl/contexts/internal/ctxprofilecommon/attributes_test.go
florianl and others added 11 commits August 27, 2025 13:44
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl
Copy link
Copy Markdown
Member Author

Merge conflicts with recent protocol changes are resolved now. Looking for feedback @edmocosta @TylerHelmuth @evan-bradley

Comment thread pkg/ottl/contexts/internal/ctxprofilecommon/attributes_test.go
Comment thread pkg/ottl/contexts/internal/ctxprofilecommon/attributes_test.go Outdated
Comment thread pkg/ottl/contexts/internal/ctxprofilecommon/attributes_test.go
@florianl florianl requested a review from edmocosta September 26, 2025 14:02
@edmocosta edmocosta changed the title [pkg/ottl]: Create ctxprofilecommon for common attribute handling in … [pkg/ottl]: Create ctxprofilecommon for common attribute handling Sep 30, 2025
@edmocosta edmocosta merged commit 4c4f243 into open-telemetry:main Sep 30, 2025
185 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 30, 2025
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