semantic-conventions/docs/nfs/nfs-metrics.md

24 KiB

Semantic conventions for NFS metrics

Status: Development

This document describes instruments and attributes for NFS and NFSD metrics.

NFS metrics

Metric: nfs.client.net.count

This metric is recommended.

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 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 Stability
network.transport string OSI transport layer or inter-process communication method. [1] tcp; udp Recommended Stable

[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
quic QUIC Stable
tcp TCP Stable
udp UDP Stable
unix Unix domain socket Stable

Metric: nfs.client.net.tcp.connection.accepted

This metric is recommended.

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 host

[1]: Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn

Metric: nfs.client.rpc.count

This metric is recommended.

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 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.

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 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.

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 host

[1]: Linux: this metric is taken from the Linux kernel's svc_stat.rpcauthrefresh

Metric: nfs.client.operation.count

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability Entity Associations
nfs.client.operation.count Counter {operation} Reports the count of kernel NFSv4+ client operations. Development host
Attribute Type Description Examples Requirement Level Stability
nfs.operation.name string NFSv4+ operation name. OPEN; READ; GETATTR Recommended Development
onc_rpc.version int ONC/Sun RPC program version. Recommended Development

Metric: nfs.client.procedure.count

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability Entity Associations
nfs.client.procedure.count Counter {procedure} Reports the count of kernel NFS client procedures. Development host
Attribute Type Description Examples Requirement Level Stability
onc_rpc.procedure.name string ONC/Sun RPC procedure name. OPEN; READ; GETATTR Recommended Development
onc_rpc.version int ONC/Sun RPC program version. Recommended Development

NFSD metrics

Metric: nfs.server.repcache.requests

This metric is recommended.

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 host
Attribute Type Description Examples Requirement Level Stability
nfs.server.repcache.status string Linux: one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable) hit Recommended Development

Metric: nfs.server.fh.stale.count

This metric is recommended.

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 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.

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 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 Stability
network.io.direction string The network IO operation direction. transmit Recommended Development

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
transmit transmit Development

Metric: nfs.server.thread.count

This metric is recommended.

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 host

[1]: Linux: this metric is taken from the Linux kernel nfsd_th_cnt variable

Metric: nfs.server.net.count

This metric is recommended.

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 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.

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 host

[1]: Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn

Metric: nfs.server.rpc.count

This metric is recommended.

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 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 Stability
error.type string Describes a class of error the operation ended with. [1] timeout; java.net.UnknownHostException; server_certificate_invalid; 500 Recommended Stable

[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

Metric: nfs.server.operation.count

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability Entity Associations
nfs.server.operation.count Counter {operation} Reports the count of kernel NFSv4+ server operations. Development host
Attribute Type Description Examples Requirement Level Stability
nfs.operation.name string NFSv4+ operation name. OPEN; READ; GETATTR Recommended Development
onc_rpc.version int ONC/Sun RPC program version. Recommended Development

Metric: nfs.server.procedure.count

This metric is recommended.

Name Instrument Type Unit (UCUM) Description Stability Entity Associations
nfs.server.procedure.count Counter {procedure} Reports the count of kernel NFS server procedures. Development host
Attribute Type Description Examples Requirement Level Stability
onc_rpc.procedure.name string ONC/Sun RPC procedure name. OPEN; READ; GETATTR Recommended Development
onc_rpc.version int ONC/Sun RPC program version. Recommended Development