File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -493,7 +493,12 @@ pub mod linux {
493493 /// Read the process context from the current process.
494494 ///
495495 /// This searches `/proc/self/maps` for an OTEL_CTX mapping and decodes its contents.
496- pub fn read_process_context ( ) -> anyhow:: Result < MappingHeader > {
496+ ///
497+ /// **CAUTION**: Note that the reader implemented in this module, as well as the helper
498+ /// functions it relies on, are specialized for tests (for example, it doesn't check for
499+ /// concurrent writers after reading the header, because we know they can't be). Do not
500+ /// extract or use as it is as a generic Rust OTel process context reader.
501+ fn read_process_context ( ) -> anyhow:: Result < MappingHeader > {
497502 let mapping_addr = find_otel_mapping ( ) ?;
498503 let header_ptr = verify_mapping_at ( mapping_addr) ?;
499504 // Safety: the pointer returned by `verify_mapping_at` points to an initialized header
You can’t perform that action at this time.
0 commit comments