Skip to content

Filter processes before eval libc#313

Merged
jack-berg merged 3 commits intoopen-telemetry:mainfrom
jack-berg:filter-processes-before-eval-libc
Apr 15, 2026
Merged

Filter processes before eval libc#313
jack-berg merged 3 commits intoopen-telemetry:mainfrom
jack-berg:filter-processes-before-eval-libc

Conversation

@jack-berg
Copy link
Copy Markdown
Member

@jack-berg jack-berg commented Apr 9, 2026

Related to #311.

Processes filtered by include/exclude configuration were still triggering libc detection, producing spurious "failed to identify libc" warnings in the injector's stderr output. This PR moves config file reading and allow/deny evaluation ahead of libc detection. To support this reordering, environment variable lookups during config reading are done by reading /proc/self/environ directly rather than via std.posix.getenv, which depends on libc. Filtered processes now exit before libc detection is ever attempted. An integration test verifies that filtered processes produce no injector stderr output.

Fixes #314

@jack-berg jack-berg requested a review from a team as a code owner April 9, 2026 15:14
Comment thread src/proc_self_environ_parser.zig
Copy link
Copy Markdown
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! I think the timing increase is negligible and the code is a lot more readable and easier to understand now.

@jack-berg
Copy link
Copy Markdown
Member Author

Merging will produce merge conflicts with #291 @mmanciop. I'm happy to resolve merge conflicts here or let you resolve them in #291 🙂

@mmanciop
Copy link
Copy Markdown
Contributor

Merging will produce merge conflicts with #291 @mmanciop. I'm happy to resolve merge conflicts here or let you resolve them in #291 🙂

I think we agreed in the channel
to first merge this PR, then 291. I can deal with the merge conflicts on the other one @jack-berg

@jack-berg jack-berg merged commit ad91f02 into open-telemetry:main Apr 15, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parsing log level produces garbage values sometimes

4 participants