You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bifromq.apache.org by po...@apache.org on 2026/09/29 01:20:57 UTC

(bifromq-tenon) branch main updated: Collect plugin process metrics on demand (#11)

This is an automated email from the ASF dual-hosted git repository.

popduke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bifromq-tenon.git


The following commit(s) were added to refs/heads/main by this push:
     new 1aff53c  Collect plugin process metrics on demand (#11)
1aff53c is described below

commit 1aff53caed9be68b448077b1dbd2d8dacae45918
Author: Yonny(Yu) Hao <po...@gmail.com>
AuthorDate: Tue Sep 29 09:20:51 2026 +0800

    Collect plugin process metrics on demand (#11)
    
    * feat(metrics): collect plugin process observations on demand
    
    Add request-driven CPU and RSS collection through the Runner, Pipeline, and plugin SDKs. Keep queue metrics owned by the Pipeline and attribute them to the actual plugin instances.
    
    Provide independent Rust and Java process sampling packages under sdk, update the shared contracts, and keep metric registration ownership private.
    
    Validated with the complete Rust gate, cross-language process tests, and public documentation and license checks.
    
    * refactor(sdk): consolidate language IPC packages and contracts
---
 .github/workflows/ci.yml                           |   4 +-
 .gitignore                                         |   2 -
 CONTRIBUTING.md                                    |   2 +-
 Cargo.lock                                         |  13 +
 Cargo.toml                                         |   6 +-
 README.md                                          |  13 +-
 SECURITY.md                                        |   2 +-
 build.rs                                           |   4 +-
 contracts/core/pipeline_control.proto              |   1 +
 .../core/pipeline_control_field_registry.json      |   5 +-
 contracts/metrics/catalog.json                     |  46 ++-
 .../plugin/process_metrics.proto                   |  23 +-
 contracts/plugin/process_metrics_test_vectors.json |  90 ++++++
 contracts/runner/config.schema.json                |   2 +-
 fuzz/Cargo.toml                                    |   2 +-
 fuzz/fuzz_targets/queue_runtime.rs                 |   4 +-
 guide/lua.md                                       |  21 +-
 guide/observability.md                             |  25 +-
 guide/quickstart.md                                |   2 +-
 ipc/README.md => sdk/ipc_contract.md               |  22 +-
 sdk/java/README.md                                 |  20 +-
 {ipc/java/tenon-ipc => sdk/java/ipc}/NOTICE        |   0
 {ipc/java/tenon-ipc => sdk/java/ipc}/pom.xml       |  17 +-
 .../bifromq/tenon/sdk/ipc/BellInterrupter.java     |   0
 .../apache/bifromq/tenon/sdk/ipc/BellRegion.java   |   0
 .../bifromq/tenon/sdk/ipc/BellRegionException.java |   0
 .../org/apache/bifromq/tenon/sdk/ipc/BellSlot.java |   0
 .../bifromq/tenon/sdk/ipc/BellWaitOutcome.java     |   0
 .../org/apache/bifromq/tenon/sdk/ipc/IpcQueue.java |   0
 .../bifromq/tenon/sdk/ipc/IpcQueueFormat.java      |   0
 .../tenon/sdk/ipc/IpcQueueFormatException.java     |   0
 .../org/apache/bifromq/tenon/sdk/ipc/LoopBell.java |   0
 .../bifromq/tenon/sdk/ipc/PlatformWaiter.java      |   0
 .../tenon/sdk/ipc/platform/LinuxWaiter.java        |   0
 .../tenon/sdk/ipc/platform/MacOsWaiter.java        |   0
 .../tenon/sdk/ipc/platform/WaitBackend.java        |   0
 .../tenon/sdk/ipc/BellRegionContractTest.java      |   0
 .../tenon/sdk/ipc/BellRegionTestSupport.java       |   0
 .../tenon/sdk/ipc/IpcQueueFormatContractTest.java  |   0
 .../tenon/sdk/ipc/IpcQueueRuntimeContractTest.java |   0
 .../bifromq/tenon/sdk/ipc/QueueFixtures.java       |   0
 sdk/java/plugin-sdk/pom.xml                        |  42 ++-
 .../bifromq/tenon/sdk/PluginMetricsConnection.java | 152 ++++++++++
 .../bifromq/tenon/sdk/PluginProcessMetrics.java    | 160 ++++++++++
 .../bifromq/tenon/sdk/PluginProgramRuntime.java    |  10 +-
 .../apache/bifromq/tenon/sdk/version.properties    |  16 +-
 .../tenon/sdk/PluginMetricsConnectionTest.java     | 133 ++++++++
 .../tenon/sdk/PluginProcessMetricsTest.java        |  67 ++++
 sdk/java/pom.xml                                   |  27 +-
 sdk/java/process-metrics/pom.xml                   |  37 +++
 .../bifromq/tenon/metrics/ProcessSampler.java      | 119 ++++++++
 .../bifromq/tenon/metrics/ProcessSamplerTest.java  |  59 ++++
 ...SDK-impl-contract.md => plugin-sdk-contract.md} |  33 +-
 sdk/process-metrics-contract.md                    |  57 ++++
 sdk/rust/Cargo.lock                                | 135 +++++++++
 sdk/rust/Cargo.toml                                |   9 +-
 {ipc/rust/tenon-ipc => sdk/rust/ipc}/Cargo.toml    |   3 +-
 .../rust/ipc}/contracts/bell_v1_test_vectors.json  |   0
 .../rust/ipc}/contracts/queue_v1_test_vectors.json |   0
 .../tenon-ipc => sdk/rust/ipc}/src/bell/mapping.rs |   0
 .../tenon-ipc => sdk/rust/ipc}/src/bell/mod.rs     |   0
 .../rust/ipc}/src/bell/platform/linux.rs           |   0
 .../rust/ipc}/src/bell/platform/macos.rs           |   0
 .../rust/ipc}/src/bell/platform/mod.rs             |   0
 .../tenon-ipc => sdk/rust/ipc}/src/bell/wait.rs    |   0
 {ipc/rust/tenon-ipc => sdk/rust/ipc}/src/lib.rs    |   0
 .../rust/ipc}/src/little_endian.rs                 |   0
 .../rust/ipc}/src/queue/mapped/mod.rs              |   0
 .../rust/ipc}/src/queue/mapped/tests/crash.rs      |   0
 .../tenon-ipc => sdk/rust/ipc}/src/queue/mod.rs    |   1 +
 .../tenon-ipc => sdk/rust/ipc}/tests/benchmark.rs  |   0
 .../rust/ipc}/tests/format_contract.rs             |   2 +
 .../rust/ipc}/tests/reader_batches.rs              |   2 +
 .../rust/ipc}/tests/runtime_contract.rs            |   2 +
 .../rust/ipc}/tests/support/doorbell_queue.rs      |   0
 .../rust/ipc}/tests/support/ipc_queue_model.rs     |   0
 .../rust/ipc}/tests/support/queue_model.rs         |   0
 .../rust/ipc}/tests/support/wait.rs                |   0
 sdk/rust/plugin-sdk/Cargo.toml                     |   4 +
 sdk/rust/plugin-sdk/README.md                      |   4 +
 sdk/rust/plugin-sdk/build.rs                       |  30 +-
 .../plugin-sdk/contracts/process_metrics.proto     |  23 +-
 .../contracts/process_metrics_test_vectors.json    |  90 ++++++
 sdk/rust/plugin-sdk/src/process/metrics.rs         | 247 +++++++++++++++
 sdk/rust/plugin-sdk/src/process/metrics/tests.rs   |  80 +++++
 .../src/process/metrics/tests/connection.rs        | 112 +++++++
 sdk/rust/plugin-sdk/src/process/mod.rs             |  23 +-
 sdk/rust/plugin-sdk/tests/support/process_peer.rs  |  33 ++
 .gitignore => sdk/rust/process-metrics/Cargo.toml  |  29 +-
 .../mod.rs => sdk/rust/process-metrics/src/lib.rs  |  20 +-
 .../rust/process-metrics/src}/linux.rs             |   0
 .../rust/process-metrics/src}/macos.rs             |   4 +-
 .../rust/process-metrics/src}/tests.rs             |   0
 src/metrics/mod.rs                                 |   6 +-
 src/metrics/runtime/mod.rs                         |   2 +-
 src/pipeline/channel/flow_channel/mod.rs           |   4 +-
 src/pipeline/channel/flow_channel/tests/mod.rs     |   1 +
 .../flow_channel/tests/program_contracts.rs        |   1 +
 src/pipeline/channel/flow_channel_spec.rs          |   8 +
 src/pipeline/channel/metrics.rs                    |  16 +-
 src/pipeline/main_loop/mod.rs                      |  13 +-
 src/pipeline/metrics_stream.rs                     |  32 +-
 src/pipeline/metrics_stream/tests.rs               |   8 +-
 src/pipeline/mod.rs                                |   2 +-
 src/pipeline/plugin/contract_test_support.rs       |   1 +
 src/pipeline/plugin/control/server.rs              |  26 ++
 src/pipeline/plugin/controlled_lifecycle/mod.rs    |  10 +-
 .../plugin/controlled_lifecycle/startup.rs         |  10 +
 src/pipeline/plugin/controlled_lifecycle/tests.rs  |   1 +
 src/pipeline/plugin/lifecycle/mod.rs               |  15 +-
 src/pipeline/plugin/lifecycle/tests.rs             |   4 +
 src/pipeline/plugin/metrics.rs                     | 337 +++++++++++++++++++++
 src/pipeline/plugin/metrics/tests.rs               | 284 +++++++++++++++++
 src/pipeline/plugin/mod.rs                         |   2 +
 .../reconfigure/resource_stage/data_plane.rs       |   1 +
 .../reconfigure/resource_stage/instance_launch.rs  |  18 ++
 src/pipeline/runtime/tests/mod.rs                  |   1 +
 src/runner/metrics/mod.rs                          |   6 +-
 src/runner/metrics/stream.rs                       |  11 +-
 src/time/mod.rs                                    |   6 +
 tests/ingress_queue_contract.rs                    |   2 +-
 tests/runner_java_archetype.rs                     |  80 ++++-
 tests/runner_java_archetype/topology.rs            |   1 +
 tools/validate-rust-test-layout.py                 |   3 +-
 tools/verify-rust-scaffold.py                      |  46 ++-
 125 files changed, 2829 insertions(+), 220 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9147b8d..6227155 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -65,12 +65,12 @@ jobs:
         uses: actions/cache@v5
         with:
           path: target/runner-java-archetype/maven-repository
-          key: runner-java-maven-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('sdk/java/**/pom.xml', 'ipc/java/**/pom.xml', 'sdk/java/.mvn/**', 'sdk/java/mvnw') }}
+          key: runner-java-maven-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('sdk/java/**/pom.xml', 'sdk/java/.mvn/**', 'sdk/java/mvnw') }}
       - name: Restore verified Java Plugin bundles
         uses: actions/cache@v5
         with:
           path: target/runner-java-archetype/packages
-          key: runner-java-bundles-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('sdk/java/**', 'ipc/java/**', 'contracts/ipc/**', 'contracts/source/**', 'contracts/sink/**', 'contracts/plugin/**', 'tests/fixtures/java-*/**', 'tests/runner_java_archetype.rs', 'Cargo.toml') }}
+          key: runner-java-bundles-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('sdk/java/**', 'contracts/ipc/**', 'contracts/source/**', 'contracts/sink/**', 'contracts/plugin/**', 'tests/fixtures/java-*/**', 'tests/runner_java_archetype.rs', 'Cargo.toml') }}
       - name: Restore the fixed Rust template generator
         id: cargo-generate
         uses: actions/cache@v5
diff --git a/.gitignore b/.gitignore
index e832860..e60fcf6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,8 +22,6 @@
 /sdk/rust/target/
 /output/
 
-/ipc/java/**/target/
-/ipc/java/**/.flattened-pom.xml
 /sdk/java/**/dependency-reduced-pom.xml
 **/target/
 # This directory contains Runner source, not Cargo build output.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 32a26bc..24c7df0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -67,7 +67,7 @@ Tests cover ordinary errors as well as malformed inputs, closure, cancellation a
 
 ## Plugin contributions
 
