# Semantic conventions for NFS metrics **Status**: [Development][DocumentStatus] This document describes instruments and attributes for NFS and NFSD metrics. - [NFS metrics](#nfs-metrics) - [Metric: `nfs.client.net.count`](#metric-nfsclientnetcount) - [Metric: `nfs.client.net.tcp.connection.accepted`](#metric-nfsclientnettcpconnectionaccepted) - [Metric: `nfs.client.rpc.count`](#metric-nfsclientrpccount) - [Metric: `nfs.client.rpc.retransmit.count`](#metric-nfsclientrpcretransmitcount) - [Metric: `nfs.client.rpc.authrefresh.count`](#metric-nfsclientrpcauthrefreshcount) - [Metric: `nfs.client.operation.count`](#metric-nfsclientoperationcount) - [Metric: `nfs.client.procedure.count`](#metric-nfsclientprocedurecount) - [NFSD metrics](#nfsd-metrics) - [Metric: `nfs.server.repcache.requests`](#metric-nfsserverrepcacherequests) - [Metric: `nfs.server.fh.stale.count`](#metric-nfsserverfhstalecount) - [Metric: `nfs.server.io`](#metric-nfsserverio) - [Metric: `nfs.server.thread.count`](#metric-nfsserverthreadcount) - [Metric: `nfs.server.net.count`](#metric-nfsservernetcount) - [Metric: `nfs.server.net.tcp.connection.accepted`](#metric-nfsservernettcpconnectionaccepted) - [Metric: `nfs.server.rpc.count`](#metric-nfsserverrpccount) - [Metric: `nfs.server.operation.count`](#metric-nfsserveroperationcount) - [Metric: `nfs.server.procedure.count`](#metric-nfsserverprocedurecount) ## NFS metrics ### Metric: `nfs.client.net.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.net.count` | Counter | `{record}` | Reports the count of kernel NFS client TCP segments and UDP datagrams handled. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.netudpcnt and svc_stat.nettcpcnt | 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) | ### Metric: `nfs.client.net.tcp.connection.accepted` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.net.tcp.connection.accepted` | Counter | `{connection}` | Reports the count of kernel NFS client TCP connections accepted. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn ### Metric: `nfs.client.rpc.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.rpc.count` | Counter | `{request}` | Reports the count of kernel NFS client RPCs sent, regardless of whether they're accepted/rejected by the server. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.rpccnt ### Metric: `nfs.client.rpc.retransmit.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.rpc.retransmit.count` | Counter | `{retransmit}` | Reports the count of kernel NFS client RPC retransmits. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.rpcretrans ### Metric: `nfs.client.rpc.authrefresh.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.rpc.authrefresh.count` | Counter | `{authrefresh}` | Reports the count of kernel NFS client RPC authentication refreshes. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.rpcauthrefresh ### Metric: `nfs.client.operation.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.operation.count` | Counter | `{operation}` | Reports the count of kernel NFSv4+ client operations. | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`nfs.operation.name`](/docs/registry/attributes/nfs.md) | string | NFSv4+ operation name. | `OPEN`; `READ`; `GETATTR` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`onc_rpc.version`](/docs/registry/attributes/onc-rpc.md) | int | ONC/Sun RPC program version. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | ### Metric: `nfs.client.procedure.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.client.procedure.count` | Counter | `{procedure}` | Reports the count of kernel NFS client procedures. | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`onc_rpc.procedure.name`](/docs/registry/attributes/onc-rpc.md) | string | ONC/Sun RPC procedure name. | `OPEN`; `READ`; `GETATTR` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`onc_rpc.version`](/docs/registry/attributes/onc-rpc.md) | int | ONC/Sun RPC program version. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | ## NFSD metrics ### Metric: `nfs.server.repcache.requests` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.repcache.requests` | Counter | `{request}` | Reports the kernel NFS server reply cache request count by cache hit status. | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`nfs.server.repcache.status`](/docs/registry/attributes/nfs.md) | string | Linux: one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable) | `hit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | ### Metric: `nfs.server.fh.stale.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.fh.stale.count` | Counter | `{fh}` | Reports the count of kernel NFS server stale file handles. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel NFSD_STATS_FH_STALE counter in the nfsd_net struct ### Metric: `nfs.server.io` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.io` | Counter | `By` | Reports the count of kernel NFS server bytes returned to receive and transmit (read and write) requests. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel NFSD_STATS_IO_READ and NFSD_STATS_IO_WRITE counters in the nfsd_net struct | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.io.direction`](/docs/registry/attributes/network.md) | string | The network IO operation direction. | `transmit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | --- `network.io.direction` 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 | |---|---|---| | `receive` | receive | ![Development](https://img.shields.io/badge/-development-blue) | | `transmit` | transmit | ![Development](https://img.shields.io/badge/-development-blue) | ### Metric: `nfs.server.thread.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.thread.count` | UpDownCounter | `{thread}` | Reports the count of kernel NFS server available threads. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel nfsd_th_cnt variable ### Metric: `nfs.server.net.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.net.count` | Counter | `{record}` | Reports the count of kernel NFS server TCP segments and UDP datagrams handled. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.nettcpcnt and svc_stat.netudpcnt ### Metric: `nfs.server.net.tcp.connection.accepted` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.net.tcp.connection.accepted` | Counter | `{connection}` | Reports the count of kernel NFS server TCP connections accepted. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn ### Metric: `nfs.server.rpc.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.rpc.count` | Counter | `{request}` | Reports the count of kernel NFS server RPCs handled. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | **[1]:** Linux: this metric is taken from the Linux kernel's svc_stat.rpccnt, the count of good RPCs. This metric can have an error.type of "format", "auth", or "client" for svc_stat.badfmt, svc_stat.badauth, and svc_stat.badclnt. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`error.type`](/docs/registry/attributes/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1] `error.type`:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality. When `error.type` is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used. Instrumentations SHOULD document the list of errors they report. The cardinality of `error.type` within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for `error.type` to have high cardinality at query time when no additional filters are applied. If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it's RECOMMENDED to: - Use a domain-specific attribute - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. --- `error.type` 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 | |---|---|---| | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | ### Metric: `nfs.server.operation.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.operation.count` | Counter | `{operation}` | Reports the count of kernel NFSv4+ server operations. | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`nfs.operation.name`](/docs/registry/attributes/nfs.md) | string | NFSv4+ operation name. | `OPEN`; `READ`; `GETATTR` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`onc_rpc.version`](/docs/registry/attributes/onc-rpc.md) | int | ONC/Sun RPC program version. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | ### Metric: `nfs.server.procedure.count` This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | | -------- | --------------- | ----------- | -------------- | --------- | ------ | | `nfs.server.procedure.count` | Counter | `{procedure}` | Reports the count of kernel NFS server procedures. | ![Development](https://img.shields.io/badge/-development-blue) | [`host`](/docs/registry/entities/host.md#host) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`onc_rpc.procedure.name`](/docs/registry/attributes/onc-rpc.md) | string | ONC/Sun RPC procedure name. | `OPEN`; `READ`; `GETATTR` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`onc_rpc.version`](/docs/registry/attributes/onc-rpc.md) | int | ONC/Sun RPC program version. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status