Skip to content

Conversation

@dmathieu
Copy link
Member

This is the next step towards #13106

It introduces private switchDictionary methods for all profile structs, so their base dictionary can be switched, which is a requirement (and maybe the biggest bit) of merging profiles.

Right now, the private method isn't called yet, because this PR is already very big, and I believe introducing MergeTo should be in another PR.
But the gist is that to merge profiles together, we need to change the base dictionary for the profiles that are being moved before we can merge the two slices of resource profiles into one.

@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Oct 24, 2025
@dmathieu dmathieu marked this pull request as ready for review October 24, 2025 13:57
@dmathieu dmathieu requested review from a team and mx-psi as code owners October 24, 2025 13:57
@dmathieu
Copy link
Member Author

I know this is a quite large PR, but there's a lot of repetition in there (which also can't really be reduced).
I can split this into multiple PRs, but it seemed having lots of small PRs with a private method that's not used didn't make sense.

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 68.26923% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.14%. Comparing base (6f29b34) to head (3f5f61c).

Files with missing lines Patch % Lines
pdata/pprofile/profile.go 60.00% 6 Missing and 6 partials ⚠️
pdata/pprofile/location.go 64.28% 5 Missing and 5 partials ⚠️
pdata/pprofile/sample.go 67.74% 5 Missing and 5 partials ⚠️
pdata/pprofile/function.go 73.91% 3 Missing and 3 partials ⚠️
pdata/pprofile/mapping.go 70.00% 3 Missing and 3 partials ⚠️
pdata/pprofile/keyvalueandunit.go 75.00% 2 Missing and 2 partials ⚠️
pdata/pprofile/line.go 69.23% 2 Missing and 2 partials ⚠️
pdata/pprofile/stack.go 69.23% 2 Missing and 2 partials ⚠️
pdata/pprofile/valuetype.go 75.00% 2 Missing and 2 partials ⚠️
pdata/pprofile/profiles.go 66.66% 1 Missing and 1 partial ⚠️
... and 2 more

❌ Your patch check has failed because the patch coverage (68.26%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14075      +/-   ##
==========================================
- Coverage   92.27%   92.14%   -0.13%     
==========================================
  Files         657      662       +5     
  Lines       41111    41319     +208     
==========================================
+ Hits        37936    38075     +139     
- Misses       2173     2208      +35     
- Partials     1002     1036      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@florianl florianl left a comment

Choose a reason for hiding this comment

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

works fine here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants