Skip to content

Warn when a custom attribute key conflicts with a built-in attribute #199

@gnomonunes

Description

@gnomonunes

I've using LaunchDarkly Ruby SDK at work for a while, and recently I noticed that if a custom attribute has the same key as a built-in attribute (e.g. country), it looks like that custom attribute is ignored during flag evaluation.

Currently there's no warning about that when passing a custom attribute which conflicts with a built-in one.

Could such warning be implemented?

Another solution could be to expose the built-in attribute keys somehow so we can do the validation on our implementation.
It looks like the built-in attributes are defined here but they are private:

BUILTINS = Set[:key, :secondary, :ip, :country, :email, :firstName, :lastName, :avatar, :name, :anonymous]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions