Skip to content

Commit 3410b29

Browse files
GlqEasonguolq1
authored andcommitted
feat: Add process.network.connection.count metric definition
Adds a new metric that reports the number of established network connections per process, grouped by server address and port. - Metric type: updowncounter, unit: {connection} - Attributes: server.address (recommended), server.port (recommended) - Entity: process - Stability: development Assisted-by: Claude Opus 4.8
1 parent b51e2a6 commit 3410b29

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is used by the changelog generator.
2+
# For more info, see https://github.com/open-telemetry/weaver/releases
3+
4+
change_type: new_component
5+
component: process
6+
note: Add process.network.connection.count metric definition
7+
issues: []
8+
subtext: |
9+
Adds a new metric that reports the number of established network connections
10+
per process, grouped by server address and port.

docs/system/process-metrics.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ metrics](/docs/runtime/README.md#metrics).
2424
- [Metric: `process.memory.virtual`](#metric-processmemoryvirtual)
2525
- [Metric: `process.disk.io`](#metric-processdiskio)
2626
- [Metric: `process.network.io`](#metric-processnetworkio)
27+
- [Metric: `process.network.connection.count`](#metric-processnetworkconnectioncount)
2728
- [Metric: `process.thread.count`](#metric-processthreadcount)
2829
- [Metric: `process.unix.file_descriptor.count`](#metric-processunixfile_descriptorcount)
2930
- [Metric: `process.windows.handle.count`](#metric-processwindowshandlecount)
@@ -222,6 +223,31 @@ This metric is [recommended][MetricRecommended].
222223
<!-- END AUTOGENERATED TEXT -->
223224
<!-- endsemconv -->
224225

226+
### Metric: `process.network.connection.count`
227+
228+
This metric is [opt-in][MetricOptIn].
229+
230+
<!-- semconv metric.process.network.connection.count -->
231+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
232+
<!-- see templates/registry/markdown/snippet.md.j2 -->
233+
<!-- prettier-ignore-start -->
234+
235+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
236+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
237+
| `process.network.connection.count` | UpDownCounter | `{connection}` | The number of network connections established by the process, grouped by the remote endpoint. | ![Development](https://img.shields.io/badge/-development-blue) | [`process`](/docs/registry/entities/process.md#process) |
238+
239+
**Attributes:**
240+
241+
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
242+
| --- | --- | --- | --- | --- | --- |
243+
| [`server.address`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. | `example.com`; `10.1.2.80` |
244+
| [`server.port`](/docs/registry/attributes/server.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | int | Server port number. | `80`; `443` |
245+
246+
---
247+
<!-- prettier-ignore-end -->
248+
<!-- END AUTOGENERATED TEXT -->
249+
<!-- endsemconv -->
250+
225251
### Metric: `process.thread.count`
226252

227253
This metric is [recommended][MetricRecommended].

model/process/metrics.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,21 @@ groups:
195195
unit: "s"
196196
entity_associations:
197197
- process
198+
199+
- id: metric.process.network.connection.count
200+
type: metric
201+
metric_name: process.network.connection.count
202+
annotations:
203+
code_generation:
204+
metric_value_type: int
205+
stability: development
206+
brief: "The number of network connections established by the process, grouped by the remote endpoint."
207+
instrument: updowncounter
208+
unit: "{connection}"
209+
attributes:
210+
- ref: server.address
211+
requirement_level: recommended
212+
- ref: server.port
213+
requirement_level: recommended
214+
entity_associations:
215+
- process

0 commit comments

Comments
 (0)