You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug or just an unusual default behavior with maybe unintended consequences.
When asking Chef to tag a node, the default behavior for the chef-datadog cookbook is to prefix this tag with tag: before it is submitted to DD. A tag like chef-version:1.0.0 turns into tag:chef-version:1.0.0 when it reaches DD.
This causes issues searching and filtering hosts in DD by tag (concept), because the tag key is the string literal tag, while the value of the tag is chef-version:1.0.0. For example, when you tell DD you want to group by a tag key, what you get in the dropdown list is tag, not chef-version.
This UI behavior makes sense if the tag is split by the first : separator into key and value, which is how one would expect the split to happen.
Describe what you expected:
It's clear from attributes/default.rb that I can override this behavior. What's less clear is why this prefix is the default? I feel like I'm missing something obvious about the benefit of leaving the behavior as is.
Is there a downside or a hidden gotcha to setting the prefix to empty string?
Environment details (Operating System, Cloud provider, etc):
Rocky 9 Linux, AWS but not specifically relevant.
Describe what happened:
I'm not sure if this is a bug or just an unusual default behavior with maybe unintended consequences.
When asking Chef to tag a node, the default behavior for the chef-datadog cookbook is to prefix this tag with
tag:
before it is submitted to DD. A tag likechef-version:1.0.0
turns intotag:chef-version:1.0.0
when it reaches DD.This causes issues searching and filtering hosts in DD by tag (concept), because the tag key is the string literal
tag
, while the value of the tag ischef-version:1.0.0
. For example, when you tell DD you want to group by a tag key, what you get in the dropdown list istag
, notchef-version
.This UI behavior makes sense if the tag is split by the first
:
separator into key and value, which is how one would expect the split to happen.Describe what you expected:
It's clear from attributes/default.rb that I can override this behavior. What's less clear is why this prefix is the default? I feel like I'm missing something obvious about the benefit of leaving the behavior as is.
Is there a downside or a hidden gotcha to setting the prefix to empty string?
Steps to reproduce the issue:
Set a tag on your node, for example in a recipe:
As per the behavior described in the attributes file, this will be prefixed by
tag:
The text was updated successfully, but these errors were encountered: