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
@@ -150,6 +151,38 @@ Consider the scope of the attribute and how it may evolve in the future:
150
151
> - If the attribute represents something useful in a narrow set of scenarios or
151
152
> is specific to certain system metrics, spans, or events, it likely does not need to be generic.
152
153
154
+
#### Defining enum attribute members
155
+
156
+
Enum attributes generally fall into three main categories:
157
+
158
+
**Complete enums** document all possible values. For example, `cpu.mode` covers
159
+
all known CPU modes. Metrics like `system.cpu.time` depend on having all modes
160
+
defined. Authors should document all known values upfront, though new values
161
+
may be added later to support new operating systems or CPU architectures.
162
+
163
+
**Open enums** like `error.type` allow conventions and instrumentations to define
164
+
their own applicable values.
165
+
166
+
**System identifier enums** specify a system, project, provider, product, or protocol.
167
+
For example, `db.system.name` contains database names like `mongodb` or `mysql`.
168
+
169
+
System identifier enums help differentiate telemetry signals. MongoDB and MySQL
170
+
both follow general database conventions, but populate attributes like `db.collection.name` differently and have system-specific attributes. Each system has its own span
171
+
definitions and documentation.
172
+
See [MongoDB](/docs/database/mongodb.md) and [MySQL](/docs/database/mysql.md) as examples
173
+
and check out [system-specific naming](../general/naming.md#system-specific-attributes)
174
+
for naming guidance.
175
+
176
+
> [!IMPORTANT]
177
+
> System identifier enums don't need to list every possible system, component, or technology.
178
+
>
179
+
> OpenTelemetry instrumentations that use enum attributes SHOULD document their values before releasing **stable** artifacts and MAY support undocumented values in unstable artifacts or behind a feature flag.
180
+
181
+
Only define new system identifiers when you also document how conventions apply
182
+
to that system. For example, when adding a new `db.system.name` value, create
183
+
documentation and span definitions that show how generic attributes work for that
0 commit comments