-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[receiver_creator] add receiver-specific resource attributes #11766
[receiver_creator] add receiver-specific resource attributes #11766
Conversation
586974f
to
4056dec
Compare
4056dec
to
694b6db
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
694b6db
to
4ad5d44
Compare
@Aneurysm9 and @dmitryax, mind taking a look when possible? |
if expr == "" { | ||
delete(attrs, attr) | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have similar functionality where we use nil
to delete attributes. Should we probably apply the same approach here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing implementation assumes empty strings aren't desirable for attribute values and these changes are in line with that precedent. I can see how this may be overly opinionated as is but think it would be a breaking change to adopt. If we want it I'd prefer to shift everything over to map[string]*string
in a subsequent PR to keep the scope reduced and help with reducing unforeseen side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this approach as long as we don't want users to have empty string values
and validate global resource_attributes endpoint type map keys
4ad5d44
to
e35a7cc
Compare
@mx-psi, mind taking another look when able? |
Description:
Adding a feature - These changes add a new per-receiver
resource_attributes
config mapping that allows individual receivers to have additional resource attributes beyond those provided at the global level. They also correctly document the existing globalresource_attributes
expected format and add endpoint type validation.Testing: Added additional unit tests.
Documentation: Update readme for new feature and correct example of global
resource_attributes
form.