-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Proposal
Rule ID: MET-nnn
Description: Metrics contain only resource attributes that are useful when aggregating events.
Rationale: Metrics are aggregations of events over time. Resource attributes contain a mix of identifying attributes and metadata attributes (something that is being handled at the entities SIG). For metrics, it's recommended to keep only the resource attributes that would be used in aggregations, either at the storage level (typically as a time-series database) or query (like in columnar stores). For example, the following resource attributes would certainly not provide value for metrics payloads:
- process.runtime.description
- process.command_args
- process.command_line
- host.ip (this contains a list of IPs from the host that generated the telemetry)
- host.mac (this contains the list of mac addresses)
- os.description (when this is collected, there are typically other metadata emitted that can be used in this place)
Here's an example of resource attributes from the OTel Demo, Ad Service
It's worth noting that those attributes might make sense for spans and logs, just not so much for metrics.
Target: Metric
Criteria: Resource attributes for metrics do not include the following attributes:
- process.runtime.description
- process.command_args
- process.command_line
- host.ip (this contains a list of IPs from the host that generated the telemetry)
- host.mac (this contains the list of mac addresses)
- os.description (when this is collected, there are typically other metadata emitted that can be used in this place)
Impact: Normal