-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore]: Add Profiles Marshaler to otlptext #11161
[chore]: Add Profiles Marshaler to otlptext #11161
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11161 +/- ##
==========================================
+ Coverage 91.54% 91.58% +0.04%
==========================================
Files 428 429 +1
Lines 20233 20385 +152
==========================================
+ Hits 18522 18670 +148
- Misses 1337 1339 +2
- Partials 374 376 +2 ☔ View full report in Codecov by Sentry. |
I'm looking for some guidance here. This is because sometimes we get the returned value as:
and sometimes like this:
Any suggestions? |
Your failing issue is because maps are not ordered in Go. So when the attribute table is being built with FromRaw, the generated slice doesn't guarantee order. We could possibly ensure order by sorting the keys before injecting in FromRaw. But I'm not sure that's relevant. Maybe figuring out a way to not rely on order of the output would be better? |
The problem is that the test is a simple comparison I've simplified the test to validate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't give any guarantees regarding the debug exporter output, I don't think we need to get it perfect, and this looks good enough to me. Merging!
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is the initial work towards open-telemetry#11155. This PR adds profiles marshalers to `otlptext`, which will be used in the `debugexporter` later on. To continue the work on the `debugexporter` I'd wait on the PR open-telemetry#11131, as it adds some shared components. <!--Describe what testing was performed and which tests were added.--> #### Testing Added `TestProfilesText`, testing the following scenarios: - `empty_profiles` - `two_profiles`
Description
This is the initial work towards #11155.
This PR adds profiles marshalers to
otlptext
, which will be used in thedebugexporter
later on.To continue the work on the
debugexporter
I'd wait on the PR #11131, as it adds some shared components.Testing
Added
TestProfilesText
, testing the following scenarios:empty_profiles
two_profiles