diff --git a/.chloggen/nfs-servernetcount-add-attribute.yaml b/.chloggen/nfs-servernetcount-add-attribute.yaml new file mode 100644 index 0000000000..6cfdcbbdb6 --- /dev/null +++ b/.chloggen/nfs-servernetcount-add-attribute.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: nfs + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "nfs/metrics.yaml: nfs.server.net.count: add missing network.transport attribute. Implementation not merged, so not a breaking change." + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [39978] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/nfs/nfs-metrics.md b/docs/nfs/nfs-metrics.md index 6037e25fd2..9eb07ba349 100644 --- a/docs/nfs/nfs-metrics.md +++ b/docs/nfs/nfs-metrics.md @@ -337,6 +337,28 @@ This metric is [recommended][MetricRecommended]. **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.nettcpcnt and svc_stat.netudpcnt +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`network.transport`](/docs/registry/attributes/network.md) | string | [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `udp` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | + +**[1] `network.transport`:** The value SHOULD be normalized to lowercase. + +Consider always setting the transport when setting a port number, since +a port number is ambiguous without knowing the transport. For example +different processes could be listening on TCP port 12345 and UDP port 12345. + +--- + +`network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `quic` | QUIC | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `tcp` | TCP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `udp` | UDP | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | +| `unix` | Unix domain socket | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | + diff --git a/model/nfs/metrics.yaml b/model/nfs/metrics.yaml index 82cd966bf0..b67f986875 100644 --- a/model/nfs/metrics.yaml +++ b/model/nfs/metrics.yaml @@ -147,6 +147,8 @@ groups: note: | Linux: this metric is taken from the Linux kernel's svc_stat.nettcpcnt and svc_stat.netudpcnt instrument: counter + attributes: + - ref: network.transport unit: "{record}" entity_associations: - host