required-attributes
Enforce required attributes by span type.
Rule Detailsβ
All instrumentations must populate the required attributes by span type based on the semantic conventions.
The following OTel semantic conventions for span required attributes are defined:
HTTP spans:β
- http.method
If span kind is "server"
, the required attributes include:
- http.target
- http.scheme
- net.host.name
If span kind is "client"
, the required attributes include:
- http.url
- net.peer.name
Database spans:β
- db.system
RPC spans:β
- rpc.system
- neet.peer.name
Messaging spans:β
- messaging.system
- messaging.operation
FaaS spans:β
If span kind is "server"
, the required attributes include:
- faas.trigger
If span kind is "client"
, the required attributes include:
- faas.invoked_name
- faas.invoked_provider
Optionsβ
This rule has the following options:
"error"
requires span attributes to follow the OTel semantic convention"disabled"
disables the span required attributes verification"warning"
verifies required attributes to follow the OTel semantic convention but does not impact the analyzer score
When Not To Use Itβ
If you donβt want to enforce OTel span required attributes, donβt enable this rule.