-Use the standard [Rust scaffold](sdk/rust/rust-plugin-scaffold/README.md) or [Java archetype](sdk/java/README.md#generate-a-plugin), and package plugins through `cargo tenon bundle` or the Java bundle goal. Validate them through normal Runner installation and lifecycle APIs. For a new language SDK or scaffold, follow the [SDK implementation contract](sdk/SDK-impl-contract.md) and [IPC protocol](ipc/README.md).
+Use the standard [Rust scaffold](sdk/rust/rust-plugin-scaffold/README.md) or [Java archetype](sdk/java/README.md#generate-a-plugin), and package plugins through `cargo tenon bundle` or the Java bundle goal. Validate them through normal Runner installation and lifecycle APIs. For a new language SDK or scaffold, follow the [SDK implementation contract](sdk/plugin-sdk-contract.md) and [IPC protocol](sdk/ipc_contract.md).
 
 ## Licensing
 
diff --git a/Cargo.lock b/Cargo.lock
index 7dffc29..3bebea6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2371,6 +2371,7 @@ dependencies = [
  "tar",
  "tempfile",
  "tenon-ipc",
+ "tenon-process-metrics",
  "tokio",
  "tokio-rustls",
  "tokio-stream",
@@ -2409,6 +2410,9 @@ dependencies = [
  "hyper-util",
  "jsonc-parser",
  "loom",
+ "opentelemetry",
+ "opentelemetry-proto",
+ "opentelemetry_sdk",
  "proptest",
  "prost",
  "prost-build",
@@ -2420,6 +2424,7 @@ dependencies = [
  "sha2",
  "tempfile",
  "tenon-ipc",
+ "tenon-process-metrics",
  "tokio",
  "tokio-stream",
  "tonic",
@@ -2428,6 +2433,14 @@ dependencies = [
  "tower",
 ]
 
+[[package]]
+name = "tenon-process-metrics"
+version = "0.1.0"
+dependencies = [
+ "cpu-time",
+ "libc",
+]
+
 [[package]]
 name = "thiserror"
 version = "2.0.20"
diff --git a/Cargo.toml b/Cargo.toml
index 58ea325..19e0ce0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -89,7 +89,7 @@ name = "runner_extensions"
 required-features = ["repository-test-support"]
 
 [workspace]
-members = [".", "ipc/rust/tenon-ipc", "sdk/rust/plugin-sdk", "plugin/bifromq-tenon-mqtt-plugin", "plugin/bifromq-tenon-dummy-source-plugin", "plugin/bifromq-tenon-stdout-sink-plugin"]
+members = [".", "sdk/rust/ipc", "sdk/rust/plugin-sdk", "sdk/rust/process-metrics", "plugin/bifromq-tenon-mqtt-plugin", "plugin/bifromq-tenon-dummy-source-plugin", "plugin/bifromq-tenon-stdout-sink-plugin"]
 resolver = "3"
 
 [workspace.package]
@@ -104,7 +104,8 @@ publish = false
 debug = "line-tables-only"
 
 [workspace.dependencies]
-tenon-ipc = { path = "ipc/rust/tenon-ipc", version = "=0.1.0" }
+tenon-process-metrics = { path = "sdk/rust/process-metrics", version = "=0.1.0" }
+tenon-ipc = { path = "sdk/rust/ipc", version = "=0.1.0" }
 axum = { version = "=0.8.9", default-features = false, features = ["http1", "json", "query", "tokio"] }
 base64 = { version = "=0.23.0", default-features = false, features = ["std"] }
 bytes = "=1.12.1"
@@ -174,6 +175,7 @@ broken_intra_doc_links = "deny"
 workspace = true
 
 [dependencies]
+tenon-process-metrics.workspace = true
 tenon-ipc.workspace = true
 axum.workspace = true
 base64.workspace = true
diff --git a/README.md b/README.md
index c980150..c8b0c5e 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Tenon's plugin architecture is general-purpose. Source and Sink plugins can conn
 
 See the [incubation disclaimer](DISCLAIMER).
 
-Tenon combines typed plugins with Lua data processing. A standalone Runner manages installed plugin programs and declarative Tenon Documents. Each Document describes a Pipeline; its Flows read from Source instances, transform records in Lua, and write to Sink instances.
+Tenon combines typed plugins with Lua processing based on the [Event-Driven Stateful Transducer](guide/lua.md#event-driven-stateful-transducer) model. A standalone Runner manages installed plugin programs and declarative Tenon Documents. Each Document describes a Pipeline; its Flow Channels react to Source and timer events, maintain private in-memory state, and emit records to Sink instances.
 
 ```text
 Source Plugin → Flow Channel / Lua → Sink Plugin
@@ -34,11 +34,11 @@ Source Plugin → Flow Channel / Lua → Sink Plugin
           processes, packages and diagnostics
 ```
 
-Write plugins in Rust or Java using the SDKs and project scaffolds. Start with the [plugin development guide](guide/plugins.md). Developers adding a language SDK and scaffold should use the [SDK implementation contract](sdk/SDK-impl-contract.md).
+Write plugins in Rust or Java using the SDKs and project scaffolds. Start with the [plugin development guide](guide/plugins.md). Developers adding a language SDK and scaffold should use the [SDK implementation contract](sdk/plugin-sdk-contract.md).
 
 Plugins run in separate processes. A plugin can implement Source, Sink, or both interfaces; both interfaces share one process and configuration when they belong to the same instance.
 
-This repository contains the Runner, IPC implementations, SDKs, plugin generators, and an MQTT plugin.
+This repository contains the Runner, IPC implementations, language SDKs (including reusable process-metrics libraries), plugin generators, and an MQTT plugin.
 
 ## Build and try
 
@@ -58,7 +58,7 @@ Java development uses the Maven wrapper under `sdk/java/` and the exact JDK reco
 
 ## Core concepts
 
-A **Program** is an immutable installed package identified by its name and exact version. An **Instance** is one configured use of that Program. A **Flow** binds one Source instance to Lua and one or more Sink instances. A **Channel** processes records in order; parallel channels have independent Lua state.
+A **Program** is an immutable installed package identified by its name and exact version. An **Instance** is one configured use of that Program. A **Flow** binds one Source instance to Lua and one or more Sink instances. A **Channel** processes Source and timer events serially; parallel channels have independent Lua state.
 
 The Runner saves Documents and installed packages across restarts. Saving a Document and applying it are separate outcomes. Use Pipeline status and its desired/applied ETags to see progress; local `running` status does not prove delivery to an external system.
 
@@ -76,8 +76,9 @@ Management write access grants control over executable workloads. The default Ru
 - [Plugin packaging and development](guide/plugins.md)
 - [Metrics and live diagnostics](guide/observability.md)
 - [Runner extension interfaces](guide/runner-extensions.md)
-- [Developing a language SDK and scaffold](sdk/SDK-impl-contract.md)
-- [IPC protocol for SDK developers](ipc/README.md)
+- [Developing a language SDK and scaffold](sdk/plugin-sdk-contract.md)
+- [IPC protocol for SDK developers](sdk/ipc_contract.md)
+- [Process sampling contract and language implementations](sdk/process-metrics-contract.md)
 - [Contributing and verification](CONTRIBUTING.md)
 
 Machine-readable schemas and shared test vectors live in [contracts/](contracts/). The running binary serves its own API description at `/openapi.json` and its Document Schema at `/document-schema`.
diff --git a/SECURITY.md b/SECURITY.md
index 4ce85d6..b0a7ab1 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -85,7 +85,7 @@ Document validation checks structure and supported semantics; it does not establ
 
 Protect runtime directories from other users. Local process communication does not isolate a plugin from other processes running under the same OS identity.
 
-See [package rules](guide/plugins.md) for installation requirements. SDK developers should also follow the [SDK implementation contract](sdk/SDK-impl-contract.md).
+See [package rules](guide/plugins.md) for installation requirements. SDK developers should also follow the [SDK implementation contract](sdk/plugin-sdk-contract.md).
 
 ## Lua and resource boundaries
 
diff --git a/build.rs b/build.rs
index bac304d..22acf6a 100644
--- a/build.rs
+++ b/build.rs
@@ -25,6 +25,7 @@ const INGRESS_RECORD_PROTO: &str = "contracts/source/ingress_record.proto";
 const EGRESS_RECORD_PROTO: &str = "contracts/sink/egress_record.proto";
 const PIPELINE_CONTROL_PROTO: &str = "contracts/core/pipeline_control.proto";
 const PLUGIN_PROCESS_CONTROL_PROTO: &str = "contracts/plugin/process_control.proto";
+const PLUGIN_PROCESS_METRICS_PROTO: &str = "contracts/plugin/process_metrics.proto";
 
 fn main() -> io::Result<()> {
     println!("cargo:rerun-if-changed=build.rs");
@@ -32,6 +33,7 @@ fn main() -> io::Result<()> {
     println!("cargo:rerun-if-changed={EGRESS_RECORD_PROTO}");
     println!("cargo:rerun-if-changed={PIPELINE_CONTROL_PROTO}");
     println!("cargo:rerun-if-changed={PLUGIN_PROCESS_CONTROL_PROTO}");
+    println!("cargo:rerun-if-changed={PLUGIN_PROCESS_METRICS_PROTO}");
 
     let protoc = protoc_bin_vendored::protoc_bin_path().map_err(io::Error::other)?;
     let out_directory = env::var_os("OUT_DIR")
@@ -61,7 +63,7 @@ fn main() -> io::Result<()> {
     plugin_config.file_descriptor_set_path(out_directory.join("process_control_descriptor.pb"));
     tonic_prost_build::configure().compile_with_config(
         plugin_config,
-        &[PLUGIN_PROCESS_CONTROL_PROTO],
+        &[PLUGIN_PROCESS_CONTROL_PROTO, PLUGIN_PROCESS_METRICS_PROTO],
         &["contracts/plugin"],
     )
 }
diff --git a/contracts/core/pipeline_control.proto b/contracts/core/pipeline_control.proto
index b463949..be68a33 100644
--- a/contracts/core/pipeline_control.proto
+++ b/contracts/core/pipeline_control.proto
@@ -229,6 +229,7 @@ message PipelineMetricsSnapshot {
 
 message RunnerToPipelineMetrics {
   repeated string include = 1;
+  uint64 remaining_timeout_ms = 2;
 }
 
 // Opens a best-effort pull stream independent from correctness and diagnostics.
diff --git a/contracts/core/pipeline_control_field_registry.json b/contracts/core/pipeline_control_field_registry.json
index 754ad3e..2124fe8 100644
--- a/contracts/core/pipeline_control_field_registry.json
+++ b/contracts/core/pipeline_control_field_registry.json
@@ -108,7 +108,7 @@
       "text": 5,
       "truncated": 6,
       "invalid_utf8": 7,
-    "sequence": 8,
+      "sequence": 8,
       "lua_vm_instance_id": 9,
       "kind": 10,
       "phase": 11,
@@ -135,7 +135,8 @@
       "metrics": 1
     },
     "RunnerToPipelineMetrics": {
-      "include": 1
+      "include": 1,
+      "remaining_timeout_ms": 2
     }
   },
   "oneofs": {
diff --git a/contracts/metrics/catalog.json b/contracts/metrics/catalog.json
index 0105788..7c78b93 100644
--- a/contracts/metrics/catalog.json
+++ b/contracts/metrics/catalog.json
@@ -53,6 +53,20 @@
         "tenon.pipeline.id"
       ]
     },
+    {
+      "name": "tenon.plugin.cpu",
+      "owner": "plugin",
+      "kind": "gauge",
+      "unit": "1",
+      "attributes": []
+    },
+    {
+      "name": "tenon.plugin.memory",
+      "owner": "plugin",
+      "kind": "gauge",
+      "unit": "By",
+      "attributes": []
+    },
     {
       "name": "tenon.plugin.state",
       "owner": "pipeline",
@@ -234,7 +248,8 @@
       "attributes": [
         "tenon.flow.id",
         "tenon.channel.index",
-        "tenon.queue.kind"
+        "tenon.queue.kind",
+        "tenon.plugin.instance.id"
       ],
       "attributeValues": {
         "tenon.queue.kind": [
@@ -242,18 +257,7 @@
           "completion",
           "egress"
         ]
-      },
-      "conditionalAttributes": [
-        {
-          "name": "tenon.plugin.instance.id",
-          "when": {
-            "attribute": "tenon.queue.kind",
-            "values": [
-              "egress"
-            ]
-          }
-        }
-      ]
+      }
     },
     {
       "name": "tenon.queue.capacity",
@@ -263,7 +267,8 @@
       "attributes": [
         "tenon.flow.id",
         "tenon.channel.index",
-        "tenon.queue.kind"
+        "tenon.queue.kind",
+        "tenon.plugin.instance.id"
       ],
       "attributeValues": {
         "tenon.queue.kind": [
@@ -271,18 +276,7 @@
           "completion",
           "egress"
         ]
-      },
-      "conditionalAttributes": [
-        {
-          "name": "tenon.plugin.instance.id",
-          "when": {
-            "attribute": "tenon.queue.kind",
-            "values": [
-              "egress"
-            ]
-          }
-        }
-      ]
+      }
     },
     {
       "name": "tenon.flow.waiting",
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java b/contracts/plugin/process_metrics.proto
similarity index 55%
copy from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
copy to contracts/plugin/process_metrics.proto
index 966dd0d..42968d6 100644
--- a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
+++ b/contracts/plugin/process_metrics.proto
@@ -17,12 +17,21 @@
  * under the License.
  */
 
-package org.apache.bifromq.tenon.sdk.ipc;
+syntax = "proto3";
+package tenon.plugin;
+option java_package = "org.apache.bifromq.tenon.contracts.plugin";
+option java_outer_classname = "ProcessMetrics";
 
-/** The normal result of one wait on a doorbell slot. */
-enum BellWaitOutcome {
-  /** A peer rang the slot or the platform reported the comparison failed. */
-  READY,
-  /** The platform interrupted the park. */
-  INTERRUPTED
+// A separate request-driven stream on the private Plugin Control socket.
+service PluginMetrics {
+  rpc Stream(stream PluginToPipelineMetrics) returns (stream PipelineToPluginMetrics);
 }
+message PluginToPipelineMetrics {
+  oneof message {
+    PluginMetricsAttach attach = 1;
+    PluginMetricsSnapshot snapshot = 2;
+  }
+}
+message PluginMetricsAttach { bytes launch_id = 1; }
+message PluginMetricsSnapshot { bytes metrics = 1; }
+message PipelineToPluginMetrics { repeated string include = 1; }
diff --git a/contracts/plugin/process_metrics_test_vectors.json b/contracts/plugin/process_metrics_test_vectors.json
new file mode 100644
index 0000000..4727d39
--- /dev/null
+++ b/contracts/plugin/process_metrics_test_vectors.json
@@ -0,0 +1,90 @@
+{
+  "formatVersion": 1,
+  "valid": [
+    {
+      "name": "attach",
+      "direction": "plugin",
+      "encoded": [
+        10,
+        18,
+        10,
+        16,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15
+      ]
+    },
+    {
+      "name": "emptySnapshot",
+      "direction": "plugin",
+      "encoded": [
+        18,
+        0
+      ]
+    },
+    {
+      "name": "all",
+      "direction": "pipeline",
+      "encoded": []
+    },
+    {
+      "name": "cpu",
+      "direction": "pipeline",
+      "encoded": [
+        10,
+        16,
+        116,
+        101,
+        110,
+        111,
+        110,
+        46,
+        112,
+        108,
+        117,
+        103,
+        105,
+        110,
+        46,
+        99,
+        112,
+        117
+      ]
+    }
+  ],
+  "malformed": [
+    {
+      "name": "truncatedAttachment",
+      "direction": "plugin",
+      "encoded": [
+        10,
+        18,
+        10,
+        16,
+        0
+      ]
+    },
+    {
+      "name": "truncatedFilter",
+      "direction": "pipeline",
+      "encoded": [
+        10,
+        16,
+        0
+      ]
+    }
+  ]
+}
diff --git a/contracts/runner/config.schema.json b/contracts/runner/config.schema.json
index 214c1b8..f3c8c40 100644
--- a/contracts/runner/config.schema.json
+++ b/contracts/runner/config.schema.json
@@ -166,7 +166,7 @@
           "description": "Shared wait budget for one metrics request in milliseconds; omitted value is 2000."
         }
       },
-      "description": "Optional core pull metrics settings. Collection is enabled when omitted; Plugin SDKs are not instrumented."
+      "description": "Optional pull metrics settings for Runner, Pipeline, and Plugin process observations. Collection is enabled when omitted; Plugin SDKs collect CPU and RSS on request."
     }
   }
 }
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 9cc8edd..c53b874 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -30,7 +30,7 @@ members = ["."]
 [dependencies]
 libfuzzer-sys = "=0.4.13"
 tempfile = "=3.27.0"
-tenon-ipc = { path = "../ipc/rust/tenon-ipc" }
+tenon-ipc = { path = "../sdk/rust/ipc" }
 
 [[bin]]
 name = "queue_format"
diff --git a/fuzz/fuzz_targets/queue_runtime.rs b/fuzz/fuzz_targets/queue_runtime.rs
index e1b8932..e007a16 100644
--- a/fuzz/fuzz_targets/queue_runtime.rs
+++ b/fuzz/fuzz_targets/queue_runtime.rs
@@ -21,9 +21,9 @@
 
 use libfuzzer_sys::fuzz_target;
 
-#[path = "../../ipc/rust/tenon-ipc/tests/support/doorbell_queue.rs"]
+#[path = "../../sdk/rust/ipc/tests/support/doorbell_queue.rs"]
 mod doorbell_queue;
-#[path = "../../ipc/rust/tenon-ipc/tests/support/ipc_queue_model.rs"]
+#[path = "../../sdk/rust/ipc/tests/support/ipc_queue_model.rs"]
 mod ipc_queue_model;
 
 fuzz_target!(|input: &[u8]| {
diff --git a/guide/lua.md b/guide/lua.md
index 94b942b..887f4cd 100644
--- a/guide/lua.md
+++ b/guide/lua.md
@@ -23,6 +23,25 @@ Tenon is part of Apache BifroMQ (Incubating). See the [incubation disclaimer](..
 
 A Flow embeds UTF-8 Lua 5.5 source in `process.script` and defines `function main(event)`. ASCII identifiers and normal Lua 5.5 declarations are supported; strings and comments may contain Unicode. `specVersion` selects the language/API contract.
 
+## Event-Driven Stateful Transducer
+
+Tenon Lua uses the **Event-Driven Stateful Transducer** processing model. Each Flow Channel owns a long-lived Lua computation that serially consumes runtime events, updates private in-memory state, and requests zero or more effects. Some effects produce future events for the same channel.
+
+Conceptually, one event is processed as `(state, event) → (next state, effects)`. Scripts update variables and call runtime APIs directly; `main(event)` does not return a state/effect tuple.
+
+| Part | Tenon Lua behavior |
+| --- | --- |
+| Events | Source input and timer expiration enter the same `main(event)`, one event at a time. |
+| State | Custom globals and closure state survive between calls within the same VM. Channels have independent state. |
+| Effects | `emit(payload)` requests output to the Flow's Sinks; `emit()` establishes a completion-only boundary. `setTimeout` schedules or replaces a timer, and `clearTimeout` cancels one. |
+| Future events | A pending timer produces a later timer event in the same VM. Even a zero-delay timer waits for the event loop; it never reenters `main` synchronously. |
+
+Pure filtering and mapping fit this model without keeping application state between events. Stateful scripts can accumulate records, debounce input, or change behavior as events arrive. State and timers are volatile and are recreated when the VM resets. Tenon does not persist Lua execution progress or provide durable Lua state or timers.
+
+Each accepted effect follows its own completion rules. Returning from `main` does not establish a transaction across state changes and outputs; accepted outputs survive a later script failure. See [failed inputs and execution](#failed-inputs-and-execution) and [delivery completion](tenon-document.md#completion-and-delivery).
+
+## Script lifecycle
+
 Each channel runs the script independently. It executes top-level initialization once, then calls `main` for Source and timer events one at a time. Other channels have independent state and can execute concurrently. Static Document validation compiles source without running initialization; actual initialization requires the resolved Source and Sink contracts. After initialization, `main` and the built-in globals are read-only. Custom globals and closure state remain mutable.
 
 ## Events and payloads
@@ -89,7 +108,7 @@ Use `:` for method calls. Receivers must belong to the same exact registry bindi
 
 `emit()` with no arguments produces no Sink record and establishes a completion boundary. `emit(nil)` is an error. Output is allowed only during `main` or its helpers, not at top level. One invocation may emit zero or more times. Each successful emit is accepted in order; permanent record-size rejection happens before acceptance with `egress.record_too_large`. If a Sink cannot accept output yet, the channel waits; other channels continue.
 
-With at-least-once delivery, the first successful emit completes the pending Source group once all matching Sinks report success. A zero-argument emit completes the group without Sink output. Subsequent emits are separate outputs and cannot bypass, extend or roll back the first group's completion. See [delivery semantics](tenon-document.md#completion-and-delivery) and the [SDK contract](../sdk/SDK-impl-contract.md) for terminal outcomes.
+With at-least-once delivery, the first successful emit completes the pending Source group once all matching Sinks report success. A zero-argument emit completes the group without Sink output. Subsequent emits are separate outputs and cannot bypass, extend or roll back the first group's completion. See [delivery semantics](tenon-document.md#completion-and-delivery) and the [SDK contract](../sdk/plugin-sdk-contract.md) for terminal outcomes.
 
 Registry lookup, Builder receiver/argument/type/range errors and timer argument errors are ordinary Lua errors catchable with `pcall`. Resource-limit failures and sandbox violations are not recoverable inside the invalidated VM.
 
diff --git a/guide/observability.md b/guide/observability.md
index ce3c255..92eb254 100644
--- a/guide/observability.md
+++ b/guide/observability.md
@@ -21,12 +21,33 @@ under the License.
 
 Tenon is part of Apache BifroMQ (Incubating). See the [incubation disclaimer](../DISCLAIMER).
 
-The Runner collects core metrics on request through `GET /metrics`. The default representation is Tenon's structured JSON, not OTLP JSON. `?format=prometheus` selects Prometheus text; `?format=json` explicitly selects JSON. The [metric catalog](../contracts/metrics/catalog.json) defines exact names, units, attributes, measurements and temporality. Use the running OpenAPI for filters and response fields.
+The Runner collects Runner, Pipeline and Plugin process metrics on request through `GET /metrics`. The default representation is Tenon's structured JSON, not OTLP JSON. `?format=prometheus` selects Prometheus text; `?format=json` explicitly selects JSON. The [metric catalog](../contracts/metrics/catalog.json) defines exact names, units, attributes, measurements and temporality. Use the running OpenAPI for filters and response fields.
 
-Metrics are cumulative where the catalog says cumulative. Collect metrics periodically with your monitoring system. Tenon does not calculate percentiles. Collection is bounded by the configured metrics deadline; a busy, disconnected or slow Pipeline may be absent. Treat missing data as missing, not zero. Process identity and restarts matter when calculating rates. Filters use raw catalog names rather than exporter-specific renamed forms.
+Metrics are cumulative where the catalog says cumulative. Collect metrics periodically with your monitoring system. Tenon does not calculate percentiles. Collection is bounded by the configured metrics deadline; a busy, disconnected or slow Pipeline or Plugin may be absent. Treat missing data as missing, not zero. Process identity and restarts matter when calculating rates. Filters use raw catalog names rather than exporter-specific renamed forms.
 
 Pipeline and plugin state metrics use the same management state as the HTTP status resources. They do not establish external broker health or successful end-to-end delivery. Optional Runner labels and collection timing are configured once at startup through the [Runner Schema](../contracts/runner/config.schema.json).
 
+## Plugin process metrics
+
+Every Plugin SDK must report its process CPU and RSS through the Runner's `GET /metrics` collection path. The currently available Java and Rust SDKs and their scaffolds implement this requirement. No Plugin author instrumentation, extra collector, or Plugin configuration is required. A Source-and-Sink Program produces one set of process observations.
+
+| Metric | Meaning |
+| --- | --- |
+| `tenon.plugin.cpu` | Logical cores consumed: the increase in own-process user plus kernel CPU time divided by elapsed monotonic time since the previous successful CPU observation. `1` means one busy core; values can exceed `1`. |
+| `tenon.plugin.memory` | Current resident set size (RSS), in bytes. Includes resident shared pages; excludes descendant processes. This is neither heap size nor peak memory. |
+| `tenon.queue.usage` / `tenon.queue.capacity` | Occupied and usable Queue bytes, reported by the Pipeline. Occupancy includes framing, alignment and wrap space, including data not yet released. Divide usage by capacity for utilization. |
+
+```sh
+curl --fail 'http://127.0.0.1:18080/metrics?include=tenon.plugin.cpu,tenon.plugin.memory'
+curl --fail 'http://127.0.0.1:18080/metrics?format=prometheus&include=tenon.queue.usage,tenon.queue.capacity'
+```
+
+Plugin process resources contain `tenon.pipeline.id`, `tenon.plugin.instance.id`, Program name and version, and `service.instance.id` for this process launch. Use the launch identity to distinguish restarts. The first CPU request establishes a baseline and returns no CPU point. Failed samples do not reset the previous successful baseline; reconnecting metrics does not reset it, but restarting the process does. A missing, busy, disconnected or timed-out source remains missing, never zero. [...]
+
+The Pipeline owns all Queue observations. Queue data points include Flow, Channel, Queue kind and `tenon.plugin.instance.id`: the Source Instance for `submission` and `completion`, and the target Sink Instance for `egress`. This association follows the applied runtime binding. Retained Queues keep their Pipeline identity across Plugin restarts. Do not add RSS across processes: shared pages may be counted more than once.
+
+Collection is request-driven, with no periodic sampling or snapshot cache. The Runner asks Pipelines, and Pipelines ask the SDKs through a separate private metrics connection. A slow Plugin may be omitted while the Pipeline and other Plugins still return observations. Metrics do not establish external system health or successful business delivery.
+
 ## Diagnostic streams
 
 Connect to `/pipelines/{id}/diagnostics` with one URL-encoded `target` and `Accept: text/event-stream`:
diff --git a/guide/quickstart.md b/guide/quickstart.md
index cc5b118..d3ee125 100644
--- a/guide/quickstart.md
+++ b/guide/quickstart.md
@@ -40,7 +40,7 @@ cargo generate --path "$tenon_root/sdk/rust/rust-plugin-scaffold" \
 cd hello-tenon
 cargo tenon bundle \
   --config "patch.crates-io.tenon-plugin-sdk.path=\"$tenon_root/sdk/rust/plugin-sdk\"" \
-  --config "patch.crates-io.tenon-ipc.path=\"$tenon_root/ipc/rust/tenon-ipc\"" \
+  --config "patch.crates-io.tenon-ipc.path=\"$tenon_root/sdk/rust/ipc\"" \
   > "$demo_root/bundle.json"
 bundle="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["bundle"])' "$demo_root/bundle.json")"
 ```
diff --git a/ipc/README.md b/sdk/ipc_contract.md
similarity index 88%
rename from ipc/README.md
rename to sdk/ipc_contract.md
index 984bbe2..f4fabc5 100644
--- a/ipc/README.md
+++ b/sdk/ipc_contract.md
@@ -21,7 +21,7 @@ under the License.
 
 Tenon is part of Apache BifroMQ (Incubating). See the [incubation disclaimer](../DISCLAIMER).
 
-Use this reference when implementing IPC for a Tenon Plugin SDK in a new language or maintaining an existing SDK. It specifies Queue v1 and Bell Region v1 file formats, memory ordering, endpoint lifetime and failure behavior required for interoperability. The [SDK implementation contract](../sdk/SDK-impl-contract.md) covers startup, Source/Sink adapters and scaffolding. To develop a plugin with an existing SDK, start with the [plugin development guide](../guide/plugins.md#sdks-and-generators).
+Use this reference when implementing IPC for a Tenon Plugin SDK in a new language or maintaining an existing SDK. It specifies Queue v1 and Bell Region v1 file formats, memory ordering, endpoint lifetime and failure behavior required for interoperability. The [SDK implementation contract](plugin-sdk-contract.md) covers startup, Source/Sink adapters and scaffolding. To develop a plugin with an existing SDK, start with the [plugin development guide](../guide/plugins.md#sdks-and-generators).
 
 A Queue transports bounded, non-overwriting, single-producer/single-consumer (SPSC) framed bytes through a shared memory-mapped file. A Bell is a coalescing notification that asks one waiting loop to recheck its conditions. Queue positions and the caller's local state establish facts; notifications do not.
 
@@ -29,14 +29,14 @@ A Queue transports bounded, non-overwriting, single-producer/single-consumer (SP
 
 | Implementation | Consumers | Distribution |
 | --- | --- | --- |
-| [Rust `tenon-ipc`](rust/tenon-ipc/) | Runner and Rust Plugin SDK | One shared crate, versioned with the SDK. The SDK includes IPC as a transitive dependency. |
-| [Java `tenon-ipc`](java/tenon-ipc/) | Java Plugin SDK | An internal Reactor module. Its production classes are embedded in `tenon-plugin-sdk`; it is not independently installed or deployed. |
+| [Rust `tenon-ipc`](rust/ipc/) | Runner and Rust Plugin SDK | An independently reusable crate, versioned with the SDK. The SDK includes IPC as a transitive dependency. |
+| [Java `tenon-ipc`](java/ipc/) | Java Plugin SDK | An independently reusable Maven artifact, versioned with the SDK. The SDK includes IPC as a transitive dependency. |
 
 IPC owns file validation, frame planning, mappings, atomic positions, reader/writer operations, owned record bytes, and Bell wait/wake. It does not depend on Runner, Pipeline, SDK lifecycle, business Protobuf messages, Lua, or metrics.
 
 The upper layer creates files and assigns exactly one live writer and one live reader per Queue. It also assigns one waiting loop to each Bell slot and owns paths, business encoding, completion policy, shutdown, and resource removal. A loop may own several Queue endpoints, and many peers may ring its slot. Neither the Queue nor the Bell file contains an ownership lock, reference count, or second liveness protocol.
 
-The [SDK implementation contract](../sdk/SDK-impl-contract.md) defines how Source submission, Source completion, and Sink egress use these primitives. IPC itself does not interpret those records.
+The [SDK implementation contract](plugin-sdk-contract.md) defines how Source submission, Source completion, and Sink egress use these primitives. IPC itself does not interpret those records.
 
 ## Queue v1 layout
 
@@ -184,11 +184,11 @@ Queue metrics are upper-layer observations. An observer may hold a weak mapping
 
 ## Build and acceptance
 
-Use the versions pinned by [`rust-toolchain.toml`](../rust-toolchain.toml), the Cargo lockfiles, and the [Java toolchain properties](../sdk/java/.mvn/tenon-toolchain.properties). The Maven wrapper selects the pinned JDK and Maven. Run from the repository root:
+Use the versions pinned by [`rust-toolchain.toml`](../rust-toolchain.toml), the Cargo lockfiles, and the [Java toolchain properties](java/.mvn/tenon-toolchain.properties). The Maven wrapper selects the pinned JDK and Maven. Run from the repository root:
 
 ```sh
 cargo test -p tenon-ipc --all-targets --features repository-test-support --locked -- --test-threads=1
-sdk/java/mvnw --batch-mode --file ipc/java/tenon-ipc/pom.xml verify
+sdk/java/mvnw --batch-mode --file sdk/java/ipc/pom.xml verify
 tools/verify-rust.sh
 python3 tools/verify-ipc-fuzz.py
 ```
@@ -199,17 +199,17 @@ Consume the shared [Queue vectors](../contracts/ipc/queue_v1_test_vectors.json)
 
 | Required proof | Executable evidence |
 | --- | --- |
-| Exact layouts, append/wrap, corrupt input, and stable error codes | Shared vectors; Rust [format tests](rust/tenon-ipc/tests/format_contract.rs); Java [contract tests](java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/) |
-| FIFO, Full/Empty with no mutation, owned copies, prefix release, reopen, and interruption | Rust [runtime tests](rust/tenon-ipc/tests/runtime_contract.rs) and [reader batches](rust/tenon-ipc/tests/reader_batches.rs); Java runtime tests |
+| Exact layouts, append/wrap, corrupt input, and stable error codes | Shared vectors; Rust [format tests](rust/ipc/tests/format_contract.rs); Java [contract tests](java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/) |
+| FIFO, Full/Empty with no mutation, owned copies, prefix release, reopen, and interruption | Rust [runtime tests](rust/ipc/tests/runtime_contract.rs) and [reader batches](rust/ipc/tests/reader_batches.rs); Java runtime tests |
 | Publish before arm, before sleep, or after sleep; local interruption, closure, and notification failure | Rust Bell concurrency models and real native wait/wake tests |
-| Writer failure during header/body/padding/wrap/commit/notification; reader failure during copy/release | Real mappings and child-process `SIGKILL` [tests](rust/tenon-ipc/src/queue/mapped/tests/crash.rs) |
+| Writer failure during header/body/padding/wrap/commit/notification; reader failure during copy/release | Real mappings and child-process `SIGKILL` [tests](rust/ipc/src/queue/mapped/tests/crash.rs) |
 | Rust writer to Java reader and Java writer to Rust reader; lifecycle and recovery | [Runner Java integration tests](../tests/runner_java_archetype.rs), Java SDK lifecycle tests, and Rust SDK process tests |
 | Arbitrary bytes and bounded operation sequences | [Fuzz targets](../fuzz/) and the shared Queue model |
 
-Check packaged artifacts as well as source builds: generate the Rust IPC/SDK archives and build projects from their extracted contents; for Java, use an isolated Maven repository containing the public SDK, Maven Plugin and Archetype. The [CI matrix](../.github/workflows/ci.yml) lists native OS/CPU targets. Run applicable tests on every supported target and record the revision and platform.
+Check packaged artifacts as well as source builds: generate the Rust IPC/SDK archives and build projects from their extracted contents; for Java, use an isolated Maven repository containing IPC, process-metrics, the Plugin SDK, Maven Plugin and Archetype. The [CI matrix](../.github/workflows/ci.yml) lists native OS/CPU targets. Run applicable tests on every supported target and record the revision and platform.
 
 For performance changes, measure throughput, latency, CPU and memory at equivalent acknowledgement boundaries. Include independent-channel stalls; the benchmark is excluded from ordinary correctness runs.
 
 ## Adding a language
 
-Start with `ipc/<language>` and prove this contract using the shared vectors, corruption and crash cases, real wait/wake, and bidirectional interoperability. Next implement lifecycle and Source/Sink adapters under `sdk/<language>/plugin-sdk` using the [SDK contract](../sdk/SDK-impl-contract.md). Then supply source, sink, and source-and-sink project scaffolds, bundle/install validation, and real Runner data-flow and failure tests. Declare official support only after the applicable accepta [...]
+Start with `sdk/<language>/ipc` and prove this contract using the shared vectors, corruption and crash cases, real wait/wake, and bidirectional interoperability. Next implement lifecycle and Source/Sink adapters under `sdk/<language>/plugin-sdk` using the [SDK contract](plugin-sdk-contract.md). Then supply source, sink, and source-and-sink project scaffolds, bundle/install validation, and real Runner data-flow and failure tests. Declare official support only after the applicable acceptan [...]
diff --git a/sdk/java/README.md b/sdk/java/README.md
index 83ed138..1ca1362 100644
--- a/sdk/java/README.md
+++ b/sdk/java/README.md
@@ -21,7 +21,7 @@ under the License.
 
 Tenon is part of Apache BifroMQ (Incubating). See the [incubation disclaimer](../../DISCLAIMER).
 
-Use `tenon-plugin-sdk` to write Source, Sink or combined plugins, `tenon-plugin-archetype` to generate a project, and `tenon-maven-plugin` to package it. The generated README describes the callbacks and files to customize. The [SDK implementation contract](../SDK-impl-contract.md) is for developers adding or maintaining a language SDK.
+Use `tenon-plugin-sdk` to write Source, Sink or combined plugins, `tenon-plugin-archetype` to generate a project, and `tenon-maven-plugin` to package it. The generated README describes the callbacks and files to customize. The [SDK implementation contract](../plugin-sdk-contract.md) is for developers adding or maintaining a language SDK.
 
 ## Build from source
 
@@ -68,13 +68,25 @@ An invalid channel throws `IllegalArgumentException`. A closed session completes
 
 Sink `write` receives a nonempty, ordered, immutable batch and returns `CompletionStage<Void>`. Calls do not overlap, but returned stages can finish out of order. Return promptly and complete the stage successfully only when every record reaches your downstream delivery guarantee. A failed stage terminates the plugin; a restart can replay unacknowledged batches, including partial external effects. Plan for duplicates.
 
+## Combined Programs
+
+A combined Program may be bound as Source only, Sink only, or both. The SDK creates only the sessions represented by the current Flow bindings. Its factory receives `Optional<Ingress<S>>` for the bound Source direction and the actual `Set<FlowChannel>` Sink inputs. `FlowChannel` contains only `flowId` and `channelId`.
+
+Unbound directions do not create workers.
+
+## Built-in process observations
+
+To implement the SDK process-metrics contract, this SDK automatically reports this Plugin process's CPU consumption (`tenon.plugin.cpu`, logical cores) and current RSS (`tenon.plugin.memory`, bytes) when the Runner receives a metrics request. A combined Source-and-Sink owner reports one process. The first CPU observation is absent while its baseline is established; missing observations are never zero. Authors do not add instrumentation or a collector. Lifecycle and Queue operations are i [...]
+
+The SDK depends on the reusable `org.apache.bifromq.tenon:tenon-process-metrics` artifact under `sdk/java/process-metrics` and pins and shades its private OpenTelemetry API, SDK and binary converter. The [process-metrics contract](../process-metrics-contract.md) defines CPU/RSS sampling; the library can also be used independently. It uses a separate gRPC channel with asynchronous callbacks and scheduled stream reconnection; it does not register a global provider or expose OTel types to P [...]
+
 ## Packaging
 
 The generated POM configures `tenon-maven-plugin` to create a standard `.tar.gz` under `target/`. The normal package contains a native launcher and its own fixed Java runtime, so it does not need a system JVM on the Runner host. Build and test the bundle on each target platform you support.
 
 The package contains `manifest.json`, `config.schema.json`, `payload.descriptor.pb`, program dependencies and retained license material. Descriptor generation is a required build output. Runtime distribution notices remain under `runtime/`; preserve them when redistributing. Install through the [normal Runner API](../../guide/plugins.md), not by writing its private state tree.
 
-Set the required `tenon.displayName` and `tenon.description` properties in the generated POM before distributing the plugin. They become the manifest's `displayName` and `description`, which Console displays. Names allow 1-80 Unicode code points on one line; descriptions allow 1-1024 and may contain line breaks. Both require non-whitespace plain text. The bundler validates the complete manifest using the shared Schema and preserves these values without defaults or truncation. See the [pa [...]
+Set the required `tenon.displayName` and `tenon.description` properties in the generated POM before distributing the plugin. They become the manifest's `displayName` and `description`, which Console displays. Names allow 1-80 Unicode code points on one line; descriptions allow 1-1024 and may contain line breaks. Both require non-whitespace plain text. The bundler validates the complete manifest using the shared Schema and preserves these values without defaults or truncation. See the [pa [...]
 
 ## Verification
 
@@ -88,7 +100,3 @@ yourself. The bundler includes either project file when you provide it; it alway
 preserves the third-party runtime's legal files and dependency JARs. Review all
 bundled components before distributing your plugin. Tenon's own Maven artifacts
 carry their Apache LICENSE, NOTICE and incubation DISCLAIMER under META-INF.
-
-## Combined Programs
-
-A combined Program may be bound as Source only, Sink only, or both. The SDK creates only the sessions represented by the current Flow bindings. Its factory receives `Optional<Ingress<S>>` for the bound Source direction and the actual `Set<FlowChannel>` Sink inputs. `FlowChannel` contains only `flowId` and `channelId`.
diff --git a/ipc/java/tenon-ipc/NOTICE b/sdk/java/ipc/NOTICE
similarity index 100%
rename from ipc/java/tenon-ipc/NOTICE
rename to sdk/java/ipc/NOTICE
diff --git a/ipc/java/tenon-ipc/pom.xml b/sdk/java/ipc/pom.xml
similarity index 81%
rename from ipc/java/tenon-ipc/pom.xml
rename to sdk/java/ipc/pom.xml
index 3aaf798..1a32a83 100644
--- a/ipc/java/tenon-ipc/pom.xml
+++ b/sdk/java/ipc/pom.xml
@@ -24,10 +24,9 @@ under the License.
         <groupId>org.apache.bifromq.tenon</groupId>
         <artifactId>tenon-java-build</artifactId>
         <version>0.1.0</version>
-        <relativePath>../../../sdk/java/pom.xml</relativePath>
     </parent>
     <artifactId>tenon-ipc</artifactId>
-    <name>Tenon Internal IPC</name>
+    <name>Tenon IPC</name>
     <dependencies>
         <dependency>
             <groupId>com.google.protobuf</groupId>
@@ -68,20 +67,6 @@ under the License.
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-install-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellInterrupter.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellInterrupter.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellInterrupter.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellInterrupter.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegion.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegion.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegion.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegion.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionException.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionException.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionException.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionException.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellSlot.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellSlot.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellSlot.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellSlot.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
similarity index 100%
copy from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
copy to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueue.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueue.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueue.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueue.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormat.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormat.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormat.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormat.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatException.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatException.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatException.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatException.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/LoopBell.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/LoopBell.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/LoopBell.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/LoopBell.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/PlatformWaiter.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/PlatformWaiter.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/PlatformWaiter.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/PlatformWaiter.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/LinuxWaiter.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/LinuxWaiter.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/LinuxWaiter.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/LinuxWaiter.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/MacOsWaiter.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/MacOsWaiter.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/MacOsWaiter.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/MacOsWaiter.java
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/WaitBackend.java b/sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/WaitBackend.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/WaitBackend.java
rename to sdk/java/ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/platform/WaitBackend.java
diff --git a/ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionContractTest.java b/sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionContractTest.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionContractTest.java
rename to sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionContractTest.java
diff --git a/ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionTestSupport.java b/sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionTestSupport.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionTestSupport.java
rename to sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/BellRegionTestSupport.java
diff --git a/ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatContractTest.java b/sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatContractTest.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatContractTest.java
rename to sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueFormatContractTest.java
diff --git a/ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueRuntimeContractTest.java b/sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueRuntimeContractTest.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueRuntimeContractTest.java
rename to sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/IpcQueueRuntimeContractTest.java
diff --git a/ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/QueueFixtures.java b/sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/QueueFixtures.java
similarity index 100%
rename from ipc/java/tenon-ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/QueueFixtures.java
rename to sdk/java/ipc/src/test/java/org/apache/bifromq/tenon/sdk/ipc/QueueFixtures.java
diff --git a/sdk/java/plugin-sdk/pom.xml b/sdk/java/plugin-sdk/pom.xml
index fcc46ef..64b3cb2 100644
--- a/sdk/java/plugin-sdk/pom.xml
+++ b/sdk/java/plugin-sdk/pom.xml
@@ -33,15 +33,25 @@ under the License.
     <name>Tenon Plugin SDK</name>
 
     <dependencies>
+        <dependency>
+            <groupId>org.apache.bifromq.tenon</groupId>
+            <artifactId>tenon-process-metrics</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-sdk-metrics</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp-common</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.bifromq.tenon</groupId>
             <artifactId>tenon-ipc</artifactId>
-            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.bifromq.tenon</groupId>
             <artifactId>tenon-ipc</artifactId>
-            <version>${project.version}</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
@@ -73,6 +83,12 @@ under the License.
     </dependencies>
 
     <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -80,7 +96,7 @@ under the License.
                 <version>${maven.shade.plugin.version}</version>
                 <executions>
                     <execution>
-                        <id>embed-internal-ipc</id>
+                        <id>embed-internal-runtime</id>
                         <phase>package</phase>
                         <goals>
                             <goal>shade</goal>
@@ -88,20 +104,15 @@ under the License.
                         <configuration>
                             <artifactSet>
                                 <includes>
-                                    <include>org.apache.bifromq.tenon:tenon-ipc</include>
+                                    <include>io.opentelemetry:*</include>
                                 </includes>
                             </artifactSet>
-                            <filters>
-                                <filter>
-                                    <artifact>org.apache.bifromq.tenon:tenon-ipc</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/MANIFEST.MF</exclude>
-                                        <exclude>META-INF/LICENSE</exclude>
-                                        <exclude>META-INF/NOTICE</exclude>
-                                        <exclude>META-INF/DISCLAIMER</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
+                            <relocations>
+                                <relocation>
+                                    <pattern>io.opentelemetry</pattern>
+                                    <shadedPattern>org.apache.bifromq.tenon.sdk.internal.otel</shadedPattern>
+                                </relocation>
+                            </relocations>
                             <createDependencyReducedPom>true</createDependencyReducedPom>
                             <useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
                         </configuration>
@@ -141,6 +152,7 @@ under the License.
                             </sourceDirectories>
                             <includes>
                                 <include>process_control.proto</include>
+                                <include>process_metrics.proto</include>
                                 <include>ingress_record.proto</include>
                                 <include>egress_record.proto</include>
                             </includes>
diff --git a/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnection.java b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnection.java
new file mode 100644
index 0000000..4b90d4c
--- /dev/null
+++ b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnection.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.sdk;
+
+import com.google.protobuf.ByteString;
+import io.grpc.ManagedChannel;
+import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder;
+import io.grpc.netty.shaded.io.netty.channel.ChannelOption;
+import io.grpc.netty.shaded.io.netty.channel.EventLoopGroup;
+import io.grpc.netty.shaded.io.netty.channel.MultiThreadIoEventLoopGroup;
+import io.grpc.netty.shaded.io.netty.channel.nio.NioIoHandler;
+import io.grpc.netty.shaded.io.netty.channel.socket.nio.NioDomainSocketChannel;
+import io.grpc.stub.ClientCallStreamObserver;
+import io.grpc.stub.ClientResponseObserver;
+import java.io.IOException;
+import java.net.UnixDomainSocketAddress;
+import java.nio.file.Path;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.bifromq.tenon.contracts.plugin.PluginMetricsGrpc;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PipelineToPluginMetrics;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PluginMetricsAttach;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PluginMetricsSnapshot;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PluginToPipelineMetrics;
+
+/** A separate gRPC channel owns observation callbacks, reconnects, and collector cleanup. */
+final class PluginMetricsConnection implements AutoCloseable {
+  private final EventLoopGroup eventLoop;
+  private final ManagedChannel channel;
+  private final PluginProcessMetrics collector;
+  private final byte[] launchId;
+  private final AtomicBoolean closed = new AtomicBoolean();
+
+  private PluginMetricsConnection(Path socket, byte[] launchId) {
+    this.launchId = launchId.clone();
+    collector = new PluginProcessMetrics(launchId);
+    eventLoop =
+        new MultiThreadIoEventLoopGroup(
+            1,
+            Thread.ofPlatform()
+                .daemon(true)
+                .name("tenon-plugin-metrics-io-", 0)
+                .uncaughtExceptionHandler((thread, failure) -> collector.report(failure))
+                .factory(),
+            NioIoHandler.newFactory());
+    try {
+      channel =
+          NettyChannelBuilder.forAddress(UnixDomainSocketAddress.of(socket))
+              .overrideAuthority("localhost")
+              .channelType(NioDomainSocketChannel.class, UnixDomainSocketAddress.class)
+              .withOption(ChannelOption.SO_KEEPALIVE, null)
+              .eventLoopGroup(eventLoop)
+              .executor(eventLoop)
+              .maxInboundMessageSize(64 * 1024)
+              .usePlaintext()
+              .build();
+    } catch (RuntimeException | Error failure) {
+      collector.close();
+      eventLoop.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS);
+      throw failure;
+    }
+  }
+
+  static PluginMetricsConnection open(Path socket, byte[] launchId) {
+    var connection = new PluginMetricsConnection(socket, launchId);
+    connection.eventLoop.execute(connection::attach);
+    return connection;
+  }
+
+  private void attach() {
+    if (closed.get()) return;
+    var requests =
+        PluginMetricsGrpc.newStub(channel).stream(
+            new ClientResponseObserver<PluginToPipelineMetrics, PipelineToPluginMetrics>() {
+              private ClientCallStreamObserver<PluginToPipelineMetrics> outbound;
+
+              @Override
+              public void beforeStart(ClientCallStreamObserver<PluginToPipelineMetrics> request) {
+                outbound = request;
+                request.disableAutoRequestWithInitial(1);
+              }
+
+              @Override
+              public void onNext(PipelineToPluginMetrics request) {
+                if (closed.get()) return;
+                try {
+                  byte[] metrics = collector.collect(request.getIncludeList());
+                  if (closed.get()) return;
+                  if (metrics.length > 64 * 1024 - 16)
+                    throw new IOException("Metrics snapshot exceeds limit");
+                  outbound.onNext(
+                      PluginToPipelineMetrics.newBuilder()
+                          .setSnapshot(
+                              PluginMetricsSnapshot.newBuilder()
+                                  .setMetrics(ByteString.copyFrom(metrics)))
+                          .build());
+                  outbound.request(1);
+                } catch (Exception failure) {
+                  collector.report(failure);
+                  outbound.cancel("Metrics collection failed", failure);
+                }
+              }
+
+              @Override
+              public void onError(Throwable failure) {
+                reconnect(failure);
+              }
+
+              @Override
+              public void onCompleted() {
+                reconnect(new IOException("Metrics stream closed"));
+              }
+            });
+    requests.onNext(
+        PluginToPipelineMetrics.newBuilder()
+            .setAttach(PluginMetricsAttach.newBuilder().setLaunchId(ByteString.copyFrom(launchId)))
+            .build());
+  }
+
+  private void reconnect(Throwable failure) {
+    if (closed.get()) return;
+    collector.report(failure);
+    eventLoop.schedule(this::attach, 250, TimeUnit.MILLISECONDS);
+  }
+
+  @Override
+  public void close() {
+    if (!closed.compareAndSet(false, true)) return;
+    channel.shutdownNow();
+    // Cleanup runs after any sampling callback on the same owner. The lifecycle
+    // caller does not wait for the peer, a sample, or a final flush.
+    eventLoop.execute(collector::close);
+    eventLoop.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS);
+  }
+}
diff --git a/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProcessMetrics.java b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProcessMetrics.java
new file mode 100644
index 0000000..35eee01
--- /dev/null
+++ b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProcessMetrics.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.sdk;
+
+import io.opentelemetry.api.common.Attributes;
+import io.opentelemetry.exporter.internal.otlp.metrics.MetricsRequestMarshaler;
+import io.opentelemetry.sdk.common.CompletableResultCode;
+import io.opentelemetry.sdk.metrics.InstrumentType;
+import io.opentelemetry.sdk.metrics.SdkMeterProvider;
+import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
+import io.opentelemetry.sdk.metrics.export.CollectionRegistration;
+import io.opentelemetry.sdk.metrics.export.MetricReader;
+import io.opentelemetry.sdk.resources.Resource;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Base64;
+import java.util.List;
+import org.apache.bifromq.tenon.metrics.ProcessSampler;
+
+/** One private on-demand reader; the metrics event loop owns its sampler. */
+final class PluginProcessMetrics implements AutoCloseable {
+  private final OnDemandReader reader = new OnDemandReader();
+  private final SdkMeterProvider provider;
+  private final ProcessSampler sampler = new ProcessSampler();
+  private long lastDiagnostic;
+  private boolean diagnosed;
+  private List<String> include = List.of();
+
+  PluginProcessMetrics(byte[] launchId) {
+    String sdkVersion = sdkVersion();
+    provider =
+        SdkMeterProvider.builder()
+            .setResource(
+                Resource.create(
+                    Attributes.builder()
+                        .put("service.namespace", "tenon")
+                        .put("service.name", "tenon.plugin")
+                        .put(
+                            "service.instance.id",
+                            Base64.getUrlEncoder().withoutPadding().encodeToString(launchId))
+                        .build()))
+            .registerMetricReader(reader)
+            .build();
+    var meter =
+        provider
+            .meterBuilder("tenon-java-plugin-sdk")
+            .setInstrumentationVersion(sdkVersion)
+            .build();
+    meter
+        .gaugeBuilder("tenon.plugin.cpu")
+        .setUnit("1")
+        .buildWithCallback(
+            observation -> {
+              if (!selected("tenon.plugin.cpu")) return;
+              try {
+                sampler.cpu().ifPresent(observation::record);
+              } catch (IOException failure) {
+                report(failure);
+              }
+            });
+    meter
+        .gaugeBuilder("tenon.plugin.memory")
+        .ofLongs()
+        .setUnit("By")
+        .buildWithCallback(
+            observation -> {
+              if (!selected("tenon.plugin.memory")) return;
+              try {
+                observation.record(ProcessSampler.memory());
+              } catch (IOException failure) {
+                report(failure);
+              }
+            });
+  }
+
+  byte[] collect(List<String> names) throws IOException {
+    include = List.copyOf(names);
+    var data =
+        reader.registration.collectAllMetrics().stream()
+            .filter(metric -> selected(metric.getName()) && !metric.isEmpty())
+            .toList();
+    var bytes = new ByteArrayOutputStream();
+    // ExportMetricsServiceRequest and MetricsData both encode ResourceMetrics in field 1.
+    // This pinned internal converter is shaded with the SDK; no exporter is instantiated.
+    MetricsRequestMarshaler.create(data).writeBinaryTo(bytes);
+    return bytes.toByteArray();
+  }
+
+  private static String sdkVersion() {
+    try (var input = PluginProcessMetrics.class.getResourceAsStream("version.properties")) {
+      if (input == null) throw new IOException("SDK version resource missing");
+      var properties = new java.util.Properties();
+      properties.load(input);
+      String version = properties.getProperty("version");
+      if (version == null || version.isBlank()) throw new IOException("SDK version missing");
+      return version;
+    } catch (IOException failure) {
+      throw new IllegalStateException("SDK version unavailable", failure);
+    }
+  }
+
+  void report(Throwable failure) {
+    long now = System.nanoTime();
+    if (!diagnosed || now - lastDiagnostic >= java.util.concurrent.TimeUnit.SECONDS.toNanos(60)) {
+      diagnosed = true;
+      lastDiagnostic = now;
+      System.err.println("Plugin metrics unavailable: " + failure);
+    }
+  }
+
+  private boolean selected(String name) {
+    return include.isEmpty() || include.contains(name);
+  }
+
+  @Override
+  public void close() {
+    provider.shutdown();
+  }
+
+  private static final class OnDemandReader implements MetricReader {
+    private CollectionRegistration registration;
+
+    @Override
+    public void register(CollectionRegistration value) {
+      registration = value;
+    }
+
+    @Override
+    public AggregationTemporality getAggregationTemporality(InstrumentType type) {
+      return AggregationTemporality.CUMULATIVE;
+    }
+
+    @Override
+    public CompletableResultCode forceFlush() {
+      return CompletableResultCode.ofSuccess();
+    }
+
+    @Override
+    public CompletableResultCode shutdown() {
+      return CompletableResultCode.ofSuccess();
+    }
+  }
+}
diff --git a/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProgramRuntime.java b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProgramRuntime.java
index 7c0aee6..eaf7a50 100644
--- a/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProgramRuntime.java
+++ b/sdk/java/plugin-sdk/src/main/java/org/apache/bifromq/tenon/sdk/PluginProgramRuntime.java
@@ -38,6 +38,7 @@ final class PluginProgramRuntime {
   private final Path workingDirectory;
   private final JsonNode config;
   private final PluginControlConnection control;
+  private PluginMetricsConnection metrics;
   private Phase phase = Phase.ATTACHED;
 
   private PluginProgramRuntime(
@@ -90,7 +91,13 @@ final class PluginProgramRuntime {
         .daemon(true)
         .name("tenon-plugin-owner-lifetime")
         .start(PluginProgramRuntime::watchOwnerLifetime);
-    return new PluginProgramRuntime(startup.workingDirectory(), startup.config(), control);
+    var runtime = new PluginProgramRuntime(startup.workingDirectory(), startup.config(), control);
+    try {
+      runtime.metrics = PluginMetricsConnection.open(startup.controlSocket(), startup.launchId());
+    } catch (RuntimeException | LinkageError failure) {
+      System.err.println("Plugin metrics unavailable: " + failure);
+    }
+    return runtime;
   }
 
   /** Returns the absolute Instance working directory supplied by Pipeline. */
@@ -139,6 +146,7 @@ final class PluginProgramRuntime {
     if (!command.hasShutdown()) {
       throw new IOException("Plugin lifecycle expected Shutdown");
     }
+    if (metrics != null) metrics.close();
     phase = Phase.SHUTTING_DOWN;
   }
 
diff --git a/.gitignore b/sdk/java/plugin-sdk/src/main/resources/org/apache/bifromq/tenon/sdk/version.properties
similarity index 70%
copy from .gitignore
copy to sdk/java/plugin-sdk/src/main/resources/org/apache/bifromq/tenon/sdk/version.properties
index e832860..7c3b46b 100644
--- a/.gitignore
+++ b/sdk/java/plugin-sdk/src/main/resources/org/apache/bifromq/tenon/sdk/version.properties
@@ -15,18 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-.DS_Store
-.idea/
-/target/
-/sdk/java/**/.flattened-pom.xml
-/sdk/rust/target/
-/output/
-
-/ipc/java/**/target/
-/ipc/java/**/.flattened-pom.xml
-/sdk/java/**/dependency-reduced-pom.xml
-**/target/
-# This directory contains Runner source, not Cargo build output.
-!/src/runner/pipeline/target/
-!/src/runner/pipeline/target/**
-__pycache__/
+version=${project.version}
diff --git a/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnectionTest.java b/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnectionTest.java
new file mode 100644
index 0000000..65aee60
--- /dev/null
+++ b/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginMetricsConnectionTest.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.sdk;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
+import io.grpc.netty.shaded.io.netty.channel.ChannelOption;
+import io.grpc.netty.shaded.io.netty.channel.MultiThreadIoEventLoopGroup;
+import io.grpc.netty.shaded.io.netty.channel.nio.NioIoHandler;
+import io.grpc.netty.shaded.io.netty.channel.socket.nio.NioServerDomainSocketChannel;
+import io.grpc.stub.StreamObserver;
+import java.net.UnixDomainSocketAddress;
+import java.nio.file.Path;
+import java.util.Set;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.TimeUnit;
+import org.apache.bifromq.tenon.contracts.plugin.PluginMetricsGrpc;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PipelineToPluginMetrics;
+import org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics.PluginToPipelineMetrics;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+class PluginMetricsConnectionTest {
+  @TempDir Path directory;
+
+  @Test
+  void reconnectKeepsCpuBaselineAndCloseReclaimsThreadsWithoutPeerReply() throws Exception {
+    var socket = directory.resolve("metrics.sock");
+    var eventLoop = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory());
+    var sessions = new ArrayBlockingQueue<Session>(1);
+    var server =
+        NettyServerBuilder.forAddress(UnixDomainSocketAddress.of(socket))
+            .channelType(NioServerDomainSocketChannel.class)
+            .withChildOption(ChannelOption.SO_KEEPALIVE, null)
+            .bossEventLoopGroup(eventLoop)
+            .workerEventLoopGroup(eventLoop)
+            .directExecutor()
+            .addService(
+                new PluginMetricsGrpc.PluginMetricsImplBase() {
+                  @Override
+                  public StreamObserver<PluginToPipelineMetrics> stream(
+                      StreamObserver<PipelineToPluginMetrics> responses) {
+                    var session = new Session(responses, new ArrayBlockingQueue<>(2));
+                    return new StreamObserver<>() {
+                      @Override
+                      public void onNext(PluginToPipelineMetrics value) {
+                        if (value.hasAttach()) assertTrue(sessions.offer(session));
+                        else assertTrue(session.snapshots.offer(value));
+                      }
+
+                      @Override
+                      public void onError(Throwable error) {}
+
+                      @Override
+                      public void onCompleted() {}
+                    };
+                  }
+                })
+            .build()
+            .start();
+    Set<Thread> before = Thread.getAllStackTraces().keySet();
+    var connection = PluginMetricsConnection.open(socket, new byte[16]);
+    try {
+      for (int attempt = 0; attempt < 8; attempt++) {
+        var session = sessions.poll(5, TimeUnit.SECONDS);
+        assertNotNull(session, "SDK must reconnect after the previous stream ends");
+        session.responses.onNext(
+            PipelineToPluginMetrics.newBuilder().addInclude("tenon.plugin.cpu").build());
+        var reply = session.snapshots.poll(5, TimeUnit.SECONDS);
+        assertNotNull(reply);
+        assertTrue(reply.hasSnapshot());
+        assertEquals(
+            attempt == 0,
+            reply.getSnapshot().getMetrics().isEmpty(),
+            "Reconnect retains the CPU baseline");
+        session.responses.onCompleted();
+      }
+      // Disconnect immediately after sending Collect, including the window in
+      // which the worker replaces its completed request future.
+      for (int attempt = 0; attempt < 8; attempt++) {
+        var session = sessions.poll(5, TimeUnit.SECONDS);
+        assertNotNull(session);
+        session.responses.onNext(
+            PipelineToPluginMetrics.newBuilder().addInclude("tenon.plugin.memory").build());
+        session.responses.onCompleted();
+      }
+      assertNotNull(sessions.poll(5, TimeUnit.SECONDS));
+      var owned =
+          Thread.getAllStackTraces().keySet().stream()
+              .filter(
+                  thread ->
+                      !before.contains(thread)
+                          && thread.getName().startsWith("tenon-plugin-metrics"))
+              .toList();
+      assertFalse(owned.isEmpty());
+      connection.close();
+      for (var thread : owned) {
+        thread.join(5000);
+        assertFalse(thread.isAlive(), "Metrics thread must exit without waiting for a peer reply");
+      }
+    } finally {
+      connection.close();
+      server.shutdownNow();
+      assertTrue(server.awaitTermination(5, TimeUnit.SECONDS));
+      eventLoop.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS).sync();
+    }
+  }
+
+  private record Session(
+      StreamObserver<PipelineToPluginMetrics> responses,
+      ArrayBlockingQueue<PluginToPipelineMetrics> snapshots) {}
+}
diff --git a/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginProcessMetricsTest.java b/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginProcessMetricsTest.java
new file mode 100644
index 0000000..ad2472a
--- /dev/null
+++ b/sdk/java/plugin-sdk/src/test/java/org/apache/bifromq/tenon/sdk/PluginProcessMetricsTest.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.sdk;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.List;
+import org.junit.jupiter.api.Test;
+
+class PluginProcessMetricsTest {
+  @Test
+  void sharedMetricsWireVectors() throws Exception {
+    var vectors = PluginProgramTestVectors.load("process_metrics_test_vectors.json");
+    for (String kind : List.of("valid", "malformed")) {
+      for (var vector : vectors.required(kind)) {
+        byte[] encoded = PluginProgramTestVectors.bytes(vector.required("encoded"));
+        org.junit.jupiter.api.function.Executable parse =
+            () -> {
+              byte[] actual =
+                  vector.required("direction").stringValue().equals("plugin")
+                      ? org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics
+                          .PluginToPipelineMetrics.parseFrom(encoded)
+                          .toByteArray()
+                      : org.apache.bifromq.tenon.contracts.plugin.ProcessMetrics
+                          .PipelineToPluginMetrics.parseFrom(encoded)
+                          .toByteArray();
+              org.junit.jupiter.api.Assertions.assertArrayEquals(encoded, actual);
+            };
+        if (kind.equals("malformed"))
+          org.junit.jupiter.api.Assertions.assertThrows(
+              com.google.protobuf.InvalidProtocolBufferException.class, parse);
+        else org.junit.jupiter.api.Assertions.assertDoesNotThrow(parse);
+      }
+    }
+  }
+
+  @Test
+  void samplesOwnProcessAndKeepsFirstCpuMissingUntilItIsRequested() throws Exception {
+    try (var collector = new PluginProcessMetrics(new byte[16])) {
+      assertTrue(collector.collect(List.of("tenon.plugin.memory")).length > 0);
+      assertEquals(0, collector.collect(List.of("tenon.plugin.cpu")).length);
+      assertTrue(collector.collect(List.of("tenon.plugin.cpu")).length > 0);
+      assertEquals(0, collector.collect(List.of("unknown")).length);
+    }
+    try (var restarted = new PluginProcessMetrics(new byte[16])) {
+      assertEquals(0, restarted.collect(List.of("tenon.plugin.cpu")).length);
+    }
+  }
+}
diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml
index 18f81d9..aed78d0 100644
--- a/sdk/java/pom.xml
+++ b/sdk/java/pom.xml
@@ -39,7 +39,8 @@ under the License.
     </licenses>
 
     <modules>
-        <module>../../ipc/java/tenon-ipc</module>
+        <module>ipc</module>
+        <module>process-metrics</module>
         <module>plugin-sdk</module>
         <module>maven-plugin</module>
         <module>plugin-archetype</module>
@@ -53,6 +54,7 @@ under the License.
         <tenon.maven.version>[3.9.16,3.9.17)</tenon.maven.version>
         <protobuf.version>4.36.2</protobuf.version>
         <grpc.version>1.84.0</grpc.version>
+        <opentelemetry.version>1.66.0</opentelemetry.version>
         <protobuf.maven.plugin.version>5.1.9</protobuf.maven.plugin.version>
         <build.helper.maven.plugin.version>3.6.2</build.helper.maven.plugin.version>
         <junit.version>6.1.3</junit.version>
@@ -79,6 +81,22 @@ under the License.
 
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.apache.bifromq.tenon</groupId>
+                <artifactId>tenon-ipc</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.bifromq.tenon</groupId>
+                <artifactId>tenon-ipc</artifactId>
+                <version>${project.version}</version>
+                <classifier>tests</classifier>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.bifromq.tenon</groupId>
+                <artifactId>tenon-process-metrics</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.bifromq.tenon</groupId>
                 <artifactId>tenon-plugin-sdk</artifactId>
@@ -109,6 +127,13 @@ under the License.
                 <artifactId>grpc-stub</artifactId>
                 <version>${grpc.version}</version>
             </dependency>
+            <dependency>
+                <groupId>io.opentelemetry</groupId>
+                <artifactId>opentelemetry-bom</artifactId>
+                <version>${opentelemetry.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
             <dependency>
                 <groupId>org.junit</groupId>
                 <artifactId>junit-bom</artifactId>
diff --git a/sdk/java/process-metrics/pom.xml b/sdk/java/process-metrics/pom.xml
new file mode 100644
index 0000000..9767a00
--- /dev/null
+++ b/sdk/java/process-metrics/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.bifromq.tenon</groupId>
+        <artifactId>tenon-java-build</artifactId>
+        <version>0.1.0</version>
+    </parent>
+    <artifactId>tenon-process-metrics</artifactId>
+    <name>Tenon Process Metrics</name>
+    <dependencies>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/sdk/java/process-metrics/src/main/java/org/apache/bifromq/tenon/metrics/ProcessSampler.java b/sdk/java/process-metrics/src/main/java/org/apache/bifromq/tenon/metrics/ProcessSampler.java
new file mode 100644
index 0000000..19724a7
--- /dev/null
+++ b/sdk/java/process-metrics/src/main/java/org/apache/bifromq/tenon/metrics/ProcessSampler.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.metrics;
+
+import com.sun.management.OperatingSystemMXBean;
+import java.io.IOException;
+import java.lang.foreign.Arena;
+import java.lang.foreign.FunctionDescriptor;
+import java.lang.foreign.Linker;
+import java.lang.foreign.ValueLayout;
+import java.lang.management.ManagementFactory;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.OptionalDouble;
+
+/**
+ * Own-process CPU baseline and current RSS, independent of instrumentation and transport. Call
+ * {@link #cpu()} from one owner; retain this sampler across collection reconnects. No background
+ * work or external resources require closing.
+ */
+public final class ProcessSampler {
+  private final OperatingSystemMXBean process =
+      (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
+  private long previousCpu = -1;
+  private long previousTime;
+
+  /**
+   * Returns consumed CPU cores since the previous successful sample, or empty for the first sample
+   * or a nonpositive elapsed interval. Failed samples retain the baseline.
+   *
+   * @throws IOException if the process CPU counter is unavailable or regresses
+   */
+  public OptionalDouble cpu() throws IOException {
+    long cpu = process.getProcessCpuTime();
+    long now = System.nanoTime();
+    if (cpu < 0 || (previousCpu >= 0 && cpu < previousCpu))
+      throw new IOException("Process CPU unavailable");
+    if (previousCpu >= 0 && now - previousTime <= 0) return OptionalDouble.empty();
+    var value =
+        previousCpu < 0
+            ? OptionalDouble.empty()
+            : OptionalDouble.of((double) (cpu - previousCpu) / (now - previousTime));
+    previousCpu = cpu;
+    previousTime = now;
+    return value;
+  }
+
+  /**
+   * Reads current own-process resident bytes without changing any CPU baseline.
+   *
+   * @throws IOException if the platform, native call, counters, or byte conversion is unavailable
+   */
+  @SuppressWarnings("restricted")
+  public static long memory() throws IOException {
+    try {
+      var linker = Linker.nativeLinker();
+      var symbols = linker.defaultLookup();
+      if (System.getProperty("os.name").equals("Linux")) {
+        var pageSize =
+            linker.downcallHandle(
+                symbols.find("getpagesize").orElseThrow(),
+                FunctionDescriptor.of(ValueLayout.JAVA_INT));
+        int page = (int) pageSize.invokeExact();
+        long pages =
+            Long.parseLong(Files.readString(Path.of("/proc/self/statm")).strip().split("\\s+")[1]);
+        if (page <= 0 || pages < 0) throw new IOException("Invalid RSS counters");
+        return Math.multiplyExact(pages, page);
+      }
+      if (System.getProperty("os.name").equals("Mac OS X")) {
+        int task =
+            symbols
+                .find("mach_task_self_")
+                .orElseThrow()
+                .reinterpret(4)
+                .get(ValueLayout.JAVA_INT, 0);
+        var infoCall =
+            linker.downcallHandle(
+                symbols.find("task_info").orElseThrow(),
+                FunctionDescriptor.of(
+                    ValueLayout.JAVA_INT,
+                    ValueLayout.JAVA_INT,
+                    ValueLayout.JAVA_INT,
+                    ValueLayout.ADDRESS,
+                    ValueLayout.ADDRESS));
+        try (var arena = Arena.ofConfined()) {
+          var info = arena.allocate(48, 8);
+          var count = arena.allocate(ValueLayout.JAVA_INT);
+          count.set(ValueLayout.JAVA_INT, 0, 12);
+          int result = (int) infoCall.invokeExact(task, 20, info, count);
+          if (result != 0 || count.get(ValueLayout.JAVA_INT, 0) != 12)
+            throw new IOException("RSS task_info failed");
+          return info.get(ValueLayout.JAVA_LONG, 8);
+        }
+      }
+      throw new IOException("Unsupported process metrics platform");
+    } catch (IOException failure) {
+      throw failure;
+    } catch (Throwable failure) {
+      throw new IOException("Process RSS unavailable", failure);
+    }
+  }
+}
diff --git a/sdk/java/process-metrics/src/test/java/org/apache/bifromq/tenon/metrics/ProcessSamplerTest.java b/sdk/java/process-metrics/src/test/java/org/apache/bifromq/tenon/metrics/ProcessSamplerTest.java
new file mode 100644
index 0000000..d38c775
--- /dev/null
+++ b/sdk/java/process-metrics/src/test/java/org/apache/bifromq/tenon/metrics/ProcessSamplerTest.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.bifromq.tenon.metrics;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.IOException;
+import java.lang.foreign.Arena;
+import java.lang.foreign.ValueLayout;
+import org.junit.jupiter.api.Test;
+
+class ProcessSamplerTest {
+  @Test
+  void realSamplesKeepCpuBaselineLocalAndReportResidentBytes() throws Exception {
+    var sampler = new ProcessSampler();
+    assertTrue(ProcessSampler.memory() > 0);
+    assertTrue(sampler.cpu().isEmpty());
+    try (var arena = Arena.ofConfined()) {
+      var allocation = arena.allocate(32 * 1024 * 1024);
+      allocation.fill((byte) 1);
+      assertTrue(ProcessSampler.memory() >= allocation.byteSize());
+      assertTrue(sampler.cpu().orElseThrow() >= 0);
+      assertTrue(allocation.get(ValueLayout.JAVA_BYTE, 0) == 1);
+    }
+    assertTrue(new ProcessSampler().cpu().isEmpty());
+  }
+
+  @Test
+  void unsupportedRssPlatformReturnsAnErrorWithoutResettingCpu() throws Exception {
+    var sampler = new ProcessSampler();
+    assertTrue(sampler.cpu().isEmpty());
+    String platform = System.getProperty("os.name");
+    try {
+      System.setProperty("os.name", "Unsupported");
+      assertThrows(IOException.class, ProcessSampler::memory);
+    } finally {
+      System.setProperty("os.name", platform);
+    }
+    assertTrue(sampler.cpu().isPresent());
+  }
+}
diff --git a/sdk/SDK-impl-contract.md b/sdk/plugin-sdk-contract.md
similarity index 81%
rename from sdk/SDK-impl-contract.md
rename to sdk/plugin-sdk-contract.md
index 72f1795..233c446 100644
--- a/sdk/SDK-impl-contract.md
+++ b/sdk/plugin-sdk-contract.md
@@ -17,7 +17,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# Developing a Plugin SDK and scaffold
+# Plugin SDK contract
 
 Tenon is part of Apache BifroMQ (Incubating). See the [incubation disclaimer](../DISCLAIMER).
 
@@ -25,13 +25,13 @@ This reference is for developers adding a language SDK and project scaffold to T
 
 A **Program** is an installed plugin package; an **Instance** is one configured process of that Program. The Runner supervises Pipelines. Each Pipeline contains Flows from one Source through Lua processing to Sinks; each Flow has independently ordered channels.
 
-An SDK provides the plugin author API for startup, Source submission, Sink delivery and shutdown. It handles transport, memory mappings and lifecycle control. Plugin code supplies payloads, manages external clients, and decides when to acknowledge upstream or downstream operations. A combined Program exposes both capabilities through one business object.
+An SDK provides the plugin author API for startup, Source submission, Sink delivery and shutdown. It handles transport, memory mappings, lifecycle control and process metrics. Plugin code supplies payloads, manages external clients, and decides when to acknowledge upstream or downstream operations. A combined Program exposes both capabilities through one business object.
 
-Implement the [IPC protocol](../ipc/README.md) together with the startup, record, completion and lifecycle requirements below. Use the linked machine-readable definitions and test vectors to verify compatibility.
+Use the [IPC contract](ipc_contract.md) for Queue and Bell behavior and the [process-metrics contract](process-metrics-contract.md) for CPU/RSS sampling. Language implementations provide reusable libraries; the Plugin SDK combines them with its language OpenTelemetry SDK and implements the startup, record, completion, lifecycle and metrics transport requirements below. Use the linked machine-readable definitions and test vectors to verify compatibility.
 
 ## 1. Common consistency rules
 
-Every SDK must implement the same language-neutral facts: startup material; Plugin Control Protobuf messages and lifecycle; Queue v1 file, frame, append, wait, commit, and release semantics; Source ingress records, completions, acknowledgement codes, and admission credit; Sink egress records, batches, and shared release; combined-owner lifecycle; and failure, recovery, and process-exit boundaries.
+Every SDK must implement the same language-neutral facts: startup material; Plugin Control Protobuf messages and lifecycle; Queue v1 file, frame, append, wait, commit, and release semantics; Source ingress records, completions, acknowledgement codes, and admission credit; Sink egress records, batches, and shared release; combined-owner lifecycle; process CPU/RSS collection; and failure, recovery, and process-exit boundaries.
 
 Each fact has one machine-readable source. SDKs must consume shared protocol definitions, field registries, schemas, and test vectors. They must not maintain independently editable copies.
 
@@ -43,6 +43,7 @@ The machine-readable sources are:
 | --- | --- |
 | Program manifest and payload declarations | [manifest Schema](../contracts/plugin/manifest.schema.json), [manifest vectors](../contracts/plugin/manifest.test-vectors.json), [payload contract vectors](../contracts/plugin/payload_contract_test_vectors.json) |
 | Launch arguments and stdin | [process protocol vectors](../contracts/plugin/process_protocol_test_vectors.json) |
+| Process metrics | [metrics Protobuf](../contracts/plugin/process_metrics.proto), [metrics vectors](../contracts/plugin/process_metrics_test_vectors.json), [metric catalog](../contracts/metrics/catalog.json) |
 | Lifecycle messages, field ownership, and phase validation | [control Protobuf](../contracts/plugin/process_control.proto), [field registry](../contracts/plugin/process_control_field_registry.json), [control vectors](../contracts/plugin/process_control_test_vectors.json) |
 | Source record and Completion encoding | [Ingress Protobuf](../contracts/source/ingress_record.proto), [record vectors](../contracts/source/ingress_record_test_vectors.json), [Source payload vectors](../contracts/source/payload_contract_test_vectors.json) |
 | Sink record and payload decoding | [Egress Protobuf](../contracts/sink/egress_record.proto), [record vectors](../contracts/sink/egress_record_test_vectors.json), [payload vectors](../contracts/sink/payload_contract_test_vectors.json), [decode vectors](../contracts/sink/payload_decode_test_vectors.json) |
@@ -55,7 +56,7 @@ An SDK distribution's packaging tool must produce a complete, installable Plugin
 
 The author must explicitly supply `displayName` and `description` in the project's packaging configuration. The display name is single-line plain text of 1-80 Unicode code points; the description is plain text of 1-1024 code points and permits LF/CR line breaks. Both require non-whitespace content. The shared Schema owns exact whitespace and control-character rules. Count Unicode code points, not UTF-8 bytes or UTF-16 code units. Preserve values without trimming, normalization, truncatio [...]
 
-Rust's `cargo-tenon` reads `display-name` and `description` from `[package.metadata.tenon]`; Java's Maven plugin accepts `displayName` and `description` parameters through `tenon.displayName` and `tenon.description`. Both write the same camelCase manifest fields. A packaged tool must carry the canonical Schema from its build, not load a Runner's private implementation or require the author's source checkout at execution time. Schema resources must be copied or linked from the canonical c [...]
+The currently available Rust packaging tool, `cargo-tenon`, reads `display-name` and `description` from `[package.metadata.tenon]`; the currently available Java Maven plugin accepts `displayName` and `description` parameters through `tenon.displayName` and `tenon.description`. Both write the same camelCase manifest fields. A packaged tool must carry the canonical Schema from its build, not load a Runner's private implementation or require the author's source checkout at execution time. S [...]
 
 The metadata describes one immutable Program version. It does not change Program identity, interface capability, launch arguments, Instance configuration, or payload definitions. Platform variants of the same version must contain identical display metadata. Rebuilding an installed identity with changed metadata remains a content conflict. This contract requires both fields; no legacy manifest defaults or aliases are defined.
 
@@ -214,9 +215,9 @@ Source unfinished requests are bounded by Queue capacity and admission credit. S
 
 ## 7. Interoperability and release acceptance
 
-Add a language in this order: implement `ipc/<language>`; implement lifecycle and Source/Sink adapters in `sdk/<language>/plugin-sdk`; provide that language's project scaffold; prove bundle creation, installation, and real Runner data flow. IPC format, runtime, crash, and bidirectional interoperability tests precede the SDK's Source, Sink, and combined-owner lifecycle proof. Official support requires applicable native acceptance on every declared target.
+Add a language in this order: implement IPC under `sdk/<language>/ipc` and process sampling under `sdk/<language>/process-metrics`; implement lifecycle, process metrics and Source/Sink adapters in `sdk/<language>/plugin-sdk`; provide that language's project scaffold; prove bundle creation, installation, and real Runner data flow. IPC format, runtime, crash, and bidirectional interoperability tests precede the SDK's Source, Sink, and combined-owner lifecycle proof. Official support requir [...]
 
-Rust Runner and SDK use the same [IPC crate](../ipc/rust/tenon-ipc/). The [Java internal IPC module](../ipc/java/tenon-ipc/) is embedded in the sole author SDK. Java's public artifacts remain `tenon-plugin-sdk`, `tenon-maven-plugin`, and `tenon-plugin-archetype`; Plugin authors do not select an IPC artifact or separate Source/Sink SDKs. Test fixtures must not enter the production SDK JAR or its published dependency POM.
+In the currently available implementations, Runner and the Rust SDK use the same [IPC crate](rust/ipc/). Both [Java IPC](java/ipc/) and process-metrics are independent dependencies of the Java Plugin SDK; the Rust libraries use the same dependency model. Java's public artifacts are `tenon-ipc`, `tenon-process-metrics`, `tenon-plugin-sdk`, `tenon-maven-plugin`, and `tenon-plugin-archetype`. Plugin authors depend on the Plugin SDK; IPC and process-metrics resolve transitively. Test fixture [...]
 
 Before claiming an interface, an SDK must use the shared contracts and vectors; keep protocol, Queue, and test-only exports out of the ordinary author API; test normal, backpressure, oversize, invalid-phase, Queue-failure, owner-loss, cancellation, and shutdown paths; interoperate with another language through real Queue and UDS/gRPC communication; exercise real processes for Attach, Ready, data exchange, Completion/shared release, quiesce, Shutdown, stream loss, stdin EOF, and force kil [...]
 
@@ -240,3 +241,21 @@ Generate `source`, `sink` and `source-and-sink` projects that depend only on the
 Self-contained Java bundles include the pinned Temurin runtime and required transport/dependencies and run without a system JVM. The public SDK remains an OS/CPU-independent JAR. Generated bundles declare their exact platform and preserve the same configuration Schema, normalized descriptor, and business JAR across targets. Descriptor normalization sorts the outer FileDescriptorSet files by name only; message, field, dependency, and source-info order within each file remains intact. Inst [...]
 
 Run applicable checks on Linux amd64/arm64 and macOS amd64/arm64, with macOS 14.4 or newer; see the [native CI matrix](../.github/workflows/ci.yml). Cover both languages as Queue writer and reader, data and space wakeups, delayed and failed Sink completion, replay, Source quiesce with active Sink work, malformed lifecycle phases, stdin EOF, control-stream loss and forced termination. Record the tested revision and native target.
+
+## Process metrics
+
+This section owns SDK runtime collection semantics. The author interfaces and startup fields remain unchanged. Every SDK must implement these process metrics; there is no custom instrument facade, global provider, periodic reader, exporter, or compatibility negotiation.
+
+The [Plugin metrics protocol](../contracts/plugin/process_metrics.proto) runs as an independent bidirectional gRPC stream on the existing `controlSocket`, through a separate client channel. The SDK first sends `Attach` with the exact 16-byte `launchId`. Pipeline accepts at most one metrics stream per registered live launch. Lifecycle control, stdin lifetime, and business Queues never carry metrics. Metrics attachment cannot delay Ready.
+
+After Attach the SDK waits for `Collect` (`PipelineToPluginMetrics`). Empty `include` selects both built-in metrics; otherwise only exact catalog names are selected. Each request produces one `Snapshot`, containing standard OpenTelemetry `MetricsData` protobuf bytes. An empty snapshot is valid. Do not send unsolicited samples, request identifiers, chunks, heartbeats, or a final flush. The whole gRPC message is limited to 65,536 bytes. Shared byte vectors are in [process_metrics_test_vect [...]
+
+Each process owns one private provider, on-demand cumulative reader, and sampler from its language implementation of [process-metrics](process-metrics-contract.md). That module owns CPU/RSS semantics, OS calls and sampling errors; the SDK owns filtering, diagnostics, OpenTelemetry conversion and transport. Source, Sink, and combined Programs use the same sampler implementation. Filtering out CPU must not invoke its sampler or advance its baseline. Reconnecting metrics retains the sampler [...]
+
+The fixed catalog defines `tenon.plugin.cpu` (double Gauge, `1`) and `tenon.plugin.memory` (integer Gauge, `By`), with no point attributes. SDK resources have exactly `service.namespace=tenon`, `service.name=tenon.plugin`, and `service.instance.id` equal to URL-safe unpadded Base64 of the launch ID. Instrumentation scope must contain a nonempty name identifying the SDK implementation and its nonempty release version, with no scope attributes. The host must not restrict valid scope names  [...]
+
+Runner sends its remaining request budget in `RunnerToPipelineMetrics.remaining_timeout_ms`. Pipeline starts one child deadline at receipt using half that budget, collects local observations, and requests idle Plugin streams concurrently. Plugin-only filters still route through Pipeline; Queue-only filters do not contact SDKs. Busy or absent sources are omitted. Timeout, cancellation, malformed data, or disconnect closes the affected metrics stream; a late response cannot satisfy a later [...]
+
+The actual child owner retains the metrics registration until exit or retirement. Launch removal closes idle and in-flight metrics streams. The SDK reconnects with a bounded 250 ms delay without rebuilding its sampler. Normal Shutdown cancels metrics without waiting for a peer response; owner loss or forced process exit also stops collection. Auxiliary tasks and threads must be reclaimable and must not extend business drain or exit deadlines. Initialization, connection, sampling and enco [...]
+
+An SDK must keep instrumentation dependencies private, must not register a global provider or expose OTel types through author methods, and must keep IPC primitives independent of metrics. Its scaffold must generate Plugins that include this behavior without author instrumentation. The currently available Java and Rust SDKs implement this contract; their implementation and packaging details belong to their SDK documentation. Validate every SDK and rebuild affected Plugin bundles together [...]
diff --git a/sdk/process-metrics-contract.md b/sdk/process-metrics-contract.md
new file mode 100644
index 0000000..62006eb
--- /dev/null
+++ b/sdk/process-metrics-contract.md
@@ -0,0 +1,57 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Tenon process metrics
+
+This module owns process CPU and resident-memory sampling semantics across languages. Implementations live in `sdk/rust/process-metrics` and `sdk/java/process-metrics` and are packaged as independent, reusable language libraries. Runtime callers and Plugin SDKs use these implementations without depending on each other. An additional language must implement the same semantics in its own language directory.
+
+The module has no OpenTelemetry dependency, instrument names, process identity labels, transport, logging, background work, or global state. The caller owns the sampler and decides when to request a value, report a failure, and publish an observation through its language's OpenTelemetry SDK.
+
+## Common sampling contract
+
+CPU is the increase in the calling process's cumulative user plus system CPU time divided by monotonic elapsed time between two successful requested samples. The result is consumed logical CPU cores: `1.0` means one fully occupied core, and values above `1.0` are valid. Do not normalize by the machine's core count or substitute a host-wide CPU percentage. Child processes are excluded.
+
+Each sampler owns one previous successful CPU sample. The first request establishes that baseline and returns no CPU value. A sampling failure or nonpositive elapsed interval returns no observation and preserves the baseline. Not calling CPU sampling does not advance it. Reuse the same sampler across collection reconnects; a new process or new sampler starts with no baseline. Calls to a sampler must be serialized by its owner; the module creates no worker or synchronization task.
+
+Memory is current own-process RSS in bytes. It includes resident native and managed allocations, code, stacks, and mapped/shared resident pages. It is neither managed-heap usage, virtual address space, peak RSS, unique physical memory, nor a process-tree total. Shared pages may occur in more than one process's RSS, so adding these values does not measure unique host memory. Memory sampling is independent of the CPU baseline.
+
+| Platform | RSS implementation and limits |
+| --- | --- |
+| Linux | Read the resident page count in `/proc/self/statm` and multiply by the OS page size using checked arithmetic. The kernel counters are approximate. Do not scan `smaps`, mappings, or process memory. |
+| macOS | Call `task_info` for the current task with `MACH_TASK_BASIC_INFO` and use `resident_size`. Validate the call result and structure count. |
+
+These are on-demand reads of existing process counters. They do not walk children, scan application allocations, or trigger garbage collection. System calls and scheduling still have a cost; no fixed latency or atomic snapshot of CPU and memory is promised. Unsupported platforms, failed calls, invalid counters, and byte-conversion failures remain errors, never a zero observation. Callers must isolate these errors from business processing.
+
+## Rust implementation
+
+`tenon_process_metrics::ProcessSampler::cpu(&mut self)` returns `io::Result<Option<f64>>`. `None` means no CPU observation; `Err` means sampling failed. The `cpu-time` crate reads own-process CPU time; `std::time::Instant` measures elapsed time. `tenon_process_metrics::memory()` returns `io::Result<u64>` without changing any CPU baseline.
+
+The `tenon-process-metrics` crate is shared by Tenon core and the Rust Plugin SDK and can be consumed independently through Cargo. It uses OS primitives and has no dependency on the Runner, Plugin SDK, IPC, or OpenTelemetry crates.
+
+## Java implementation
+
+`org.apache.bifromq.tenon.metrics.ProcessSampler.cpu()` returns `OptionalDouble` and throws `IOException` on sampling failure. An empty result means no CPU observation. `OperatingSystemMXBean.getProcessCpuTime()` supplies own-process CPU nanoseconds, and `System.nanoTime()` measures elapsed nanoseconds. An unavailable or regressing CPU counter is an error and preserves the previous baseline.
+
+`ProcessSampler.memory()` returns a `long` byte count or throws `IOException`, independently of any sampler. It uses JDK Foreign Function and Memory calls for native page size and macOS task information, and the JDK file API for Linux `statm`. Launch with `--enable-native-access=ALL-UNNAMED`. The pinned repository JDK supplies these APIs; no JNI library or native worker is required.
+
+The Java artifact `org.apache.bifromq.tenon:tenon-process-metrics` has no runtime dependencies beyond the JDK. It is installed and deployed independently, with a consumer POM that does not depend on the repository build parent. The Plugin SDK declares it as a normal dependency and combines it with its private OpenTelemetry implementation. Plugin authors receive the sampler transitively; other applications can depend on it directly.
+
+## Verification
+
+Use `cargo test --locked -p tenon-process-metrics` for Rust and `sdk/java/mvnw --file sdk/java/pom.xml -pl :tenon-process-metrics -am test` for Java. Both run against real process clocks and RSS. The repository's complete Rust/Java verification also checks SDK first-sample/filter/reconnect behavior, real Plugin processes, archive contents, isolated Maven consumers, and shutdown. Validate native OS reads on every declared target; a cross-built archive alone does not prove native sampling.
diff --git a/sdk/rust/Cargo.lock b/sdk/rust/Cargo.lock
index e5f4c96..10933b3 100644
--- a/sdk/rust/Cargo.lock
+++ b/sdk/rust/Cargo.lock
@@ -209,6 +209,16 @@ version = "1.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
 
+[[package]]
+name = "cpu-time"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
 [[package]]
 name = "cpufeatures"
 version = "0.3.1"
@@ -397,6 +407,28 @@ version = "0.3.34"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
 
+[[package]]
+name = "futures-executor"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.5",
+]
+
 [[package]]
 name = "futures-sink"
 version = "0.3.34"
@@ -416,6 +448,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
 dependencies = [
  "futures-core",
+ "futures-macro",
+ "futures-sink",
  "futures-task",
  "pin-project-lite",
  "slab",
@@ -751,6 +785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e"
 dependencies = [
  "cfg-if",
+ "futures-util",
  "wasm-bindgen",
 ]
 
@@ -1031,6 +1066,40 @@ version = "1.21.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
 
+[[package]]
+name = "opentelemetry"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682"
+dependencies = [
+ "js-sys",
+]
+
+[[package]]
+name = "opentelemetry-proto"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638"
+dependencies = [
+ "opentelemetry",
+ "opentelemetry_sdk",
+ "prost",
+]
+
+[[package]]
+name = "opentelemetry_sdk"
+version = "0.32.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9"
+dependencies = [
+ "futures-channel",
+ "futures-executor",
+ "futures-util",
+ "opentelemetry",
+ "portable-atomic",
+ "thiserror",
+]
+
 [[package]]
 name = "outref"
 version = "0.5.2"
@@ -1103,6 +1172,12 @@ version = "0.2.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
 
+[[package]]
+name = "portable-atomic"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
+
 [[package]]
 name = "potential_utf"
 version = "0.1.6"
@@ -1646,9 +1721,15 @@ name = "tenon-ipc"
 version = "0.1.0"
 dependencies = [
  "bytes",
+ "cpu-time",
  "libc",
+ "loom",
  "memmap2",
+ "proptest",
  "rustix",
+ "serde",
+ "serde_json",
+ "tempfile",
 ]
 
 [[package]]
@@ -1662,6 +1743,9 @@ dependencies = [
  "hyper-util",
  "jsonc-parser",
  "loom",
+ "opentelemetry",
+ "opentelemetry-proto",
+ "opentelemetry_sdk",
  "proptest",
  "prost",
  "prost-build",
@@ -1673,6 +1757,7 @@ dependencies = [
  "sha2",
  "tempfile",
  "tenon-ipc",
+ "tenon-process-metrics",
  "tokio",
  "tokio-stream",
  "tonic",
@@ -1681,6 +1766,34 @@ dependencies = [
  "tower",
 ]
 
+[[package]]
+name = "tenon-process-metrics"
+version = "0.1.0"
+dependencies = [
+ "cpu-time",
+ "libc",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.5",
+]
+
 [[package]]
 name = "thread_local"
 version = "1.1.10"
@@ -2045,6 +2158,28 @@ dependencies = [
  "unicode-ident",
 ]
 
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
 [[package]]
 name = "windows-link"
 version = "0.2.1"
diff --git a/sdk/rust/Cargo.toml b/sdk/rust/Cargo.toml
index 2d143c7..e84ffe0 100644
--- a/sdk/rust/Cargo.toml
+++ b/sdk/rust/Cargo.toml
@@ -16,7 +16,7 @@
 # under the License.
 
 [workspace]
-members = ["plugin-sdk", "cargo-tenon"]
+members = ["ipc", "plugin-sdk", "process-metrics", "cargo-tenon"]
 resolver = "3"
 
 [workspace.package]
@@ -28,9 +28,14 @@ repository = "https://github.com/apache/incubator-bifromq-tenon"
 publish = false
 
 [workspace.dependencies]
-tenon-ipc = { path = "../../ipc/rust/tenon-ipc", version = "=0.1.0" }
+tenon-ipc = { path = "ipc", version = "=0.1.0" }
+tenon-process-metrics = { path = "process-metrics", version = "=0.1.0" }
+opentelemetry = { version = "=0.32.0", default-features = false, features = ["metrics"] }
+opentelemetry-proto = { version = "=0.32.0", default-features = false, features = ["gen-tonic-messages", "metrics"] }
+opentelemetry_sdk = { version = "=0.32.1", default-features = false, features = ["metrics", "experimental_metrics_custom_reader"] }
 base64 = { version = "=0.23.0", default-features = false, features = ["std"] }
 bytes = "=1.12.1"
+cpu-time = "=1.0.0"
 flate2 = { version = "=1.1.9", default-features = false, features = ["rust_backend"] }
 futures-util = { version = "=0.3.34", default-features = false, features = ["std"] }
 hyper = { version = "=1.11.1", default-features = false, features = ["client", "http2"] }
diff --git a/ipc/rust/tenon-ipc/Cargo.toml b/sdk/rust/ipc/Cargo.toml
similarity index 95%
rename from ipc/rust/tenon-ipc/Cargo.toml
rename to sdk/rust/ipc/Cargo.toml
index 9e52072..7b2afd6 100644
--- a/ipc/rust/tenon-ipc/Cargo.toml
+++ b/sdk/rust/ipc/Cargo.toml
@@ -23,7 +23,7 @@ edition.workspace = true
 rust-version.workspace = true
 license.workspace = true
 repository.workspace = true
-publish.workspace = true
+publish = ["crates-io"]
 
 [features]
 repository-test-support = []
@@ -36,6 +36,7 @@ memmap2.workspace = true
 rustix.workspace = true
 
 [dev-dependencies]
+rustix = { workspace = true, features = ["process"] }
 loom.workspace = true
 proptest.workspace = true
 serde.workspace = true
diff --git a/ipc/rust/tenon-ipc/contracts/bell_v1_test_vectors.json b/sdk/rust/ipc/contracts/bell_v1_test_vectors.json
similarity index 100%
rename from ipc/rust/tenon-ipc/contracts/bell_v1_test_vectors.json
rename to sdk/rust/ipc/contracts/bell_v1_test_vectors.json
diff --git a/ipc/rust/tenon-ipc/contracts/queue_v1_test_vectors.json b/sdk/rust/ipc/contracts/queue_v1_test_vectors.json
similarity index 100%
rename from ipc/rust/tenon-ipc/contracts/queue_v1_test_vectors.json
rename to sdk/rust/ipc/contracts/queue_v1_test_vectors.json
diff --git a/ipc/rust/tenon-ipc/src/bell/mapping.rs b/sdk/rust/ipc/src/bell/mapping.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/mapping.rs
rename to sdk/rust/ipc/src/bell/mapping.rs
diff --git a/ipc/rust/tenon-ipc/src/bell/mod.rs b/sdk/rust/ipc/src/bell/mod.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/mod.rs
rename to sdk/rust/ipc/src/bell/mod.rs
diff --git a/ipc/rust/tenon-ipc/src/bell/platform/linux.rs b/sdk/rust/ipc/src/bell/platform/linux.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/platform/linux.rs
rename to sdk/rust/ipc/src/bell/platform/linux.rs
diff --git a/ipc/rust/tenon-ipc/src/bell/platform/macos.rs b/sdk/rust/ipc/src/bell/platform/macos.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/platform/macos.rs
rename to sdk/rust/ipc/src/bell/platform/macos.rs
diff --git a/ipc/rust/tenon-ipc/src/bell/platform/mod.rs b/sdk/rust/ipc/src/bell/platform/mod.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/platform/mod.rs
rename to sdk/rust/ipc/src/bell/platform/mod.rs
diff --git a/ipc/rust/tenon-ipc/src/bell/wait.rs b/sdk/rust/ipc/src/bell/wait.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/bell/wait.rs
rename to sdk/rust/ipc/src/bell/wait.rs
diff --git a/ipc/rust/tenon-ipc/src/lib.rs b/sdk/rust/ipc/src/lib.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/lib.rs
rename to sdk/rust/ipc/src/lib.rs
diff --git a/ipc/rust/tenon-ipc/src/little_endian.rs b/sdk/rust/ipc/src/little_endian.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/little_endian.rs
rename to sdk/rust/ipc/src/little_endian.rs
diff --git a/ipc/rust/tenon-ipc/src/queue/mapped/mod.rs b/sdk/rust/ipc/src/queue/mapped/mod.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/queue/mapped/mod.rs
rename to sdk/rust/ipc/src/queue/mapped/mod.rs
diff --git a/ipc/rust/tenon-ipc/src/queue/mapped/tests/crash.rs b/sdk/rust/ipc/src/queue/mapped/tests/crash.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/src/queue/mapped/tests/crash.rs
rename to sdk/rust/ipc/src/queue/mapped/tests/crash.rs
diff --git a/ipc/rust/tenon-ipc/src/queue/mod.rs b/sdk/rust/ipc/src/queue/mod.rs
similarity index 99%
rename from ipc/rust/tenon-ipc/src/queue/mod.rs
rename to sdk/rust/ipc/src/queue/mod.rs
index 00c536f..6f947de 100644
--- a/ipc/rust/tenon-ipc/src/queue/mod.rs
+++ b/sdk/rust/ipc/src/queue/mod.rs
@@ -744,6 +744,7 @@ const fn padding_len(unpadded_len: usize) -> usize {
     (FRAME_ALIGNMENT - unpadded_len % FRAME_ALIGNMENT) % FRAME_ALIGNMENT
 }
 
+/// Queue endpoint constructors for repository contract and interoperability tests.
 #[cfg(any(test, feature = "repository-test-support"))]
 pub mod contract_test_support {
     use std::io;
diff --git a/ipc/rust/tenon-ipc/tests/benchmark.rs b/sdk/rust/ipc/tests/benchmark.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/tests/benchmark.rs
rename to sdk/rust/ipc/tests/benchmark.rs
diff --git a/ipc/rust/tenon-ipc/tests/format_contract.rs b/sdk/rust/ipc/tests/format_contract.rs
similarity index 99%
rename from ipc/rust/tenon-ipc/tests/format_contract.rs
rename to sdk/rust/ipc/tests/format_contract.rs
index b45e285..3d4ab3f 100644
--- a/ipc/rust/tenon-ipc/tests/format_contract.rs
+++ b/sdk/rust/ipc/tests/format_contract.rs
@@ -17,6 +17,8 @@
  * under the License.
  */
 
+//! Shared Queue and Bell format vectors, corruption cases, and append properties.
+
 use std::collections::VecDeque;
 use std::fs;
 use std::io;
diff --git a/ipc/rust/tenon-ipc/tests/reader_batches.rs b/sdk/rust/ipc/tests/reader_batches.rs
similarity index 97%
rename from ipc/rust/tenon-ipc/tests/reader_batches.rs
rename to sdk/rust/ipc/tests/reader_batches.rs
index ac325a8..a9bf118 100644
--- a/ipc/rust/tenon-ipc/tests/reader_batches.rs
+++ b/sdk/rust/ipc/tests/reader_batches.rs
@@ -17,6 +17,8 @@
  * under the License.
  */
 
+//! Reader batches preserve frame boundaries and shared release progress.
+
 use std::{io, num::NonZeroU64};
 use tenon_ipc::{
     bell::WaitOutcome,
diff --git a/ipc/rust/tenon-ipc/tests/runtime_contract.rs b/sdk/rust/ipc/tests/runtime_contract.rs
similarity index 99%
rename from ipc/rust/tenon-ipc/tests/runtime_contract.rs
rename to sdk/rust/ipc/tests/runtime_contract.rs
index e030729..37fc23f 100644
--- a/ipc/rust/tenon-ipc/tests/runtime_contract.rs
+++ b/sdk/rust/ipc/tests/runtime_contract.rs
@@ -17,6 +17,8 @@
  * under the License.
  */
 
+//! Mapped Queue ordering, release, replay, and cross-process wait/wake contracts.
+
 use std::fs;
 use std::io;
 use std::num::NonZeroU64;
diff --git a/ipc/rust/tenon-ipc/tests/support/doorbell_queue.rs b/sdk/rust/ipc/tests/support/doorbell_queue.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/tests/support/doorbell_queue.rs
rename to sdk/rust/ipc/tests/support/doorbell_queue.rs
diff --git a/ipc/rust/tenon-ipc/tests/support/ipc_queue_model.rs b/sdk/rust/ipc/tests/support/ipc_queue_model.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/tests/support/ipc_queue_model.rs
rename to sdk/rust/ipc/tests/support/ipc_queue_model.rs
diff --git a/ipc/rust/tenon-ipc/tests/support/queue_model.rs b/sdk/rust/ipc/tests/support/queue_model.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/tests/support/queue_model.rs
rename to sdk/rust/ipc/tests/support/queue_model.rs
diff --git a/ipc/rust/tenon-ipc/tests/support/wait.rs b/sdk/rust/ipc/tests/support/wait.rs
similarity index 100%
rename from ipc/rust/tenon-ipc/tests/support/wait.rs
rename to sdk/rust/ipc/tests/support/wait.rs
diff --git a/sdk/rust/plugin-sdk/Cargo.toml b/sdk/rust/plugin-sdk/Cargo.toml
index 9ee7ccd..2186446 100644
--- a/sdk/rust/plugin-sdk/Cargo.toml
+++ b/sdk/rust/plugin-sdk/Cargo.toml
@@ -27,6 +27,10 @@ publish.workspace = true
 readme = "README.md"
 
 [dependencies]
+tenon-process-metrics.workspace = true
+opentelemetry.workspace = true
+opentelemetry-proto.workspace = true
+opentelemetry_sdk.workspace = true
 tenon-ipc.workspace = true
 base64.workspace = true
 bytes.workspace = true
diff --git a/sdk/rust/plugin-sdk/README.md b/sdk/rust/plugin-sdk/README.md
index 397ac33..80c5773 100644
--- a/sdk/rust/plugin-sdk/README.md
+++ b/sdk/rust/plugin-sdk/README.md
@@ -176,6 +176,10 @@ Final shutdown preserves results already read, fails remaining requests, and cal
 
 Factory, lifecycle, queue, write and shutdown failures are reported on stderr and exit the process with code 1. Panics on business threads do the same. Neither `run` nor `await_shutdown` returns an error to the author. Dropping a Program before shutdown completes also exits with failure. Do not depend on later callbacks or destructors after a failure; use these entrypoints in a process dedicated to the plugin.
 
+## Built-in process observations
+
+To implement the SDK process-metrics contract, this SDK automatically reports this Plugin process's CPU consumption (`tenon.plugin.cpu`, logical cores) and current RSS (`tenon.plugin.memory`, bytes) when the Runner receives a metrics request. A combined Source-and-Sink owner reports one process. The first CPU observation is absent while its baseline is established; missing observations are never zero. Authors do not add instrumentation or a collector. Lifecycle and Queue operations are i [...]
+
 ## Payload contracts, packaging, and testing
 
 Your `config.schema.json` describes the complete instance configuration; Tenon validates it before passing the value to the factory. Check business requirements that a schema cannot express, such as opening a device or authenticating to a service, in your factory or a business worker; lifecycle callbacks must not wait for external progress.
diff --git a/sdk/rust/plugin-sdk/build.rs b/sdk/rust/plugin-sdk/build.rs
index e114084..e047df9 100644
--- a/sdk/rust/plugin-sdk/build.rs
+++ b/sdk/rust/plugin-sdk/build.rs
@@ -19,13 +19,21 @@
 
 //! Generates the SDK's private messages from the shared wire contracts.
 
-use std::{env, io, path::PathBuf};
+use std::env;
+use std::io;
+use std::path::PathBuf;
+
+const INGRESS_RECORD_PROTO: &str = "contracts/ingress_record.proto";
+const EGRESS_RECORD_PROTO: &str = "contracts/egress_record.proto";
+const PLUGIN_PROCESS_CONTROL_PROTO: &str = "contracts/process_control.proto";
+const PLUGIN_PROCESS_METRICS_PROTO: &str = "contracts/process_metrics.proto";
 
 fn main() -> io::Result<()> {
     println!("cargo:rerun-if-changed=build.rs");
-    println!("cargo:rerun-if-changed=contracts/process_control.proto");
-    println!("cargo:rerun-if-changed=contracts/ingress_record.proto");
-    println!("cargo:rerun-if-changed=contracts/egress_record.proto");
+    println!("cargo:rerun-if-changed={PLUGIN_PROCESS_CONTROL_PROTO}");
+    println!("cargo:rerun-if-changed={PLUGIN_PROCESS_METRICS_PROTO}");
+    println!("cargo:rerun-if-changed={INGRESS_RECORD_PROTO}");
+    println!("cargo:rerun-if-changed={EGRESS_RECORD_PROTO}");
     let protoc = protoc_bin_vendored::protoc_bin_path().map_err(io::Error::other)?;
     let output =
         PathBuf::from(env::var_os("OUT_DIR").ok_or_else(|| io::Error::other("missing OUT_DIR"))?);
@@ -35,17 +43,15 @@ fn main() -> io::Result<()> {
         ".tenon.source.IngressRecord.payload",
         ".tenon.sink.EgressRecord.payload",
     ]);
-    config.compile_protos(
-        &[
-            "contracts/ingress_record.proto",
-            "contracts/egress_record.proto",
-        ],
-        &["contracts"],
-    )?;
+    config.compile_protos(&[INGRESS_RECORD_PROTO, EGRESS_RECORD_PROTO], &["contracts"])?;
     let mut config = prost_build::Config::new();
     config.protoc_executable(protoc);
     config.file_descriptor_set_path(output.join("process_control_descriptor.pb"));
     tonic_prost_build::configure()
         .build_server(std::env::var_os("CARGO_FEATURE_REPOSITORY_TEST_SUPPORT").is_some())
-        .compile_with_config(config, &["contracts/process_control.proto"], &["contracts"])
+        .compile_with_config(
+            config,
+            &[PLUGIN_PROCESS_CONTROL_PROTO, PLUGIN_PROCESS_METRICS_PROTO],
+            &["contracts"],
+        )
 }
diff --git a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java b/sdk/rust/plugin-sdk/contracts/process_metrics.proto
similarity index 55%
rename from ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
rename to sdk/rust/plugin-sdk/contracts/process_metrics.proto
index 966dd0d..42968d6 100644
--- a/ipc/java/tenon-ipc/src/main/java/org/apache/bifromq/tenon/sdk/ipc/BellWaitOutcome.java
+++ b/sdk/rust/plugin-sdk/contracts/process_metrics.proto
@@ -17,12 +17,21 @@
  * under the License.
  */
 
-package org.apache.bifromq.tenon.sdk.ipc;
+syntax = "proto3";
+package tenon.plugin;
+option java_package = "org.apache.bifromq.tenon.contracts.plugin";
+option java_outer_classname = "ProcessMetrics";
 
-/** The normal result of one wait on a doorbell slot. */
-enum BellWaitOutcome {
-  /** A peer rang the slot or the platform reported the comparison failed. */
-  READY,
-  /** The platform interrupted the park. */
-  INTERRUPTED
+// A separate request-driven stream on the private Plugin Control socket.
+service PluginMetrics {
+  rpc Stream(stream PluginToPipelineMetrics) returns (stream PipelineToPluginMetrics);
 }
+message PluginToPipelineMetrics {
+  oneof message {
+    PluginMetricsAttach attach = 1;
+    PluginMetricsSnapshot snapshot = 2;
+  }
+}
+message PluginMetricsAttach { bytes launch_id = 1; }
+message PluginMetricsSnapshot { bytes metrics = 1; }
+message PipelineToPluginMetrics { repeated string include = 1; }
diff --git a/sdk/rust/plugin-sdk/contracts/process_metrics_test_vectors.json b/sdk/rust/plugin-sdk/contracts/process_metrics_test_vectors.json
new file mode 100644
index 0000000..4727d39
--- /dev/null
+++ b/sdk/rust/plugin-sdk/contracts/process_metrics_test_vectors.json
@@ -0,0 +1,90 @@
+{
+  "formatVersion": 1,
+  "valid": [
+    {
+      "name": "attach",
+      "direction": "plugin",
+      "encoded": [
+        10,
+        18,
+        10,
+        16,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15
+      ]
+    },
+    {
+      "name": "emptySnapshot",
+      "direction": "plugin",
+      "encoded": [
+        18,
+        0
+      ]
+    },
+    {
+      "name": "all",
+      "direction": "pipeline",
+      "encoded": []
+    },
+    {
+      "name": "cpu",
+      "direction": "pipeline",
+      "encoded": [
+        10,
+        16,
+        116,
+        101,
+        110,
+        111,
+        110,
+        46,
+        112,
+        108,
+        117,
+        103,
+        105,
+        110,
+        46,
+        99,
+        112,
+        117
+      ]
+    }
+  ],
+  "malformed": [
+    {
+      "name": "truncatedAttachment",
+      "direction": "plugin",
+      "encoded": [
+        10,
+        18,
+        10,
+        16,
+        0
+      ]
+    },
+    {
+      "name": "truncatedFilter",
+      "direction": "pipeline",
+      "encoded": [
+        10,
+        16,
+        0
+      ]
+    }
+  ]
+}
diff --git a/sdk/rust/plugin-sdk/src/process/metrics.rs b/sdk/rust/plugin-sdk/src/process/metrics.rs
new file mode 100644
index 0000000..283fe55
--- /dev/null
+++ b/sdk/rust/plugin-sdk/src/process/metrics.rs
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//! Private, on-demand process observations; reconnecting never replaces the CPU baseline.
+
+use crate::wire::plugin::{self, plugin_to_pipeline_metrics::Message};
+use Message::Snapshot;
+use base64::Engine as _;
+use hyper_util::rt::TokioIo;
+use opentelemetry::metrics::MeterProvider as _;
+use opentelemetry::{InstrumentationScope, KeyValue};
+use opentelemetry_proto::tonic::collector::metrics::v1::ExportMetricsServiceRequest;
+use opentelemetry_proto::tonic::metrics::v1::MetricsData;
+use opentelemetry_sdk::Resource;
+use opentelemetry_sdk::error::OTelSdkResult;
+use opentelemetry_sdk::metrics::data::ResourceMetrics;
+use opentelemetry_sdk::metrics::reader::MetricReader;
+use opentelemetry_sdk::metrics::{
+    InstrumentKind, ManualReader, Pipeline, SdkMeterProvider, Temporality,
+};
+use plugin::PluginMetricsSnapshot;
+use plugin::plugin_metrics_client::PluginMetricsClient;
+use prost::Message as _;
+use std::sync::{Arc, Mutex, Weak};
+use std::time::Duration;
+use tokio::net::UnixStream;
+use tokio::sync::mpsc;
+use tokio_stream::{StreamExt as _, wrappers::ReceiverStream};
+use tonic::transport::{Channel, Endpoint};
+
+struct Collector {
+    provider: SdkMeterProvider,
+    reader: SharedReader,
+    include: Arc<Mutex<Vec<String>>>,
+    diagnostic: Arc<Diagnostic>,
+}
+
+impl Collector {
+    fn new(launch_id: &[u8]) -> Self {
+        let reader = SharedReader(Arc::new(ManualReader::builder().build()));
+        let provider = SdkMeterProvider::builder()
+            .with_resource(
+                Resource::builder_empty()
+                    .with_attributes([
+                        KeyValue::new("service.namespace", "tenon"),
+                        KeyValue::new("service.name", "tenon.plugin"),
+                        KeyValue::new(
+                            "service.instance.id",
+                            base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(launch_id),
+                        ),
+                    ])
+                    .build(),
+            )
+            .with_reader(reader.clone())
+            .build();
+        let meter = provider.meter_with_scope(
+            InstrumentationScope::builder("tenon-plugin-sdk")
+                .with_version(env!("CARGO_PKG_VERSION"))
+                .build(),
+        );
+        let diagnostic = Arc::new(Diagnostic::default());
+        let include = Arc::new(Mutex::new(Vec::<String>::new()));
+        let cpu_include = include.clone();
+        let cpu_diagnostic = diagnostic.clone();
+        let sampler = Mutex::new(tenon_process_metrics::ProcessSampler::default());
+        meter
+            .f64_observable_gauge("tenon.plugin.cpu")
+            .with_unit("1")
+            .with_callback(move |observer| {
+                if selected(&cpu_include, "tenon.plugin.cpu")
+                    && let Ok(mut sampler) = sampler.lock()
+                {
+                    match sampler.cpu() {
+                        Ok(Some(value)) => observer.observe(value, &[]),
+                        Ok(None) => {}
+                        Err(error) => cpu_diagnostic.report(&error),
+                    }
+                }
+            })
+            .build();
+        let memory_include = include.clone();
+        let memory_diagnostic = diagnostic.clone();
+        meter
+            .u64_observable_gauge("tenon.plugin.memory")
+            .with_unit("By")
+            .with_callback(move |observer| {
+                if selected(&memory_include, "tenon.plugin.memory") {
+                    match tenon_process_metrics::memory() {
+                        Ok(value) => observer.observe(value, &[]),
+                        Err(error) => memory_diagnostic.report(&error),
+                    }
+                }
+            })
+            .build();
+        Self {
+            provider,
+            reader,
+            include,
+            diagnostic,
+        }
+    }
+
+    fn collect(&self, include: Vec<String>) -> Result<Vec<u8>, crate::Error> {
+        *self.include.lock().map_err(|_| "metrics filter poisoned")? = include;
+        let mut data = ResourceMetrics::default();
+        self.reader.collect(&mut data)?;
+        let mut data = MetricsData {
+            resource_metrics: ExportMetricsServiceRequest::from(&data).resource_metrics,
+        };
+        for resource in &mut data.resource_metrics {
+            for scope in &mut resource.scope_metrics {
+                scope.metrics.retain(|metric| selected(&self.include, &metric.name)
+                    && matches!(&metric.data, Some(opentelemetry_proto::tonic::metrics::v1::metric::Data::Gauge(gauge)) if !gauge.data_points.is_empty()));
+            }
+            resource
+                .scope_metrics
+                .retain(|scope| !scope.metrics.is_empty());
+        }
+        data.resource_metrics
+            .retain(|resource| !resource.scope_metrics.is_empty());
+        Ok(data.encode_to_vec())
+    }
+}
+
+impl Drop for Collector {
+    fn drop(&mut self) {
+        let _ = self.provider.shutdown_with_timeout(Duration::ZERO);
+    }
+}
+
+fn selected(include: &Mutex<Vec<String>>, name: &str) -> bool {
+    include
+        .lock()
+        .is_ok_and(|include| include.is_empty() || include.iter().any(|entry| entry == name))
+}
+
+pub(super) async fn run(
+    path: std::path::PathBuf,
+    launch_id: Vec<u8>,
+    executor: super::TrackedExecutor,
+) {
+    let collector = Collector::new(&launch_id);
+    loop {
+        let path = path.clone();
+        let channel = Endpoint::from_static("http://[::]:50051")
+            .executor(executor.clone())
+            .connect_with_connector(tower::service_fn(move |_| {
+                let path = path.clone();
+                async move { UnixStream::connect(path).await.map(TokioIo::new) }
+            }))
+            .await;
+        match channel {
+            Ok(channel) => match serve(channel, &launch_id, &collector).await {
+                Ok(()) => collector.diagnostic.report(&"metrics stream closed"),
+                Err(error) => collector.diagnostic.report(&error),
+            },
+            Err(error) => collector.diagnostic.report(&error),
+        }
+        tokio::time::sleep(Duration::from_millis(250)).await;
+    }
+}
+
+async fn serve(
+    channel: Channel,
+    launch_id: &[u8],
+    collector: &Collector,
+) -> Result<(), crate::Error> {
+    let (snapshots, outgoing) = mpsc::channel(1);
+    let attach = plugin::PluginToPipelineMetrics {
+        message: Some(Message::Attach(plugin::PluginMetricsAttach {
+            launch_id: launch_id.to_vec(),
+        })),
+    };
+    let mut client = PluginMetricsClient::new(channel)
+        .max_decoding_message_size(64 * 1024)
+        .max_encoding_message_size(64 * 1024);
+    let mut requests = client
+        .stream(tokio_stream::iter([attach]).chain(ReceiverStream::new(outgoing)))
+        .await?
+        .into_inner();
+    while let Some(request) = requests.message().await? {
+        let metrics = collector.collect(request.include)?;
+        snapshots
+            .send(plugin::PluginToPipelineMetrics {
+                message: Some(Snapshot(PluginMetricsSnapshot { metrics })),
+            })
+            .await?;
+    }
+    Ok(())
+}
+
+/// All observation failures share one per-process diagnostic rate limit.
+#[derive(Default)]
+struct Diagnostic(Mutex<Option<std::time::Instant>>);
+impl Diagnostic {
+    fn report(&self, error: &dyn std::fmt::Display) {
+        if let Ok(mut previous) = self.0.lock() {
+            let now = std::time::Instant::now();
+            if previous
+                .is_none_or(|previous| now.duration_since(previous) >= Duration::from_secs(60))
+            {
+                *previous = Some(now);
+                use std::io::Write as _;
+                let _ = writeln!(std::io::stderr(), "Plugin metrics unavailable: {error}");
+            }
+        }
+    }
+}
+
+#[derive(Debug, Clone)]
+struct SharedReader(Arc<ManualReader>);
+impl MetricReader for SharedReader {
+    fn register_pipeline(&self, pipeline: Weak<Pipeline>) {
+        self.0.register_pipeline(pipeline);
+    }
+    fn collect(&self, metrics: &mut ResourceMetrics) -> OTelSdkResult {
+        self.0.collect(metrics)
+    }
+    fn force_flush(&self) -> OTelSdkResult {
+        self.0.force_flush()
+    }
+    fn shutdown_with_timeout(&self, timeout: Duration) -> OTelSdkResult {
+        self.0.shutdown_with_timeout(timeout)
+    }
+    fn temporality(&self, kind: InstrumentKind) -> Temporality {
+        self.0.temporality(kind)
+    }
+}
+
+#[cfg(test)]
+mod tests;
diff --git a/sdk/rust/plugin-sdk/src/process/metrics/tests.rs b/sdk/rust/plugin-sdk/src/process/metrics/tests.rs
new file mode 100644
index 0000000..6e9e3de
--- /dev/null
+++ b/sdk/rust/plugin-sdk/src/process/metrics/tests.rs
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use super::*;
+
+#[test]
+fn first_cpu_sample_is_missing_and_filters_do_not_sample_cpu() -> Result<(), crate::Error> {
+    let collector = Collector::new(&[7; 16]);
+    let memory = MetricsData::decode(
+        collector
+            .collect(vec!["tenon.plugin.memory".into()])?
+            .as_slice(),
+    )?;
+    assert_eq!(
+        memory.resource_metrics[0].scope_metrics[0].metrics[0].name,
+        "tenon.plugin.memory"
+    );
+    let first = MetricsData::decode(
+        collector
+            .collect(vec!["tenon.plugin.cpu".into()])?
+            .as_slice(),
+    )?;
+    assert!(first.resource_metrics.is_empty());
+    let second = MetricsData::decode(
+        collector
+            .collect(vec!["tenon.plugin.cpu".into()])?
+            .as_slice(),
+    )?;
+    assert_eq!(
+        second.resource_metrics[0].scope_metrics[0].metrics[0].name,
+        "tenon.plugin.cpu"
+    );
+    let unknown = MetricsData::decode(collector.collect(vec!["unknown".into()])?.as_slice())?;
+    assert!(unknown.resource_metrics.is_empty());
+    Ok(())
+}
+
+#[test]
+fn shared_metrics_wire_vectors() -> Result<(), crate::Error> {
+    let vectors: serde_json::Value = serde_json::from_str(include_str!(
+        "../../../contracts/process_metrics_test_vectors.json"
+    ))?;
+    for kind in ["valid", "malformed"] {
+        for vector in vectors[kind].as_array().ok_or("vectors missing")? {
+            let bytes: Vec<u8> = serde_json::from_value(vector["encoded"].clone())?;
+            let encoded = if vector["direction"] == "plugin" {
+                plugin::PluginToPipelineMetrics::decode(bytes.as_slice())
+                    .map(|message| message.encode_to_vec())
+            } else {
+                plugin::PipelineToPluginMetrics::decode(bytes.as_slice())
+                    .map(|message| message.encode_to_vec())
+            };
+            if kind == "valid" {
+                assert_eq!(encoded?, bytes);
+            } else {
+                assert!(encoded.is_err());
+            }
+        }
+    }
+    Ok(())
+}
+
+#[cfg(feature = "repository-test-support")]
+mod connection;
diff --git a/sdk/rust/plugin-sdk/src/process/metrics/tests/connection.rs b/sdk/rust/plugin-sdk/src/process/metrics/tests/connection.rs
new file mode 100644
index 0000000..acdd034
--- /dev/null
+++ b/sdk/rust/plugin-sdk/src/process/metrics/tests/connection.rs
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use super::*;
+
+#[tokio::test]
+async fn reconnect_retains_cpu_baseline_and_reaps_transport_tasks() -> Result<(), crate::Error> {
+    use tokio_stream::wrappers::UnixListenerStream;
+    let directory = tempfile::tempdir()?;
+    let socket = directory.path().join("metrics.sock");
+    let listener = tokio::net::UnixListener::bind(&socket)?;
+    let (attached, mut sessions) = mpsc::channel(1);
+    let mut tasks = tokio::task::JoinSet::new();
+    tasks.spawn(async move {
+        let _ = tonic::transport::Server::builder()
+            .add_service(plugin::plugin_metrics_server::PluginMetricsServer::new(
+                Peer(attached),
+            ))
+            .serve_with_incoming(UnixListenerStream::new(listener))
+            .await;
+    });
+    let executor = crate::process::TrackedExecutor::default();
+    let tracked = executor.clone();
+    tasks.spawn(run(socket, vec![7; 16], tracked));
+    let result = tokio::time::timeout(Duration::from_secs(15), async {
+        for attempt in 0..12 {
+            let (requests, mut snapshots) =
+                sessions.recv().await.ok_or("metrics did not attach")?;
+            requests
+                .send(plugin::PipelineToPluginMetrics {
+                    include: vec!["tenon.plugin.cpu".into()],
+                })
+                .await?;
+            let message = snapshots.message().await?.ok_or("snapshot missing")?;
+            let Some(Message::Snapshot(snapshot)) = message.message else {
+                return Err::<(), crate::Error>("expected snapshot".into());
+            };
+            let data = MetricsData::decode(snapshot.metrics.as_slice())?;
+            assert_eq!(data.resource_metrics.is_empty(), attempt == 0);
+            // End the actual gRPC response stream. The SDK must reconnect without
+            // replacing its collector or accumulating completed transport tasks.
+            drop(requests);
+            drop(snapshots);
+            assert!(
+                executor
+                    .0
+                    .lock()
+                    .map_err(|_| "task registry poisoned")?
+                    .len()
+                    <= 6
+            );
+        }
+        Ok::<(), crate::Error>(())
+    })
+    .await;
+    tasks.abort_all();
+    while tasks.join_next().await.is_some() {}
+    executor.stop().await;
+    result??;
+    Ok(())
+}
+
+struct Peer(
+    mpsc::Sender<(
+        mpsc::Sender<plugin::PipelineToPluginMetrics>,
+        tonic::Streaming<plugin::PluginToPipelineMetrics>,
+    )>,
+);
+#[tonic::async_trait]
+impl plugin::plugin_metrics_server::PluginMetrics for Peer {
+    type StreamStream = std::pin::Pin<
+        Box<
+            dyn tokio_stream::Stream<Item = Result<plugin::PipelineToPluginMetrics, tonic::Status>>
+                + Send,
+        >,
+    >;
+    async fn stream(
+        &self,
+        request: tonic::Request<tonic::Streaming<plugin::PluginToPipelineMetrics>>,
+    ) -> Result<tonic::Response<Self::StreamStream>, tonic::Status> {
+        let mut snapshots = request.into_inner();
+        let attach = snapshots
+            .message()
+            .await?
+            .ok_or_else(|| tonic::Status::invalid_argument("Attach missing"))?;
+        assert!(matches!(attach.message, Some(Message::Attach(_))));
+        let (requests, incoming) = mpsc::channel(1);
+        self.0
+            .send((requests, snapshots))
+            .await
+            .map_err(|_| tonic::Status::cancelled("test closed"))?;
+        Ok(tonic::Response::new(Box::pin(
+            ReceiverStream::new(incoming).map(Ok),
+        )))
+    }
+}
diff --git a/sdk/rust/plugin-sdk/src/process/mod.rs b/sdk/rust/plugin-sdk/src/process/mod.rs
index 2ae58b8..25f8de8 100644
--- a/sdk/rust/plugin-sdk/src/process/mod.rs
+++ b/sdk/rust/plugin-sdk/src/process/mod.rs
@@ -28,6 +28,7 @@
     reason = "Owned channels, locks and threads cannot disappear without an SDK bug"
 )]
 
+mod metrics;
 pub(crate) mod startup;
 
 use crate::Error;
@@ -42,7 +43,7 @@ use std::thread::{self, JoinHandle};
 use tokio::io::unix::AsyncFd;
 use tokio::net::UnixStream;
 use tokio::sync::mpsc as asynchronous;
-use tokio::task::JoinSet;
+use tokio::task::{AbortHandle, JoinSet};
 use tokio_stream::wrappers::ReceiverStream;
 use tonic::transport::Endpoint;
 
@@ -81,13 +82,16 @@ impl ControlConnection {
                 let result = runtime.block_on(async {
                     let input = AsyncFd::new(input)?;
                     let executor = TrackedExecutor::default();
+                    let mut metrics = JoinSet::new();
+                    let stop_metrics = metrics.spawn(metrics::run(path.clone(), launch_id.clone(), executor.clone()));
                     let result = tokio::select! {
                         biased;
                         result = watch_stdin(input) => result,
                         result = control_session(
-                            path, launch_id, lifecycle, receiver, events, attached, executor.clone()
+                            path, launch_id, lifecycle, receiver, events, attached, executor.clone(), stop_metrics
                         ) => result,
                     };
+                    metrics.shutdown().await;
                     executor.stop().await;
                     result
                 });
@@ -188,10 +192,10 @@ where
     F: Future<Output = ()> + Send + 'static,
 {
     fn execute(&self, future: F) {
-        self.0
-            .lock()
-            .expect("task registry must not panic")
-            .spawn(future);
+        let mut workers = self.0.lock().expect("task registry must not panic");
+        // Reconnecting transports must not retain completed task records until shutdown.
+        while workers.try_join_next().is_some() {}
+        workers.spawn(future);
     }
 }
 
@@ -204,6 +208,10 @@ enum Phase {
     Closing,
 }
 
+#[expect(
+    clippy::too_many_arguments,
+    reason = "one worker owns control, metrics cancellation, and lifecycle publication"
+)]
 async fn control_session(
     path: std::path::PathBuf,
     launch_id: Vec<u8>,
@@ -212,6 +220,7 @@ async fn control_session(
     events: mpsc::Sender<Event>,
     attached: mpsc::SyncSender<()>,
     executor: TrackedExecutor,
+    stop_metrics: AbortHandle,
 ) -> Result<(), Error> {
     let channel = Endpoint::from_static("http://[::]:50051")
         .executor(executor)
@@ -245,10 +254,12 @@ async fn control_session(
                     }
                     (Some(pipeline_to_plugin::Message::Shutdown(_)), Phase::Ready) if lifecycle == Lifecycle::SinkOnly => {
                         phase = Phase::Closing;
+                        stop_metrics.abort();
                         events.send(Event::Shutdown).expect("business owner must remain alive");
                     }
                     (Some(pipeline_to_plugin::Message::Shutdown(_)), Phase::Quiesced) => {
                         phase = Phase::Closing;
+                        stop_metrics.abort();
                         events.send(Event::Shutdown).expect("business owner must remain alive");
                     }
                     _ => return Err("Unexpected Plugin lifecycle command or stream termination".into()),
diff --git a/sdk/rust/plugin-sdk/tests/support/process_peer.rs b/sdk/rust/plugin-sdk/tests/support/process_peer.rs
index 507e082..bd3c434 100644
--- a/sdk/rust/plugin-sdk/tests/support/process_peer.rs
+++ b/sdk/rust/plugin-sdk/tests/support/process_peer.rs
@@ -653,6 +653,9 @@ impl Peer {
                 .add_service(plugin::plugin_lifecycle_server::PluginLifecycleServer::new(
                     Server { connections },
                 ))
+                .add_service(plugin::plugin_metrics_server::PluginMetricsServer::new(
+                    IdleMetrics,
+                ))
                 .serve_with_incoming_shutdown(UnixListenerStream::new(listener), async {
                     let _ = stopped.await;
                 }),
@@ -787,6 +790,36 @@ enum Program {
     SourceAndSink(Channels),
 }
 
+/// Lifecycle fixtures accept the current metrics protocol without requesting samples.
+struct IdleMetrics;
+
+#[tonic::async_trait]
+impl plugin::plugin_metrics_server::PluginMetrics for IdleMetrics {
+    type StreamStream = std::pin::Pin<
+        Box<
+            dyn tokio_stream::Stream<Item = Result<plugin::PipelineToPluginMetrics, Status>> + Send,
+        >,
+    >;
+
+    async fn stream(
+        &self,
+        request: Request<Streaming<plugin::PluginToPipelineMetrics>>,
+    ) -> Result<Response<Self::StreamStream>, Status> {
+        let mut incoming = request.into_inner();
+        let attach = incoming
+            .message()
+            .await?
+            .ok_or_else(|| Status::invalid_argument("Metrics Attach missing"))?;
+        assert!(matches!(
+            attach.message,
+            Some(plugin::plugin_to_pipeline_metrics::Message::Attach(_))
+        ));
+        Ok(Response::new(Box::pin(
+            tokio_stream::StreamExt::filter_map(incoming, |_| None),
+        )))
+    }
+}
+
 pub(super) fn sink_binary() -> std::ffi::OsString {
     std::env::var_os("TENON_TEST_SINK_BINARY").unwrap_or_else(|| {
         option_env!("CARGO_BIN_EXE_sink-process-fixture")
diff --git a/.gitignore b/sdk/rust/process-metrics/Cargo.toml
similarity index 68%
copy from .gitignore
copy to sdk/rust/process-metrics/Cargo.toml
index e832860..f798746 100644
--- a/.gitignore
+++ b/sdk/rust/process-metrics/Cargo.toml
@@ -15,18 +15,19 @@
 # specific language governing permissions and limitations
 # under the License.
 
-.DS_Store
-.idea/
-/target/
-/sdk/java/**/.flattened-pom.xml
-/sdk/rust/target/
-/output/
+[package]
+name = "tenon-process-metrics"
+description = "On-demand process CPU and resident-memory sampling for Tenon"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+license.workspace = true
+repository.workspace = true
+publish = ["crates-io"]
 
-/ipc/java/**/target/
-/ipc/java/**/.flattened-pom.xml
-/sdk/java/**/dependency-reduced-pom.xml
-**/target/
-# This directory contains Runner source, not Cargo build output.
-!/src/runner/pipeline/target/
-!/src/runner/pipeline/target/**
-__pycache__/
+[dependencies]
+cpu-time.workspace = true
+libc.workspace = true
+
+[lints]
+workspace = true
diff --git a/src/metrics/process/mod.rs b/sdk/rust/process-metrics/src/lib.rs
similarity index 73%
rename from src/metrics/process/mod.rs
rename to sdk/rust/process-metrics/src/lib.rs
index 7663c21..542b085 100644
--- a/src/metrics/process/mod.rs
+++ b/sdk/rust/process-metrics/src/lib.rs
@@ -29,19 +29,28 @@ mod platform;
 #[path = "macos.rs"]
 mod platform;
 
-#[derive(Default)]
-pub(super) struct ProcessSampler {
+#[derive(Debug, Default)]
+/// CPU baseline owned by one process collector.
+pub struct ProcessSampler {
     // This is the previous successful sample, not a projection of current state.
     previous: Option<(ProcessTime, Instant)>,
 }
 
 impl ProcessSampler {
-    pub(super) fn cpu(&mut self) -> Option<f64> {
-        self.observe(ProcessTime::try_now().ok(), Instant::now())
+    /// Reads CPU cores since the last successful sample.
+    /// Returns an error when the operating system cannot read the process clock.
+    pub fn cpu(&mut self) -> std::io::Result<Option<f64>> {
+        Ok(self.observe(Some(ProcessTime::try_now()?), Instant::now()))
     }
 
     fn observe(&mut self, cpu: Option<ProcessTime>, now: Instant) -> Option<f64> {
         let cpu = cpu?;
+        if self
+            .previous
+            .is_some_and(|(_, previous_at)| now <= previous_at)
+        {
+            return None;
+        }
         self.previous
             .replace((cpu, now))
             .map(|(previous_cpu, previous_at)| {
@@ -51,7 +60,8 @@ impl ProcessSampler {
     }
 }
 
-pub(super) fn memory() -> std::io::Result<u64> {
+/// Reads current own-process RSS in bytes.
+pub fn memory() -> std::io::Result<u64> {
     platform::resident_bytes()
 }
 
diff --git a/src/metrics/process/linux.rs b/sdk/rust/process-metrics/src/linux.rs
similarity index 100%
rename from src/metrics/process/linux.rs
rename to sdk/rust/process-metrics/src/linux.rs
diff --git a/src/metrics/process/macos.rs b/sdk/rust/process-metrics/src/macos.rs
similarity index 91%
rename from src/metrics/process/macos.rs
rename to sdk/rust/process-metrics/src/macos.rs
index 04654af..bf828c5 100644
--- a/src/metrics/process/macos.rs
+++ b/sdk/rust/process-metrics/src/macos.rs
@@ -41,9 +41,9 @@ pub(super) fn resident_bytes() -> io::Result<u64> {
             &mut count,
         )
     };
-    if result != libc::KERN_SUCCESS {
+    if result != libc::KERN_SUCCESS || count != libc::MACH_TASK_BASIC_INFO_COUNT {
         return Err(io::Error::other("process RSS could not be sampled"));
     }
-    // SAFETY: Successful task_info initialized the entire requested structure.
+    // SAFETY: The successful call and exact count confirm the entire structure was written.
     Ok(unsafe { info.assume_init() }.resident_size)
 }
diff --git a/src/metrics/process/tests.rs b/sdk/rust/process-metrics/src/tests.rs
similarity index 100%
rename from src/metrics/process/tests.rs
rename to sdk/rust/process-metrics/src/tests.rs
diff --git a/src/metrics/mod.rs b/src/metrics/mod.rs
index eeff9b3..094f5e8 100644
--- a/src/metrics/mod.rs
+++ b/src/metrics/mod.rs
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-//! Collects and presents observations owned by Runner and Pipeline processes.
+//! Collects and presents observations owned by Tenon processes.
 //!
 //! Startup configuration is frozen before business resources are created.
-//! Plugin processes and language SDKs never participate in this module.
+//! Plugin snapshots arrive through their independent SDK metrics streams.
 
 pub(crate) mod catalog;
 pub(crate) mod observations;
-mod process;
+use tenon_process_metrics as process;
 pub(crate) mod queue;
 mod runtime;
 
diff --git a/src/metrics/runtime/mod.rs b/src/metrics/runtime/mod.rs
index 02a2184..18b612e 100644
--- a/src/metrics/runtime/mod.rs
+++ b/src/metrics/runtime/mod.rs
@@ -179,7 +179,7 @@ fn register_process_metrics(meter: &Meter, process: CoreProcess<'_>) {
         .f64_observable_gauge(cpu_name)
         .with_unit("1")
         .with_callback(move |observer| {
-            if let Some(value) = sampler.lock().expect("CPU sampler poisoned").cpu() {
+            if let Ok(Some(value)) = sampler.lock().expect("CPU sampler poisoned").cpu() {
                 observer.observe(value, &[]);
             }
         })
diff --git a/src/pipeline/channel/flow_channel/mod.rs b/src/pipeline/channel/flow_channel/mod.rs
index 9141211..62aa552 100644
--- a/src/pipeline/channel/flow_channel/mod.rs
+++ b/src/pipeline/channel/flow_channel/mod.rs
@@ -968,7 +968,9 @@ impl FlowChannel {
             .ingress
             .observers()
             .into_iter()
-            .filter_map(|(kind, queue)| self.metrics.queue(kind, queue));
+            .filter_map(|(kind, queue)| {
+                self.metrics.queue(kind, self.spec.source_instance(), queue)
+            });
         let egress = self
             .routes
             .values()
diff --git a/src/pipeline/channel/flow_channel/tests/mod.rs b/src/pipeline/channel/flow_channel/tests/mod.rs
index 73cf793..d59fab7 100644
--- a/src/pipeline/channel/flow_channel/tests/mod.rs
+++ b/src/pipeline/channel/flow_channel/tests/mod.rs
@@ -1955,6 +1955,7 @@ fn channel_spec<'a>(
         .map(|sink_contract_id| (sink_contract_id.clone(), sink_contract.clone()))
         .collect();
     Ok(FlowChannelSpec::new(
+        "source",
         lua_source,
         ScriptVmLimits::try_new(
             NonZeroUsize::new(TEST_MEMORY_LIMIT_BYTES)
diff --git a/src/pipeline/channel/flow_channel/tests/program_contracts.rs b/src/pipeline/channel/flow_channel/tests/program_contracts.rs
index 017a204..9e1fcae 100644
--- a/src/pipeline/channel/flow_channel/tests/program_contracts.rs
+++ b/src/pipeline/channel/flow_channel/tests/program_contracts.rs
@@ -181,6 +181,7 @@ fn program_channel_spec(
         .sink_root_message()
         .expect("the validated Sink Program has a Sink root");
     Ok(FlowChannelSpec::new(
+        "source",
         lua_source,
         ScriptVmLimits::try_new(
             NonZeroUsize::new(TEST_MEMORY_LIMIT_BYTES).expect("the test memory limit is positive"),
diff --git a/src/pipeline/channel/flow_channel_spec.rs b/src/pipeline/channel/flow_channel_spec.rs
index 9ec080c..fa05e44 100644
--- a/src/pipeline/channel/flow_channel_spec.rs
+++ b/src/pipeline/channel/flow_channel_spec.rs
@@ -43,6 +43,7 @@ use crate::tenon_document::SourceDelivery;
 /// Immutable inputs shared by every FlowChannel in one Flow revision.
 #[derive(Clone, Debug)]
 pub(crate) struct FlowChannelSpec {
+    source_instance: Arc<str>,
     lua_source: Arc<str>,
     lua_limits: ScriptVmLimits,
     max_record_bytes: NonZeroU64,
@@ -54,6 +55,7 @@ pub(crate) struct FlowChannelSpec {
 impl FlowChannelSpec {
     /// Freezes the validated message roots used for initial load and VM rebuilds.
     pub(crate) fn new(
+        source_instance: &str,
         lua_source: impl AsRef<str>,
         lua_limits: ScriptVmLimits,
         max_record_bytes: NonZeroU64,
@@ -62,6 +64,7 @@ impl FlowChannelSpec {
         delivery: SourceDelivery,
     ) -> Self {
         Self {
+            source_instance: Arc::from(source_instance),
             lua_source: Arc::from(lua_source.as_ref()),
             lua_limits,
             max_record_bytes,
@@ -80,6 +83,11 @@ impl FlowChannelSpec {
                 .all(|sink_contract_id| routes.contains_key(sink_contract_id))
     }
 
+    /// Identifies the Source Instance that owns this Channel's ingress Queues.
+    pub(super) fn source_instance(&self) -> &str {
+        &self.source_instance
+    }
+
     pub(super) const fn delivery(&self) -> SourceDelivery {
         self.delivery
     }
diff --git a/src/pipeline/channel/metrics.rs b/src/pipeline/channel/metrics.rs
index 2d3cb48..400f5fc 100644
--- a/src/pipeline/channel/metrics.rs
+++ b/src/pipeline/channel/metrics.rs
@@ -131,17 +131,17 @@ impl ChannelMetrics {
     pub(crate) fn queue(
         &self,
         kind: &'static str,
+        source: &str,
         queue: QueueObserver,
     ) -> Option<Arc<QueueMetric>> {
         self.observation.as_ref().map(|channel| {
-            channel.flow.instruments.queues.register(
-                vec![
-                    channel.attributes[0].clone(),
-                    channel.attributes[1].clone(),
-                    KeyValue::new("tenon.queue.kind", kind),
-                ],
-                queue,
-            )
+            let mut attributes = vec![
+                channel.attributes[0].clone(),
+                channel.attributes[1].clone(),
+                KeyValue::new("tenon.queue.kind", kind),
+            ];
+            attributes.push(KeyValue::new("tenon.plugin.instance.id", source.to_owned()));
+            channel.flow.instruments.queues.register(attributes, queue)
         })
     }
 
diff --git a/src/pipeline/main_loop/mod.rs b/src/pipeline/main_loop/mod.rs
index 809fb58..2495ed0 100644
--- a/src/pipeline/main_loop/mod.rs
+++ b/src/pipeline/main_loop/mod.rs
@@ -277,14 +277,23 @@ async fn bootstrap(
         },
     )
     .expect("Pipeline metrics use the existing launch identity without randomness");
-    let metrics = PipelineMetrics::start(metrics, &launch.control_socket, launch.launch_id.clone());
+    let metrics = PipelineMetrics::start(
+        metrics,
+        &launch.control_socket,
+        launch.launch_id.clone(),
+        plugin_control.process_metrics(),
+    );
     let meter = metrics.meter();
     let diagnostics = PipelineDiagnostics::start(channel, launch.launch_id);
+    let launcher = plugin_control
+        .launcher()
+        .with_node_id(environment.metrics_node_id.clone())
+        .with_metrics(Some(&meter));
     let controller = start_controller(
         revision,
         environment,
         diagnostics.publisher(),
-        plugin_control.launcher().with_metrics(Some(&meter)),
+        launcher,
         Some(&meter),
     );
     let observations = PluginMetrics::new(&meter);
diff --git a/src/pipeline/metrics_stream.rs b/src/pipeline/metrics_stream.rs
index 2a809f8..b29418d 100644
--- a/src/pipeline/metrics_stream.rs
+++ b/src/pipeline/metrics_stream.rs
@@ -19,8 +19,10 @@
 
 //! Owns the private provider and the reconnecting, request-driven metrics stream.
 
+use super::plugin::metrics::PluginProcessMetrics;
 use crate::contracts::core;
 use crate::metrics::MetricsRuntime;
+use crate::time::Deadline;
 use opentelemetry::metrics::Meter;
 use prost::Message as _;
 use std::sync::Arc;
@@ -42,7 +44,12 @@ impl PipelineMetrics {
         clippy::expect_used,
         reason = "Runner supplies the exact private socket address"
     )]
-    pub(super) fn start(runtime: MetricsRuntime, socket: &str, launch_id: Vec<u8>) -> Self {
+    pub(super) fn start(
+        runtime: MetricsRuntime,
+        socket: &str,
+        launch_id: Vec<u8>,
+        plugins: PluginProcessMetrics,
+    ) -> Self {
         let runtime = Arc::new(runtime);
         let collector = Arc::clone(&runtime);
         let endpoint = Endpoint::from_shared(format!("unix://{socket}"))
@@ -51,7 +58,7 @@ impl PipelineMetrics {
         task.spawn(async move {
             loop {
                 if let Ok(channel) = endpoint.connect().await {
-                    let _disconnected = serve(channel, &launch_id, &collector).await;
+                    let _disconnected = serve(channel, &launch_id, &collector, &plugins).await;
                 }
                 tokio::time::sleep(Duration::from_millis(250)).await;
             }
@@ -77,7 +84,12 @@ impl PipelineMetrics {
     }
 }
 
-async fn serve(channel: Channel, launch_id: &[u8], runtime: &MetricsRuntime) -> Result<(), Status> {
+async fn serve(
+    channel: Channel,
+    launch_id: &[u8],
+    runtime: &MetricsRuntime,
+    plugins: &PluginProcessMetrics,
+) -> Result<(), Status> {
     let mut client = core::pipeline_metrics_client::PipelineMetricsClient::new(channel)
         .max_decoding_message_size(usize::MAX)
         .max_encoding_message_size(usize::MAX);
@@ -94,7 +106,19 @@ async fn serve(channel: Channel, launch_id: &[u8], runtime: &MetricsRuntime) ->
         .await?
         .into_inner();
     while let Some(request) = requests.message().await? {
-        let snapshot = runtime.collect(&request.include);
+        let deadline = Deadline::start(Duration::from_millis(request.remaining_timeout_ms / 2));
+        let mut snapshot = runtime.collect(&request.include);
+        let collected = tokio::select! {
+            biased;
+            closed = requests.message() => {
+                return match closed? {
+                    None => Ok(()),
+                    Some(_) => Err(Status::invalid_argument("Only one collection may be in flight")),
+                };
+            }
+            collected = plugins.collect(&request.include, deadline) => collected,
+        };
+        snapshot.resource_metrics.extend(collected.resource_metrics);
         snapshots
             .send(core::PipelineMetricsToRunner {
                 message: Some(core::pipeline_metrics_to_runner::Message::Snapshot(
diff --git a/src/pipeline/metrics_stream/tests.rs b/src/pipeline/metrics_stream/tests.rs
index eac56b8..6fd2a68 100644
--- a/src/pipeline/metrics_stream/tests.rs
+++ b/src/pipeline/metrics_stream/tests.rs
@@ -52,7 +52,12 @@ async fn reconnect_preserves_accumulation_and_shutdown_closes_the_idle_stream()
         .meter()
         .u64_counter("tenon.flow.input.records")
         .build();
-    let metrics = PipelineMetrics::start(runtime, &socket.to_string_lossy(), b"launch-a".to_vec());
+    let metrics = PipelineMetrics::start(
+        runtime,
+        &socket.to_string_lossy(),
+        b"launch-a".to_vec(),
+        PluginProcessMetrics::default(),
+    );
     tokio::time::timeout(Duration::from_secs(5), async {
         for expected in [1, 2] {
             let mut peer = connected
@@ -69,6 +74,7 @@ async fn reconnect_preserves_accumulation_and_shutdown_closes_the_idle_stream()
             peer.requests
                 .send(Ok(core::RunnerToPipelineMetrics {
                     include: vec!["tenon.flow.input.records".to_owned()],
+                    remaining_timeout_ms: 1000,
                 }))
                 .await
                 .map_err(io::Error::other)?;
diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs
index a2ad032..744f0ba 100644
--- a/src/pipeline/mod.rs
+++ b/src/pipeline/mod.rs
@@ -246,7 +246,7 @@ pub(crate) mod contract_test_support {
 }
 
 #[cfg(all(test, not(feature = "loom-model")))]
-#[path = "../../ipc/rust/tenon-ipc/tests/support/wait.rs"]
+#[path = "../../sdk/rust/ipc/tests/support/wait.rs"]
 mod queue_test_support;
 
 #[cfg(test)]
diff --git a/src/pipeline/plugin/contract_test_support.rs b/src/pipeline/plugin/contract_test_support.rs
index 6e99d33..dc8f7ca 100644
--- a/src/pipeline/plugin/contract_test_support.rs
+++ b/src/pipeline/plugin/contract_test_support.rs
@@ -192,6 +192,7 @@ pub async fn run_sink_program_with_control_stream_loss(
         launcher.socket_path(),
         pending.launch_id(),
         publisher,
+        launcher.register_metrics(pending.launch_id(), vec![]),
     );
     let operation = match spawned {
         PluginSpawnOutcome::Started {
diff --git a/src/pipeline/plugin/control/server.rs b/src/pipeline/plugin/control/server.rs
index 487d89b..e0ccb2d 100644
--- a/src/pipeline/plugin/control/server.rs
+++ b/src/pipeline/plugin/control/server.rs
@@ -35,6 +35,7 @@ use tokio::task::{JoinError, JoinHandle};
 use tokio_stream::wrappers::UnixListenerStream;
 use tonic::transport::Server;
 
+use super::super::metrics::PluginProcessMetrics;
 use super::adapter::PluginControlAdapter;
 use super::launch_registry::{PendingPluginControl, PluginControlLaunchRegistry};
 use crate::payload_contract::PluginInterface;
@@ -58,7 +59,10 @@ impl PluginControlServer {
         let listener =
             UnixListener::bind(&socket_path).map_err(PluginControlServerError::SocketBind)?;
         let service = PluginControlAdapter::new(launches.clone()).into_service();
+        let metrics = PluginProcessMetrics::default();
         let launcher = PluginControlLauncher {
+            metrics: metrics.clone(),
+            node_id: None,
             launches,
             socket_path: Arc::new(socket_path),
             restarts: None,
@@ -67,6 +71,7 @@ impl PluginControlServer {
         let task = tokio::spawn(
             Server::builder()
                 .add_service(service)
+                .add_service(metrics.into_service())
                 .serve_with_incoming_shutdown(UnixListenerStream::new(listener), async {
                     let _ = shutdown_requested.await;
                 }),
@@ -79,6 +84,10 @@ impl PluginControlServer {
     }
 
     /// Returns the cloneable launch capability without transferring server ownership.
+    pub(in crate::pipeline) fn process_metrics(&self) -> PluginProcessMetrics {
+        self.launcher.metrics.clone()
+    }
+
     pub(in crate::pipeline) fn launcher(&self) -> PluginControlLauncher {
         self.launcher.clone()
     }
@@ -125,6 +134,8 @@ impl fmt::Debug for PluginControlServer {
 /// Cloneable authority for registering children against one still-owned server.
 #[derive(Clone)]
 pub(in crate::pipeline) struct PluginControlLauncher {
+    metrics: PluginProcessMetrics,
+    node_id: Option<String>,
     launches: PluginControlLaunchRegistry,
     // This immutable path is shared because child owners outlive the borrow used
     // to create them while the server retains the actual socket resource owner.
@@ -133,6 +144,21 @@ pub(in crate::pipeline) struct PluginControlLauncher {
 }
 
 impl PluginControlLauncher {
+    pub(in crate::pipeline) fn with_node_id(mut self, node_id: Option<String>) -> Self {
+        self.node_id = node_id;
+        self
+    }
+    pub(in crate::pipeline::plugin) fn register_metrics(
+        &self,
+        launch: &[u8],
+        mut attributes: Vec<opentelemetry_proto::tonic::common::v1::KeyValue>,
+    ) -> super::super::metrics::Registration {
+        if let Some(node) = &self.node_id {
+            attributes.push(super::super::metrics::attribute("tenon.node.id", node));
+        }
+        self.metrics.register(launch, attributes)
+    }
+
     pub(in crate::pipeline) fn with_metrics(mut self, meter: Option<&Meter>) -> Self {
         self.restarts = meter.map(|meter| {
             meter
diff --git a/src/pipeline/plugin/controlled_lifecycle/mod.rs b/src/pipeline/plugin/controlled_lifecycle/mod.rs
index a5919e2..d2b965b 100644
--- a/src/pipeline/plugin/controlled_lifecycle/mod.rs
+++ b/src/pipeline/plugin/controlled_lifecycle/mod.rs
@@ -547,13 +547,21 @@ impl PluginInstanceOwner {
         on_created: impl FnOnce(),
     ) -> ControlledPluginState {
         let ControlledPluginLaunch {
+            metrics_attributes,
             process,
             interface,
             control,
         } = launch;
         let pending = control.register(interface);
         let launch_id = *pending.launch_id();
-        match spawn_plugin(process, control.socket_path(), &launch_id, diagnostics) {
+        let metrics = control.register_metrics(&launch_id, metrics_attributes);
+        match spawn_plugin(
+            process,
+            control.socket_path(),
+            &launch_id,
+            diagnostics,
+            metrics,
+        ) {
             PluginSpawnOutcome::Started { process, config } => {
                 on_created();
                 ControlledPluginState::Starting(ControlledPluginStartup {
diff --git a/src/pipeline/plugin/controlled_lifecycle/startup.rs b/src/pipeline/plugin/controlled_lifecycle/startup.rs
index c625bb9..8db4393 100644
--- a/src/pipeline/plugin/controlled_lifecycle/startup.rs
+++ b/src/pipeline/plugin/controlled_lifecycle/startup.rs
@@ -47,12 +47,21 @@ type ReadyFuture =
 
 /// Target launch material for one UDS-controlled Plugin Instance.
 pub(in crate::pipeline) struct ControlledPluginLaunch<'a> {
+    pub(super) metrics_attributes: Vec<opentelemetry_proto::tonic::common::v1::KeyValue>,
     pub(super) process: PluginLaunch<'a>,
     pub(super) interface: PluginInterface,
     pub(in crate::pipeline::plugin) control: &'a PluginControlLauncher,
 }
 
 impl<'a> ControlledPluginLaunch<'a> {
+    pub(in crate::pipeline) fn with_metrics_attributes(
+        mut self,
+        attributes: Vec<opentelemetry_proto::tonic::common::v1::KeyValue>,
+    ) -> Self {
+        self.metrics_attributes = attributes;
+        self
+    }
+
     /// Combines process material with this launch's bound interfaces and control endpoint.
     pub(in crate::pipeline) const fn new(
         process: PluginLaunch<'a>,
@@ -60,6 +69,7 @@ impl<'a> ControlledPluginLaunch<'a> {
         control: &'a PluginControlLauncher,
     ) -> Self {
         Self {
+            metrics_attributes: Vec::new(),
             process,
             interface,
             control,
diff --git a/src/pipeline/plugin/controlled_lifecycle/tests.rs b/src/pipeline/plugin/controlled_lifecycle/tests.rs
index 3eb3728..1179511 100644
--- a/src/pipeline/plugin/controlled_lifecycle/tests.rs
+++ b/src/pipeline/plugin/controlled_lifecycle/tests.rs
@@ -413,6 +413,7 @@ async fn stdin_eof_makes_the_real_plugin_exit_without_shutdown() -> Result<(), B
         launcher.socket_path(),
         &launch_id,
         diagnostics(),
+        launcher.register_metrics(&launch_id, vec![]),
     )
     else {
         return Err(io::Error::other("Controlled child did not spawn").into());
diff --git a/src/pipeline/plugin/lifecycle/mod.rs b/src/pipeline/plugin/lifecycle/mod.rs
index 975ae1b..656415d 100644
--- a/src/pipeline/plugin/lifecycle/mod.rs
+++ b/src/pipeline/plugin/lifecycle/mod.rs
@@ -167,6 +167,7 @@ pub(super) fn spawn_plugin(
     socket_path: &Path,
     launch_id: &[u8; PLUGIN_LAUNCH_ID_LENGTH],
     diagnostics: PluginDiagnosticPublisher,
+    metrics: super::metrics::Registration,
 ) -> PluginSpawnOutcome {
     let Some((program, arguments)) = launch.command.split_first() else {
         return PluginSpawnOutcome::Failed(PluginStartFailure::CommandMissing);
@@ -229,7 +230,14 @@ pub(super) fn spawn_plugin(
         ));
     };
     PluginSpawnOutcome::Started {
-        process: PluginProcess::new(lifetime_channel, child, stdout, stderr, diagnostics),
+        process: PluginProcess::new(
+            lifetime_channel,
+            child,
+            stdout,
+            stderr,
+            diagnostics,
+            metrics,
+        ),
         config,
     }
 }
@@ -293,6 +301,7 @@ impl fmt::Debug for PluginStartupWriter {
 }
 
 pub(super) struct PluginProcess {
+    metrics: Option<super::metrics::Registration>,
     #[cfg(not(feature = "repository-test-support"))]
     lifetime_channel: ChildStdin,
     // Repository tests can independently release this OS resource to reproduce owner loss.
@@ -311,6 +320,7 @@ impl PluginProcess {
         stdout: ChildStdout,
         stderr: ChildStderr,
         diagnostics: PluginDiagnosticPublisher,
+        metrics: super::metrics::Registration,
     ) -> Self {
         Self {
             #[cfg(not(feature = "repository-test-support"))]
@@ -319,6 +329,7 @@ impl PluginProcess {
             lifetime_channel: Some(lifetime_channel),
             child,
             _output: PluginOutput::new(stdout, stderr, diagnostics),
+            metrics: Some(metrics),
             observed_exit: None,
             stop_request: ProcessStopRequest::None,
         }
@@ -367,6 +378,7 @@ impl PluginProcess {
         match waiting.as_mut().poll(context) {
             Poll::Ready(Ok(status)) => {
                 self.observed_exit = Some(status);
+                self.metrics.take();
                 Poll::Ready(Ok(status))
             }
             Poll::Ready(Err(source)) => Poll::Ready(Err(source)),
@@ -401,6 +413,7 @@ impl PluginProcess {
         }
         let status = self.child.wait().await?;
         self.observed_exit = Some(status);
+        self.metrics.take();
         Ok(status)
     }
 
diff --git a/src/pipeline/plugin/lifecycle/tests.rs b/src/pipeline/plugin/lifecycle/tests.rs
index d1f4d4b..a408c38 100644
--- a/src/pipeline/plugin/lifecycle/tests.rs
+++ b/src/pipeline/plugin/lifecycle/tests.rs
@@ -19,6 +19,7 @@
 
 use super::{PluginSpawnOutcome, spawn_plugin};
 use crate::pipeline::diagnostics::test_support as diagnostic_test_support;
+use crate::pipeline::plugin::metrics::PluginProcessMetrics;
 use crate::pipeline::plugin::test_support::{TEST_DEADLINE, TestLaunch, wait_for_file};
 use crate::tenon_document::verified::{ExtraArgs, ExtraArgsPosition};
 use serde_json::json;
@@ -70,6 +71,7 @@ async fn launch_applies_instance_arguments_and_environment_without_shell_expansi
             &[1; 16],
             diagnostic_test_support::publisher()
                 .instance_plugin(diagnostic_test_support::plugin_id()),
+            PluginProcessMetrics::default().register(&[1; 16], vec![]),
         )
         else {
             return Err(io::Error::other("Plugin did not spawn").into());
@@ -152,6 +154,7 @@ while IFS= read -r ignored; do :; done
         &root.path().join("unused-control.sock"),
         &[1; 16],
         diagnostics,
+        PluginProcessMetrics::default().register(&[1; 16], vec![]),
     )
     else {
         return Err(io::Error::other("Output-drain child did not spawn").into());
@@ -200,6 +203,7 @@ while IFS= read -r ignored; do :; done
         &root.path().join("unused-control.sock"),
         &[1; 16],
         diagnostics,
+        PluginProcessMetrics::default().register(&[1; 16], vec![]),
     )
     else {
         return Err(io::Error::other("Config-writer child did not spawn").into());
diff --git a/src/pipeline/plugin/metrics.rs b/src/pipeline/plugin/metrics.rs
new file mode 100644
index 0000000..6ced5e8
--- /dev/null
+++ b/src/pipeline/plugin/metrics.rs
@@ -0,0 +1,337 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//! Launch-bound Plugin metrics sessions, independent of lifecycle control.
+
+use crate::contracts::plugin::{self, plugin_to_pipeline_metrics::Message};
+use crate::time::Deadline;
+use base64::Engine as _;
+use futures_util::stream::{FuturesUnordered, StreamExt as _};
+use opentelemetry_proto::tonic::common::v1::{AnyValue, KeyValue, any_value::Value};
+use opentelemetry_proto::tonic::metrics::v1::{
+    MetricsData, metric::Data, number_data_point::Value as Number,
+};
+use prost::Message as _;
+use std::collections::HashMap;
+use std::pin::Pin;
+use std::sync::{Arc, Mutex, Weak};
+use std::task::{Context, Poll};
+use tokio::sync::{mpsc, watch};
+use tokio_stream::{
+    Stream,
+    wrappers::{ReceiverStream, WatchStream},
+};
+use tonic::{Request, Response, Status, Streaming};
+
+const MAXIMUM_MESSAGE_BYTES: usize = 64 * 1024;
+#[derive(Debug, Default)]
+struct Connection {
+    session: Mutex<Option<Session>>,
+    wake: futures_util::task::AtomicWaker,
+}
+
+#[derive(Clone, Debug, Default)]
+pub(in crate::pipeline) struct PluginProcessMetrics(Arc<Mutex<HashMap<Vec<u8>, Entry>>>);
+
+#[derive(Debug)]
+struct Entry {
+    attributes: Vec<KeyValue>,
+    lifetime: watch::Receiver<()>,
+    connection: Weak<Connection>,
+}
+
+/// The process owner alone retains registration; dropping it revokes all sessions.
+#[derive(Debug)]
+pub(super) struct Registration {
+    registry: PluginProcessMetrics,
+    launch_id: Vec<u8>,
+    _lifetime: watch::Sender<()>,
+}
+
+impl Drop for Registration {
+    fn drop(&mut self) {
+        if let Ok(mut registry) = self.registry.0.lock() {
+            registry.remove(&self.launch_id);
+        }
+    }
+}
+
+impl PluginProcessMetrics {
+    pub(super) fn register(&self, launch_id: &[u8], attributes: Vec<KeyValue>) -> Registration {
+        let (lifetime, receiver) = watch::channel(());
+        if let Ok(mut entries) = self.0.lock() {
+            entries.insert(
+                launch_id.to_vec(),
+                Entry {
+                    attributes,
+                    lifetime: receiver,
+                    connection: Weak::new(),
+                },
+            );
+        }
+        Registration {
+            registry: self.clone(),
+            launch_id: launch_id.to_vec(),
+            _lifetime: lifetime,
+        }
+    }
+
+    pub(in crate::pipeline) fn into_service(
+        self,
+    ) -> plugin::plugin_metrics_server::PluginMetricsServer<Self> {
+        plugin::plugin_metrics_server::PluginMetricsServer::new(self)
+            .max_decoding_message_size(MAXIMUM_MESSAGE_BYTES)
+            .max_encoding_message_size(MAXIMUM_MESSAGE_BYTES)
+    }
+
+    pub(in crate::pipeline) async fn collect(
+        &self,
+        include: &[String],
+        deadline: Deadline,
+    ) -> MetricsData {
+        let mut output = MetricsData::default();
+        if !crate::metrics::catalog::includes_owner(include, "plugin") || deadline.has_elapsed() {
+            return output;
+        }
+        let available = match self.0.lock() {
+            Ok(entries) => entries
+                .iter()
+                .filter_map(|(launch, entry)| {
+                    Some((
+                        launch.clone(),
+                        entry.attributes.clone(),
+                        entry.connection.upgrade()?,
+                    ))
+                })
+                .collect::<Vec<_>>(),
+            Err(_) => return output,
+        };
+        let mut pending = FuturesUnordered::new();
+        for (launch, attributes, connection) in available {
+            let session = connection
+                .session
+                .lock()
+                .ok()
+                .and_then(|mut session| session.take());
+            if let Some(session) = session {
+                if session
+                    .commands
+                    .try_send(Ok(plugin::PipelineToPluginMetrics {
+                        include: include.to_vec(),
+                    }))
+                    .is_err()
+                {
+                    continue;
+                }
+                pending.push(collect_one(
+                    connection, session, launch, attributes, include, deadline,
+                ));
+            }
+        }
+        while let Some(snapshot) = pending.next().await {
+            if let Some(snapshot) = snapshot {
+                output.resource_metrics.extend(snapshot.resource_metrics);
+            }
+        }
+        output
+    }
+}
+
+async fn collect_one(
+    connection: Arc<Connection>,
+    mut session: Session,
+    launch: Vec<u8>,
+    attributes: Vec<KeyValue>,
+    include: &[String],
+    deadline: Deadline,
+) -> Option<MetricsData> {
+    let reply = tokio::select! {
+        biased;
+        _ = session.lifetime.changed() => return None,
+        _ = deadline.wait() => return None,
+        reply = session.snapshots.message() => reply.ok()??,
+    };
+    let Message::Snapshot(reply) = reply.message? else {
+        return None;
+    };
+    let mut snapshot = MetricsData::decode(reply.metrics.as_slice()).ok()?;
+    validate(&snapshot, &launch, include)?;
+    if session.lifetime.has_changed().is_err() {
+        return None;
+    }
+    for resource in &mut snapshot.resource_metrics {
+        resource
+            .resource
+            .as_mut()?
+            .attributes
+            .extend(attributes.clone());
+    }
+    *connection.session.lock().ok()? = Some(session);
+    connection.wake.wake();
+    Some(snapshot)
+}
+
+fn validate(snapshot: &MetricsData, launch: &[u8], include: &[String]) -> Option<()> {
+    if snapshot.resource_metrics.is_empty() {
+        return Some(());
+    }
+    if snapshot.resource_metrics.len() != 1 {
+        return None;
+    }
+    let resource = &snapshot.resource_metrics[0];
+    let attrs = &resource.resource.as_ref()?.attributes;
+    let identity = base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(launch);
+    if attrs.len() != 3
+        || ![
+            attribute("service.namespace", "tenon"),
+            attribute("service.name", "tenon.plugin"),
+            attribute("service.instance.id", &identity),
+        ]
+        .iter()
+        .all(|expected| attrs.contains(expected))
+        || resource.scope_metrics.len() != 1
+    {
+        return None;
+    }
+    let scope = &resource.scope_metrics[0];
+    let identity = scope.scope.as_ref()?;
+    if identity.name.is_empty()
+        || identity.version.is_empty()
+        || !identity.attributes.is_empty()
+        || scope.metrics.len() > 2
+    {
+        return None;
+    }
+    let mut names = std::collections::HashSet::new();
+    for metric in &scope.metrics {
+        if !names.insert(&metric.name) || (!include.is_empty() && !include.contains(&metric.name)) {
+            return None;
+        }
+        let Data::Gauge(gauge) = metric.data.as_ref()? else {
+            return None;
+        };
+        if gauge.data_points.len() != 1 {
+            return None;
+        }
+        let point = &gauge.data_points[0];
+        if !point.attributes.is_empty() || point.time_unix_nano == 0 || point.flags != 0 {
+            return None;
+        }
+        match (
+            metric.name.as_str(),
+            metric.unit.as_str(),
+            point.value.as_ref()?,
+        ) {
+            ("tenon.plugin.cpu", "1", Number::AsDouble(value))
+                if value.is_finite() && *value >= 0.0 => {}
+            ("tenon.plugin.memory", "By", Number::AsInt(value)) if *value >= 0 => {}
+            _ => return None,
+        }
+    }
+    Some(())
+}
+
+pub(in crate::pipeline) fn attribute(key: &str, value: &str) -> KeyValue {
+    KeyValue {
+        key: key.into(),
+        key_strindex: 0,
+        value: Some(AnyValue {
+            value: Some(Value::StringValue(value.into())),
+        }),
+    }
+}
+
+#[tonic::async_trait]
+impl plugin::plugin_metrics_server::PluginMetrics for PluginProcessMetrics {
+    type StreamStream = MetricsStream;
+    async fn stream(
+        &self,
+        request: Request<Streaming<plugin::PluginToPipelineMetrics>>,
+    ) -> Result<Response<Self::StreamStream>, Status> {
+        let mut snapshots = request.into_inner();
+        let Some(Message::Attach(attach)) = snapshots
+            .message()
+            .await?
+            .and_then(|message| message.message)
+        else {
+            return Err(Status::invalid_argument("Metrics Attach is required"));
+        };
+        let mut entries = self
+            .0
+            .lock()
+            .map_err(|_| Status::unavailable("Metrics registry unavailable"))?;
+        let entry = entries
+            .get_mut(&attach.launch_id)
+            .ok_or_else(|| Status::failed_precondition("Plugin launch unavailable"))?;
+        if entry.connection.upgrade().is_some() {
+            return Err(Status::already_exists(
+                "Plugin metrics stream already attached",
+            ));
+        }
+        let (commands, requests) = mpsc::channel(1);
+        let connection = Arc::new(Connection {
+            session: Mutex::new(Some(Session {
+                commands,
+                snapshots,
+                lifetime: entry.lifetime.clone(),
+            })),
+            wake: futures_util::task::AtomicWaker::new(),
+        });
+        entry.connection = Arc::downgrade(&connection);
+        Ok(Response::new(MetricsStream {
+            _connection: connection,
+            requests: ReceiverStream::new(requests),
+            lifetime: WatchStream::from_changes(entry.lifetime.clone()),
+        }))
+    }
+}
+
+pub(in crate::pipeline) struct MetricsStream {
+    _connection: Arc<Connection>,
+    requests: ReceiverStream<Result<plugin::PipelineToPluginMetrics, Status>>,
+    lifetime: WatchStream<()>,
+}
+impl Stream for MetricsStream {
+    type Item = Result<plugin::PipelineToPluginMetrics, Status>;
+    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
+        let this = self.get_mut();
+        if Pin::new(&mut this.lifetime).poll_next(cx).is_ready() {
+            return Poll::Ready(None);
+        }
+        this._connection.wake.register(cx.waker());
+        if let Ok(mut slot) = this._connection.session.lock()
+            && let Some(session) = slot.as_mut()
+            && Pin::new(&mut session.snapshots).poll_next(cx).is_ready()
+        {
+            // Any response while no Collect owns this session is unsolicited.
+            slot.take();
+            return Poll::Ready(None);
+        }
+        Pin::new(&mut this.requests).poll_next(cx)
+    }
+}
+#[derive(Debug)]
+struct Session {
+    commands: mpsc::Sender<Result<plugin::PipelineToPluginMetrics, Status>>,
+    snapshots: Streaming<plugin::PluginToPipelineMetrics>,
+    lifetime: watch::Receiver<()>,
+}
+
+#[cfg(test)]
+mod tests;
diff --git a/src/pipeline/plugin/metrics/tests.rs b/src/pipeline/plugin/metrics/tests.rs
new file mode 100644
index 0000000..ed6e536
--- /dev/null
+++ b/src/pipeline/plugin/metrics/tests.rs
@@ -0,0 +1,284 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use super::*;
+use opentelemetry_proto::tonic::{
+    common::v1::InstrumentationScope,
+    metrics::v1::{Gauge, Metric, NumberDataPoint, ResourceMetrics, ScopeMetrics},
+    resource::v1::Resource,
+};
+use std::time::Duration;
+use tokio::net::UnixListener;
+use tokio_stream::wrappers::UnixListenerStream;
+use tonic::transport::{Endpoint, Server};
+
+type TestResult = Result<(), Box<dyn std::error::Error>>;
+
+fn sample(launch: &[u8]) -> MetricsData {
+    MetricsData {
+        resource_metrics: vec![ResourceMetrics {
+            resource: Some(Resource {
+                attributes: vec![
+                    attribute("service.namespace", "tenon"),
+                    attribute("service.name", "tenon.plugin"),
+                    attribute(
+                        "service.instance.id",
+                        &base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(launch),
+                    ),
+                ],
+                ..Default::default()
+            }),
+            scope_metrics: vec![ScopeMetrics {
+                scope: Some(InstrumentationScope {
+                    name: "tenon-plugin-sdk".into(),
+                    version: "0.1.0".into(),
+                    ..Default::default()
+                }),
+                metrics: vec![Metric {
+                    name: "tenon.plugin.memory".into(),
+                    unit: "By".into(),
+                    data: Some(Data::Gauge(Gauge {
+                        data_points: vec![NumberDataPoint {
+                            time_unix_nano: 123,
+                            value: Some(Number::AsInt(42)),
+                            ..Default::default()
+                        }],
+                    })),
+                    ..Default::default()
+                }],
+                ..Default::default()
+            }],
+            ..Default::default()
+        }],
+    }
+}
+
+struct ServerOwner {
+    registry: PluginProcessMetrics,
+    _directory: tempfile::TempDir,
+    socket: String,
+    tasks: tokio::task::JoinSet<()>,
+}
+impl ServerOwner {
+    fn start() -> Result<Self, Box<dyn std::error::Error>> {
+        let registry = PluginProcessMetrics::default();
+        let directory = tempfile::tempdir_in("/tmp")?;
+        let socket = directory.path().join("p.sock");
+        let listener = UnixListener::bind(&socket)?;
+        let service = registry.clone().into_service();
+        let mut tasks = tokio::task::JoinSet::new();
+        tasks.spawn(async move {
+            let _ = Server::builder()
+                .add_service(service)
+                .serve_with_incoming(UnixListenerStream::new(listener))
+                .await;
+        });
+        Ok(Self {
+            registry,
+            _directory: directory,
+            socket: format!("unix://{}", socket.display()),
+            tasks,
+        })
+    }
+    async fn peer(&self, launch: &[u8]) -> Result<Peer, tonic::Status> {
+        let channel = Endpoint::from_shared(self.socket.clone())
+            .map_err(|error| Status::unknown(error.to_string()))?
+            .connect()
+            .await
+            .map_err(|error| Status::unknown(error.to_string()))?;
+        let mut client = plugin::plugin_metrics_client::PluginMetricsClient::new(channel);
+        let (outgoing, incoming) = mpsc::channel(1);
+        outgoing
+            .send(plugin::PluginToPipelineMetrics {
+                message: Some(Message::Attach(plugin::PluginMetricsAttach {
+                    launch_id: launch.to_vec(),
+                })),
+            })
+            .await
+            .map_err(|_| Status::unknown("peer closed"))?;
+        let requests = client
+            .stream(ReceiverStream::new(incoming))
+            .await?
+            .into_inner();
+        Ok(Peer { outgoing, requests })
+    }
+}
+impl Drop for ServerOwner {
+    fn drop(&mut self) {
+        self.tasks.abort_all();
+    }
+}
+struct Peer {
+    outgoing: mpsc::Sender<plugin::PluginToPipelineMetrics>,
+    requests: Streaming<plugin::PipelineToPluginMetrics>,
+}
+impl Peer {
+    async fn reply(&self, data: MetricsData) -> TestResult {
+        self.outgoing
+            .send(plugin::PluginToPipelineMetrics {
+                message: Some(Message::Snapshot(plugin::PluginMetricsSnapshot {
+                    metrics: data.encode_to_vec(),
+                })),
+            })
+            .await?;
+        Ok(())
+    }
+}
+fn budget() -> Deadline {
+    Deadline::start(Duration::from_secs(2))
+}
+
+#[test]
+fn snapshots_require_the_launch_identity_fixed_gauges_and_requested_names() {
+    let launch = [1; 16];
+    let mut data = sample(&launch);
+    assert!(validate(&data, &launch, &[]).is_some());
+    data.resource_metrics[0].scope_metrics[0].scope = Some(InstrumentationScope {
+        name: "example-language-sdk".into(),
+        version: "1.0.0".into(),
+        ..Default::default()
+    });
+    assert!(validate(&data, &launch, &[]).is_some());
+    assert!(validate(&data, &[2; 16], &[]).is_none());
+    assert!(validate(&data, &launch, &["tenon.plugin.cpu".into()]).is_none());
+    data.resource_metrics[0].scope_metrics[0].metrics[0].unit = "KB".into();
+    assert!(validate(&data, &launch, &[]).is_none());
+    assert!(validate(&MetricsData::default(), &launch, &[]).is_some());
+}
+
+#[tokio::test]
+async fn slow_peer_does_not_hide_fast_data_and_timeout_closes_its_stream() -> TestResult {
+    let server = ServerOwner::start()?;
+    let fast_id = [1; 16];
+    let slow_id = [2; 16];
+    let _fast = server.registry.register(
+        &fast_id,
+        vec![attribute("tenon.plugin.instance.id", "fast")],
+    );
+    let _slow = server.registry.register(&slow_id, vec![]);
+    let mut fast = server.peer(&fast_id).await?;
+    let mut slow = server.peer(&slow_id).await?;
+    let registry = server.registry.clone();
+    let collection = tokio::spawn(async move {
+        registry
+            .collect(&[], Deadline::start(Duration::from_millis(100)))
+            .await
+    });
+    assert!(fast.requests.message().await?.is_some());
+    assert!(slow.requests.message().await?.is_some());
+    // An overlapping request does not queue behind either busy connection.
+    assert!(
+        server
+            .registry
+            .collect(&[], budget())
+            .await
+            .resource_metrics
+            .is_empty()
+    );
+    fast.reply(sample(&fast_id)).await?;
+    let data = collection.await?;
+    assert_eq!(data.resource_metrics.len(), 1);
+    assert!(
+        data.resource_metrics[0]
+            .resource
+            .as_ref()
+            .ok_or("resource missing")?
+            .attributes
+            .contains(&attribute("tenon.plugin.instance.id", "fast"))
+    );
+    assert!(
+        tokio::time::timeout(Duration::from_secs(2), slow.requests.message())
+            .await??
+            .is_none()
+    );
+    // No stale response or former session can be reused by a later collection.
+    assert!(
+        server
+            .registry
+            .collect(&["tenon.queue.usage".into()], budget())
+            .await
+            .resource_metrics
+            .is_empty()
+    );
+    Ok(())
+}
+
+#[tokio::test]
+async fn cancellation_retirement_and_bad_payload_only_close_the_metrics_session() -> TestResult {
+    let server = ServerOwner::start()?;
+    let launch = [3; 16];
+    assert!(server.peer(&launch).await.is_err());
+    let registration = server.registry.register(&launch, vec![]);
+    let mut peer = server.peer(&launch).await?;
+    assert!(server.peer(&launch).await.is_err());
+    let registry = server.registry.clone();
+    let pending = tokio::spawn(async move { registry.collect(&[], budget()).await });
+    assert!(peer.requests.message().await?.is_some());
+    pending.abort();
+    let _ = pending.await;
+    assert!(
+        tokio::time::timeout(Duration::from_secs(2), peer.requests.message())
+            .await??
+            .is_none()
+    );
+    let mut peer = server.peer(&launch).await?;
+    let registry = server.registry.clone();
+    let pending = tokio::spawn(async move { registry.collect(&[], budget()).await });
+    assert!(peer.requests.message().await?.is_some());
+    peer.reply(sample(&[9; 16])).await?;
+    assert!(pending.await?.resource_metrics.is_empty());
+    assert!(peer.requests.message().await?.is_none());
+    let mut peer = server.peer(&launch).await?;
+    drop(registration);
+    assert!(
+        tokio::time::timeout(Duration::from_secs(2), peer.requests.message())
+            .await??
+            .is_none()
+    );
+    assert!(server.peer(&launch).await.is_err());
+    Ok(())
+}
+
+#[tokio::test]
+async fn unsolicited_and_oversized_snapshots_are_rejected() -> TestResult {
+    let server = ServerOwner::start()?;
+    let launch = [4; 16];
+    let _registration = server.registry.register(&launch, vec![]);
+    let mut peer = server.peer(&launch).await?;
+    peer.reply(sample(&launch)).await?;
+    assert!(
+        tokio::time::timeout(Duration::from_secs(2), peer.requests.message())
+            .await??
+            .is_none()
+    );
+    let mut peer = server.peer(&launch).await?;
+    let registry = server.registry.clone();
+    let pending = tokio::spawn(async move { registry.collect(&[], budget()).await });
+    assert!(peer.requests.message().await?.is_some());
+    peer.outgoing
+        .send(plugin::PluginToPipelineMetrics {
+            message: Some(Message::Snapshot(plugin::PluginMetricsSnapshot {
+                metrics: vec![0; MAXIMUM_MESSAGE_BYTES],
+            })),
+        })
+        .await?;
+    assert!(pending.await?.resource_metrics.is_empty());
+    assert!(peer.requests.message().await?.is_none());
+    Ok(())
+}
diff --git a/src/pipeline/plugin/mod.rs b/src/pipeline/plugin/mod.rs
index 8702911..a1010bf 100644
--- a/src/pipeline/plugin/mod.rs
+++ b/src/pipeline/plugin/mod.rs
@@ -85,3 +85,5 @@ impl Error for PluginInstanceError {
 pub(in crate::pipeline) mod test_support;
 
 pub(in crate::pipeline) use controlled_lifecycle::HandoffReadiness;
+
+pub(in crate::pipeline) mod metrics;
diff --git a/src/pipeline/reconfigure/resource_stage/data_plane.rs b/src/pipeline/reconfigure/resource_stage/data_plane.rs
index 1f0dd6d..b6e53f7 100644
--- a/src/pipeline/reconfigure/resource_stage/data_plane.rs
+++ b/src/pipeline/reconfigure/resource_stage/data_plane.rs
@@ -76,6 +76,7 @@ pub(in crate::pipeline::reconfigure) fn channel_spec(
         })
         .collect();
     FlowChannelSpec::new(
+        flow.source().as_str(),
         flow.lua_source(),
         limits,
         flow.max_record_bytes(),
diff --git a/src/pipeline/reconfigure/resource_stage/instance_launch.rs b/src/pipeline/reconfigure/resource_stage/instance_launch.rs
index 8560c56..b61c20e 100644
--- a/src/pipeline/reconfigure/resource_stage/instance_launch.rs
+++ b/src/pipeline/reconfigure/resource_stage/instance_launch.rs
@@ -110,4 +110,22 @@ pub(super) fn build_instance_launch<'a>(
         interface,
         control,
     )
+    .with_metrics_attributes(vec![
+        crate::pipeline::plugin::metrics::attribute(
+            "tenon.pipeline.id",
+            target.document().id().as_str(),
+        ),
+        crate::pipeline::plugin::metrics::attribute(
+            "tenon.plugin.instance.id",
+            instance_id.as_str(),
+        ),
+        crate::pipeline::plugin::metrics::attribute(
+            "tenon.plugin.program.name",
+            instance.program_name().as_str(),
+        ),
+        crate::pipeline::plugin::metrics::attribute(
+            "tenon.plugin.program.version",
+            instance.program_identity().exact_version().as_str(),
+        ),
+    ])
 }
diff --git a/src/pipeline/runtime/tests/mod.rs b/src/pipeline/runtime/tests/mod.rs
index 53c3faf..f0e2afa 100644
--- a/src/pipeline/runtime/tests/mod.rs
+++ b/src/pipeline/runtime/tests/mod.rs
@@ -1737,6 +1737,7 @@ fn channel_spec<'a>(
     let memory_limit = NonZeroUsize::new(TEST_MEMORY_LIMIT_BYTES)
         .ok_or_else(|| io::Error::other("Lua memory limit must be positive"))?;
     Ok(FlowChannelSpec::new(
+        "source",
         lua_source,
         ScriptVmLimits::try_new(memory_limit, TEST_CPU_TIME_LIMIT).map_err(io::Error::other)?,
         std::num::NonZeroU64::new(262_144)
diff --git a/src/runner/metrics/mod.rs b/src/runner/metrics/mod.rs
index a651428..edc4ecc 100644
--- a/src/runner/metrics/mod.rs
+++ b/src/runner/metrics/mod.rs
@@ -53,11 +53,13 @@ impl RunnerMetrics {
         } else {
             MetricsData::default()
         };
-        let pending: Vec<_> = if metrics::catalog::includes_owner(include, "pipeline") {
+        let pending: Vec<_> = if metrics::catalog::includes_owner(include, "pipeline")
+            || metrics::catalog::includes_owner(include, "plugin")
+        {
             self.connections()
                 .values()
                 .filter_map(Weak::upgrade)
-                .filter_map(|connection| PendingCollection::start(connection, include))
+                .filter_map(|connection| PendingCollection::start(connection, include, deadline))
                 .collect()
         } else {
             Vec::new()
diff --git a/src/runner/metrics/stream.rs b/src/runner/metrics/stream.rs
index 236c8ed..fb8e8c0 100644
--- a/src/runner/metrics/stream.rs
+++ b/src/runner/metrics/stream.rs
@@ -47,7 +47,11 @@ impl PendingCollection {
         clippy::expect_used,
         reason = "the session lock only transfers ownership without user code"
     )]
-    pub(super) fn start(connection: Arc<Connection>, include: &[String]) -> Option<Self> {
+    pub(super) fn start(
+        connection: Arc<Connection>,
+        include: &[String],
+        deadline: Deadline,
+    ) -> Option<Self> {
         let session = connection
             .lock()
             .expect("metrics session lock must not be poisoned")
@@ -56,6 +60,11 @@ impl PendingCollection {
             .commands
             .try_send(Ok(RunnerToPipelineMetrics {
                 include: include.to_vec(),
+                remaining_timeout_ms: deadline
+                    .remaining()
+                    .as_millis()
+                    .try_into()
+                    .unwrap_or(u64::MAX),
             }))
             .ok()?;
         Some(Self {
diff --git a/src/time/mod.rs b/src/time/mod.rs
index 62bf484..129778c 100644
--- a/src/time/mod.rs
+++ b/src/time/mod.rs
@@ -48,6 +48,12 @@ impl Deadline {
         )
     }
 
+    /// The remaining request budget without extending its deadline.
+    pub(crate) fn remaining(self) -> Duration {
+        self.timeout
+            .saturating_sub(Instant::now().saturating_duration_since(self.started_at))
+    }
+
     /// Tests the same absolute budget without constructing or polling a timer.
     pub(crate) fn has_elapsed(self) -> bool {
         Instant::now().duration_since(self.started_at) >= self.timeout
diff --git a/tests/ingress_queue_contract.rs b/tests/ingress_queue_contract.rs
index 9427ea7..8ce0ab6 100644
--- a/tests/ingress_queue_contract.rs
+++ b/tests/ingress_queue_contract.rs
@@ -28,7 +28,7 @@ use tenon_ipc::queue::{AppendDecision, DataCapacity, Header, LogicalPosition, pl
     dead_code,
     reason = "Admission properties use only the shared model capacity and FIFO operations"
 )]
-#[path = "../ipc/rust/tenon-ipc/tests/support/queue_model.rs"]
+#[path = "../sdk/rust/ipc/tests/support/queue_model.rs"]
 mod queue_model;
 use queue_model::{ModelAppendOutcome, QueueModel};
 fn parse_non_zero(value: &str) -> io::Result<NonZeroU64> {
diff --git a/tests/runner_java_archetype.rs b/tests/runner_java_archetype.rs
index 794d212..47682e1 100644
--- a/tests/runner_java_archetype.rs
+++ b/tests/runner_java_archetype.rs
@@ -389,6 +389,62 @@ fn verify_java_plugin_metrics(address: std::net::SocketAddr) -> io::Result<()> {
             }
         }
         Ok(None)
+    })?;
+    verify_java_process_resources(address, &["primary", "source"])
+}
+
+fn verify_java_process_resources(
+    address: std::net::SocketAddr,
+    expected: &[&str],
+) -> io::Result<()> {
+    wait_until(|| {
+        let response = request(
+            address,
+            "GET",
+            "/metrics?include=tenon.plugin.cpu,tenon.plugin.memory",
+            &[],
+            &[],
+        )?;
+        assert_eq!(response.status, 200);
+        let body = response.json();
+        let processes = body["processes"]
+            .as_array()
+            .ok_or_else(|| io::Error::other("Missing processes"))?;
+        let mut ids = Vec::new();
+        for process in processes {
+            assert_eq!(process["resource"]["service.name"], "tenon.plugin");
+            let metrics = process["metrics"]
+                .as_array()
+                .ok_or_else(|| io::Error::other("Missing metrics"))?;
+            if metrics.len() != 2 {
+                return Ok(None);
+            }
+            for metric in metrics {
+                let points = metric["points"]
+                    .as_array()
+                    .ok_or_else(|| io::Error::other("Missing points"))?;
+                assert_eq!(points.len(), 1);
+                if metric["name"] == "tenon.plugin.memory" {
+                    assert_eq!(metric["unit"], "By");
+                    assert!(
+                        points[0]["value"]
+                            .as_str()
+                            .and_then(|v| v.parse::<u64>().ok())
+                            .is_some_and(|v| v > 0)
+                    );
+                } else {
+                    assert_eq!(metric["name"], "tenon.plugin.cpu");
+                    assert_eq!(metric["unit"], "1");
+                }
+            }
+            ids.push(
+                process["resource"]["tenon.plugin.instance.id"]
+                    .as_str()
+                    .unwrap_or(""),
+            );
+        }
+        ids.sort_unstable();
+        Ok((ids == expected).then_some(()))
     })
 }
 
@@ -507,7 +563,7 @@ fn build_generated_java_plugins_uncached(
             "--batch-mode",
             "--no-transfer-progress",
             "-pl",
-            ".,:tenon-ipc,plugin-sdk,maven-plugin,plugin-archetype",
+            ".,:tenon-ipc,:tenon-process-metrics,plugin-sdk,maven-plugin,plugin-archetype",
             "clean",
             "install",
         ]);
@@ -663,7 +719,6 @@ fn java_build_fingerprint(workspace: &Path, classifier: &str) -> io::Result<Stri
     );
     for relative in [
         "sdk/java",
-        "ipc/java",
         "contracts/ipc",
         "contracts/source",
         "contracts/sink",
@@ -783,10 +838,12 @@ fn build_generated_project(
 }
 
 fn verify_java_release_repository(local_repository: &Path) -> io::Result<()> {
-    const RELEASE_ARTIFACTS: [&str; 3] = [
+    const RELEASE_ARTIFACTS: [&str; 5] = [
+        "tenon-ipc",
         "tenon-maven-plugin",
         "tenon-plugin-archetype",
         "tenon-plugin-sdk",
+        "tenon-process-metrics",
     ];
 
     let group_directory = local_repository.join("org/apache/bifromq/tenon");
@@ -800,7 +857,7 @@ fn verify_java_release_repository(local_repository: &Path) -> io::Result<()> {
     actual.sort_unstable();
     if actual != RELEASE_ARTIFACTS {
         return Err(io::Error::other(format!(
-            "Java release repository must contain exactly three public artifacts; observed {actual:?}"
+            "Java release repository must contain exactly five public artifacts; observed {actual:?}"
         )));
     }
 
@@ -812,14 +869,21 @@ fn verify_java_release_repository(local_repository: &Path) -> io::Result<()> {
                 .join(version)
                 .join(format!("{artifact}-{version}.pom")),
         )?;
-        if pom.contains("<parent>")
-            || pom.contains("tenon-java-build")
-            || pom.contains("<artifactId>tenon-ipc</artifactId>")
-        {
+        if pom.contains("<parent>") || pom.contains("tenon-java-build") {
             return Err(io::Error::other(format!(
                 "Published {artifact} POM still depends on a private Java build module"
             )));
         }
+        if pom.contains("<classifier>tests</classifier>") {
+            return Err(io::Error::other(format!(
+                "Published {artifact} POM still depends on test fixtures"
+            )));
+        }
+        if artifact == "tenon-plugin-sdk" && !pom.contains("<artifactId>tenon-ipc</artifactId>") {
+            return Err(io::Error::other(
+                "Published SDK POM must retain its IPC dependency",
+            ));
+        }
     }
     Ok(())
 }
diff --git a/tests/runner_java_archetype/topology.rs b/tests/runner_java_archetype/topology.rs
index c0d4525..576d35b 100644
--- a/tests/runner_java_archetype/topology.rs
+++ b/tests/runner_java_archetype/topology.rs
@@ -84,6 +84,7 @@ pub(super) fn run_dual_interface_routes(bundle: &[u8]) -> io::Result<()> {
             .all(|instance| instance["state"] == "running")
             .then_some(()))
     })?;
+    verify_java_process_resources(address, &["A", "B"])?;
     runner.terminate()?;
     assert_eq!(messages(&output_a)?, ["from-A", "from-B"]);
     assert_eq!(messages(&output_b)?, ["from-A"]);
diff --git a/tools/validate-rust-test-layout.py b/tools/validate-rust-test-layout.py
index 36b4b28..950fcb4 100644
--- a/tools/validate-rust-test-layout.py
+++ b/tools/validate-rust-test-layout.py
@@ -27,7 +27,8 @@ import sys
 
 REPOSITORY_ROOT = Path(__file__).resolve().parent.parent
 SOURCE_ROOTS = [REPOSITORY_ROOT / "src",
-                REPOSITORY_ROOT / "ipc/rust/tenon-ipc/src",
+                REPOSITORY_ROOT / "sdk/rust/ipc/src",
+                REPOSITORY_ROOT / "sdk/rust/process-metrics/src",
                 REPOSITORY_ROOT / "sdk/rust/plugin-sdk/src",
                 REPOSITORY_ROOT / "sdk/rust/cargo-tenon/src"]
 ALLOWED_TEST_MODULE = re.compile(
diff --git a/tools/verify-rust-scaffold.py b/tools/verify-rust-scaffold.py
index a3fec09..8bbfd63 100644
--- a/tools/verify-rust-scaffold.py
+++ b/tools/verify-rust-scaffold.py
@@ -58,14 +58,15 @@ def messages(arguments, **kwargs):
 def verify(directory):
     workspace = json.loads(run(["cargo", "metadata", "--no-deps", "--format-version=1", "--locked"]))
     packages = [next(package for package in workspace["packages"] if package["name"] == name)
-                for name in ["tenon-ipc", "tenon-plugin-sdk"]]
+                for name in ["tenon-ipc", "tenon-process-metrics", "tenon-plugin-sdk"]]
     patch = []
     for package in packages:
         # Resolve the unpublished dependency at its locked workspace path while
-        # packaging. Author projects below use only the two extracted archives.
-        package_patch = [] if package["name"] == "tenon-ipc" else [
-            "--config", f"patch.crates-io.tenon-ipc.path={json.dumps(str(Path(packages[0]['manifest_path']).parent))}"
-        ]
+        # packaging. Author projects below use only the extracted archives.
+        package_patch = []
+        for dependency in packages:
+            if dependency["name"] != package["name"]:
+                package_patch += ["--config", f"patch.crates-io.{dependency['name']}.path={json.dumps(str(Path(dependency['manifest_path']).parent))}"]
         run(["cargo", "package", "-p", package["name"], "--registry", "crates-io",
              "--locked", "--no-verify", "--allow-dirty", *package_patch])
         archive = Path(workspace["target_directory"]) / "package" / f"{package['name']}-{package['version']}.crate"
@@ -393,6 +394,7 @@ def verify_runner(runner, bundles, scenario, *, chain_programs=("source", "sink"
                                 break
                             assert time.monotonic() < deadline, pipeline
                             time.sleep(0.01)
+                    verify_plugin_metrics(request, documents)
                     pipeline_launch_ids = wait_for_pipeline_records(
                         request, documents, "drained" if scenario in ("drained", "runner-lost") else "pending")
                     if scenario not in ("drained", "runner-lost"):
@@ -580,6 +582,36 @@ def verify_rejected_uploads(request, bundle):
     print("PASS: invalid and foreign-platform uploads rejected without publishing a Program", flush=True)
 
 
+def verify_plugin_metrics(request, documents):
+    deadline = time.monotonic() + 30
+    while True:
+        status, _, body = request("GET", "/metrics?include=tenon.plugin.cpu,tenon.plugin.memory")
+        assert status == 200, (status, body)
+        observed = {}
+        for process in json.loads(body)["processes"]:
+            resource = process["resource"]
+            assert resource["service.name"] == "tenon.plugin", resource
+            identity = (resource["tenon.pipeline.id"], resource["tenon.plugin.instance.id"])
+            assert identity not in observed, "One shared owner must produce only one process snapshot"
+            metrics = {metric["name"]: metric for metric in process["metrics"]}
+            if set(metrics) != {"tenon.plugin.cpu", "tenon.plugin.memory"}:
+                continue
+            assert metrics["tenon.plugin.cpu"]["unit"] == "1"
+            assert float(metrics["tenon.plugin.cpu"]["points"][0]["value"]) >= 0
+            assert int(metrics["tenon.plugin.memory"]["points"][0]["value"]) > 0
+            assert resource["tenon.plugin.program.version"] == "0.1.0"
+            assert resource["service.instance.id"]
+            observed[identity] = resource["service.instance.id"]
+        expected = {("rust-chain", "source"), ("rust-chain", "sink"), ("rust-loop", "shared")}
+        if set(observed) == expected:
+            status, _, body = request("GET", "/metrics?format=prometheus&include=tenon.plugin.memory")
+            assert status == 200 and b"tenon_plugin_memory_bytes" in body, (status, body)
+            print("PASS: three real SDK process snapshots, shared owner counted once, plugin-only JSON and Prometheus", flush=True)
+            return
+        assert time.monotonic() < deadline, (observed, body)
+        time.sleep(0.01)
+
+
 def wait_for_pipeline_records(request, documents, completion_state):
     names = ["tenon.flow.input.records", "tenon.flow.egress.records",
              "tenon.flow.completion.records", "tenon.queue.usage"]
@@ -605,6 +637,10 @@ def wait_for_pipeline_records(request, documents, completion_state):
                         or completion[0]["attributes"]["result"] != "ok"):
                     continue
             queues = metrics.get("tenon.queue.usage", [])
+            for point in queues:
+                kind = point["attributes"]["tenon.queue.kind"]
+                expected_instance = "shared" if identity == "rust-loop" else ("sink" if kind == "egress" else "source")
+                assert point["attributes"]["tenon.plugin.instance.id"] == expected_instance
             if (len(queues) == 3
                     and {point["attributes"]["tenon.queue.kind"] for point in queues}
                     == {"submission", "completion", "egress"}