Conversation
|
Related to: DataDog/datadog-agent#5311 |
| device_name = device_name.strip('\\').lower() | ||
|
|
||
| tags.append('device:{}'.format(device_name)) | ||
| tags.append('device_name:{}'.format(os.path.basename(device_name))) |
There was a problem hiding this comment.
I think the device_name tag should be consistent and always be the part.device L90. But the tag device should be retrocompatible and follow the use_mount option.
This adds a new tag which only contains the base part of the device, for compatibility with iostats check.
10498c4 to
764edad
Compare
kbogtob
left a comment
There was a problem hiding this comment.
LGTM for 7.20! Thanks a lot.
Codecov Report
|
| IGNORE_CASE = re.I if platform.system() == 'Windows' else 0 | ||
|
|
||
|
|
||
| def _base_device_name(device): |
There was a problem hiding this comment.
Let's invert the conditional to choose a function def
There was a problem hiding this comment.
Sorry I don't understand what you mean.
There was a problem hiding this comment.
The OS will never change, so choose logic once at load time
There was a problem hiding this comment.
In fact, re-use the above if platform.system() == 'Windows'
This adds a new tag which only contains the base part of the device, for
compatibility with iostats check.