Skip to content

Clarify pluralization guidelines for semantic conventions #1115

@pmm-sumo

Description

@pmm-sumo

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

  1. Should such attribute names always use plural name?
  2. Should such value type be always an array?
  3. What about maps?

(II) Rules for attributes that typically represent a single entity but sometimes represent a collection of them

  1. Should two (singular and plural) attribute names be used (e.g. k8s.pod.container for a single instance and k8s.pod.containers for multiple instances)?
  2. Or, should a single attribute name be rather used? In such case, should it be the singular or plural form, e.g. k8s.pod.container or k8s.pod.containers?
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:semantic-conventionsRelated to semantic conventionspriority:p2Medium priority levelrelease:allowed-for-gaEditorial changes that can still be added before GA since they don't require action by SIGsspec:miscellaneousFor issues that don't match any other spec label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions