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.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.net.countCounter{record}Reports the count of kernel NFS client TCP segments and UDP datagrams handled. [1]Developmenthost

[1]: Linux: this metric is taken from the Linux kernel’s svc_stat.netudpcnt and svc_stat.nettcpcnt

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
network.transportStableRecommendedstringOSI transport layer or inter-process communication method. [1]tcp; udp

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

ValueDescriptionStability
pipeNamed or anonymous pipe.Stable
quicQUICStable
tcpTCPStable
udpUDPStable
unixUnix domain socketStable

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

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.net.tcp.connection.acceptedCounter{connection}Reports the count of kernel NFS client TCP connections accepted. [1]Developmenthost

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

Metric: nfs.client.rpc.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.rpc.countCounter{request}Reports the count of kernel NFS client RPCs sent, regardless of whether they’re accepted/rejected by the server. [1]Developmenthost

[1]: Linux: this metric is taken from the Linux kernel’s svc_stat.rpccnt

Metric: nfs.client.rpc.retransmit.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.rpc.retransmit.countCounter{retransmit}Reports the count of kernel NFS client RPC retransmits. [1]Developmenthost

[1]: Linux: this metric is taken from the Linux kernel’s svc_stat.rpcretrans

Metric: nfs.client.rpc.authrefresh.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.rpc.authrefresh.countCounter{authrefresh}Reports the count of kernel NFS client RPC authentication refreshes. [1]Developmenthost

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

Metric: nfs.client.operation.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.operation.countCounter{operation}Reports the count of kernel NFSv4+ client operations.Developmenthost

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
nfs.operation.nameDevelopmentRecommendedstringNFSv4+ operation name.OPEN; READ; GETATTR
onc_rpc.versionDevelopmentRecommendedintONC/Sun RPC program version.

Metric: nfs.client.procedure.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.client.procedure.countCounter{procedure}Reports the count of kernel NFS client procedures.Developmenthost

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
onc_rpc.procedure.nameDevelopmentRecommendedstringONC/Sun RPC procedure name.OPEN; READ; GETATTR
onc_rpc.versionDevelopmentRecommendedintONC/Sun RPC program version.

NFSD metrics

Metric: nfs.server.repcache.requests

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.repcache.requestsCounter{request}Reports the kernel NFS server reply cache request count by cache hit status.Developmenthost

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
nfs.server.repcache.statusDevelopmentRecommendedstringLinux: one of “hit” (NFSD_STATS_RC_HITS), “miss” (NFSD_STATS_RC_MISSES), or “nocache” (NFSD_STATS_RC_NOCACHE – uncacheable)hit

Metric: nfs.server.fh.stale.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.fh.stale.countCounter{fh}Reports the count of kernel NFS server stale file handles. [1]Developmenthost

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

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.ioCounterByReports the count of kernel NFS server bytes returned to receive and transmit (read and write) requests. [1]Developmenthost

[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

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
network.io.directionDevelopmentRecommendedstringThe network IO operation direction.transmit

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.

ValueDescriptionStability
receivereceiveDevelopment
transmittransmitDevelopment

Metric: nfs.server.thread.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.thread.countUpDownCounter{thread}Reports the count of kernel NFS server available threads. [1]Developmenthost

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

Metric: nfs.server.net.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.net.countCounter{record}Reports the count of kernel NFS server TCP segments and UDP datagrams handled. [1]Developmenthost

[1]: Linux: this metric is taken from the Linux kernel’s svc_stat.nettcpcnt and svc_stat.netudpcnt

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
network.transportStableRecommendedstringOSI transport layer or inter-process communication method. [1]tcp; udp

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

ValueDescriptionStability
pipeNamed or anonymous pipe.Stable
quicQUICStable
tcpTCPStable
udpUDPStable
unixUnix domain socketStable

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

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.net.tcp.connection.acceptedCounter{connection}Reports the count of kernel NFS server TCP connections accepted. [1]Developmenthost

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

Metric: nfs.server.rpc.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.rpc.countCounter{request}Reports the count of kernel NFS server RPCs handled. [1]Developmenthost

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

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
error.typeStableRecommendedstringDescribes a class of error the operation ended with. [1]timeout; java.net.UnknownHostException; server_certificate_invalid; 500

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

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

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.operation.countCounter{operation}Reports the count of kernel NFSv4+ server operations.Developmenthost

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
nfs.operation.nameDevelopmentRecommendedstringNFSv4+ operation name.OPEN; READ; GETATTR
onc_rpc.versionDevelopmentRecommendedintONC/Sun RPC program version.

Metric: nfs.server.procedure.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
nfs.server.procedure.countCounter{procedure}Reports the count of kernel NFS server procedures.Developmenthost

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
onc_rpc.procedure.nameDevelopmentRecommendedstringONC/Sun RPC procedure name.OPEN; READ; GETATTR
onc_rpc.versionDevelopmentRecommendedintONC/Sun RPC program version.