Skip to content

fix(semconv): use Observable instrument types for process metrics#8026

Open
Br1an67 wants to merge 1 commit intoopen-telemetry:mainfrom
Br1an67:fix/issue-7342-observable-metrics
Open

fix(semconv): use Observable instrument types for process metrics#8026
Br1an67 wants to merge 1 commit intoopen-telemetry:mainfrom
Br1an67:fix/issue-7342-observable-metrics

Conversation

@Br1an67
Copy link

@Br1an67 Br1an67 commented Mar 9, 2026

Fixes #7342

Summary

Update the weaver.yaml instrument map to use Observable variants for all process metrics. This allows these metrics to be properly instrumented using callback functions, which is the recommended pattern for system-level metrics that are read from /proc or similar sources.

The OpenTelemetry semantic conventions recommend using Observable instruments for process metrics since they represent values that are typically read from the operating system at observation time rather than being incrementally updated.

Changes

  • Added 11 process metrics to the instrument text map in semconv/templates/registry/go/weaver.yaml
  • All process metrics now use Observable variants:
    • process.context_switches: Int64ObservableCounter
    • process.cpu.utilization: Float64ObservableGauge
    • process.disk.io: Int64ObservableCounter
    • process.memory.usage: Int64ObservableUpDownCounter
    • process.memory.virtual: Int64ObservableUpDownCounter
    • process.network.io: Int64ObservableCounter
    • process.paging.faults: Int64ObservableCounter
    • process.thread.count: Int64ObservableUpDownCounter
    • process.unix.file_descriptor.count: Int64ObservableUpDownCounter
    • process.uptime: Float64ObservableGauge
    • process.windows.handle.count: Int64ObservableUpDownCounter

Testing

  • Verified YAML syntax is valid
  • The change follows the existing pattern used for other metrics (e.g., go.*, system.*)
semconv/templates/registry/go/weaver.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

Update the weaver.yaml instrument map to use Observable variants
for all process metrics. This allows these metrics to be properly
instrumented using callback functions, which is the recommended
pattern for system-level metrics that are read from /proc or
similar sources.

Metrics updated:
- process.context_switches: Int64ObservableCounter
- process.cpu.utilization: Float64ObservableGauge
- process.disk.io: Int64ObservableCounter
- process.memory.usage: Int64ObservableUpDownCounter
- process.memory.virtual: Int64ObservableUpDownCounter
- process.network.io: Int64ObservableCounter
- process.paging.faults: Int64ObservableCounter
- process.thread.count: Int64ObservableUpDownCounter
- process.unix.file_descriptor.count: Int64ObservableUpDownCounter
- process.uptime: Float64ObservableGauge
- process.windows.handle.count: Int64ObservableUpDownCounter

Signed-off-by: root <root@C20251020184286.local>
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 9, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Br1an67 / name: Br1an (222cf50)

@dmathieu dmathieu added the blocked:CLA Waiting on CLA to be signed before progress can be made label Mar 9, 2026
@Br1an67
Copy link
Author

Br1an67 commented Mar 18, 2026

/easycla

@Br1an67 Br1an67 force-pushed the fix/issue-7342-observable-metrics branch from 8545623 to 222cf50 Compare March 18, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked:CLA Waiting on CLA to be signed before progress can be made

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update all metric types in processconv to be Observable

2 participants