func getDeviceKey()

in remappers/hostmetrics/filesystem.go [140:157]


func getDeviceKey(dp pmetric.NumberDataPoint) (key deviceKey, ok bool) {
	device, ok := dp.Attributes().Get("device")
	if !ok {
		return
	}
	mpoint, ok := dp.Attributes().Get("mountpoint")
	if !ok {
		return
	}
	fstype, ok := dp.Attributes().Get("type")
	if !ok {
		return
	}

	key = deviceKey{device: device.Str(), mpoint: mpoint.Str(), fstype: fstype.Str()}

	return
}