Improve validation checking/error handling process context C/C++ impl#88
Open
ivoanjo wants to merge 5 commits intoopen-telemetry:mainfrom
Open
Improve validation checking/error handling process context C/C++ impl#88ivoanjo wants to merge 5 commits intoopen-telemetry:mainfrom
ivoanjo wants to merge 5 commits intoopen-telemetry:mainfrom
Conversation
In practice I'm not sure `ftruncate` could fail unless the kernel is already on fire but no reason not to fix the leak anyway.
We were accidentally importing at least one Linux-specific header, which made NOOP not work. To make sure NOOP keeps working, let's move everything it doesn't need inside the ifdef -- this way it'll be very obvious what's being compiled for NOOP and what's not.
Really well-spotted by @jbachorik .
christos68k
approved these changes
Mar 23, 2026
This was just updated in the upstream spec in open-telemetry/opentelemetry-specification@39a0d58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR collects a few more improvements to the process context C/C++ impl:
Motivation:
These came up as we were adding process context support to Datadog's dd-trace-java profiler in DataDog/java-profiler#414 .
Additional Notes:
I've considered if the encoder should follow the design of the decoder and always check the position of the pointer... It'd be a bigger change so I hesitated in going for it.
How to test the change?
The no-op implementation build validates the minimal set of headers is correct; for the other changes the build still passes and the example script works fine.