-
Notifications
You must be signed in to change notification settings - Fork 974
Clarify pluralization guidelines for semantic conventions #1115
Description
What are you trying to achieve?
Most of the currently defined attributes use singular names as they typically address a single entity (e.g. os.type, db.connection.string, etc.) While it's possible to use a map or array as a value type, there are few examples found, such as process.command_line (even then it's not fully clear if arguments are always included as an array or if it's sometimes an array and sometimes a string)
There are cases (discussed in contrib#1167, where an attribute typically describes a single entity but sometimes might actually represent a collection of them.
I believe it might be helpful to clarify the rules for naming plural attributes. A similar initiative was taken for metric names recently.
Specifically, there might be two use-cases considered:
(I) Rules for attributes that are always expected to represent multiple entities
- Should such attribute names always use plural name?
- Should such value type be always an array?
- What about maps?
(II) Rules for attributes that typically represent a single entity but sometimes represent a collection of them
- Should two (singular and plural) attribute names be used (e.g.
k8s.pod.containerfor a single instance andk8s.pod.containersfor multiple instances)? - Or, should a single attribute name be rather used? In such case, should it be the singular or plural form, e.g.
k8s.pod.containerork8s.pod.containers? - If a single attribute name is used, should it always use array type for the value or may it use string/number if only single value is present?