procmeta/runtimeinfo: report process.runtime.name and process.runtime.version - #1770
Draft
nsavoire wants to merge 3 commits into
Draft
procmeta/runtimeinfo: report process.runtime.name and process.runtime.version#1770nsavoire wants to merge 3 commits into
nsavoire wants to merge 3 commits into
Conversation
MetaEnricher collects metadata once, when a process is first observed, which is too early for a region published after startup or a runtime whose interpreter attaches later. ResourceEnricher runs on every resynchronization and returns an immutable resource, merged by MergeResources in registration order, later ones winning. No callers yet.
Run the registered ResourceEnrichers at the end of every SynchronizeProcess, once the mapping pass and the interpreter attach are done, and publish the merge of their contributions. Enrichers run without pm.mu held, receive the mappings their WantMapping selected plus a per-process state slot dropped with the processInfo, and the merge is republished only when one reports a change.
Report process.runtime.name and process.runtime.version from the attached interpreter instances, through a new RuntimeInfo() on interpreter.Instance and a second ResourceEnricher. Runtimes resolve late, once an interpreter attaches. A process may host several: prefer the one whose DSO is the process's executable, else the lexicographically smallest, resolved fill-once until the exe changes.
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.
Reports
process.runtime.nameandprocess.runtime.versionper process, derived from theinterpreter instances already attached to it: a new
RuntimeInfo()oninterpreter.Instance, plus aprocmeta.ResourceEnricherthat selects among them and emits the attributes.A process may host several runtimes, so the enricher prefers the one whose DSO is the process's own
executable, falls back to the lexicographically smallest for determinism, and resolves once until the
executable changes. All of that policy lives in the enricher, so no runtime-specific code is added to
the process manager. Relates to #1716.
Draft, since the first two commits add the
procmeta.ResourceEnricherextension point this buildson, which is a separate change.