Skip to content

Commit 56bec66

Browse files
Liudmila Molkovatrask
andauthored
Refactor and update naming guidance (#1694)
Co-authored-by: Trask Stalnaker <[email protected]>
1 parent 0d843e4 commit 56bec66

File tree

11 files changed

+336
-328
lines changed

11 files changed

+336
-328
lines changed

.chloggen/1694.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
change_type: enhancement
2+
component: docs
3+
note: Update attribute, events, and metrics naming guidance to include new best practices.
4+
subtext: |
5+
- Use namespaces (with `.` delimiter) whenever possible.
6+
- Use precise, descriptive, unambiguous names that leave room for expansion.
7+
8+
issues: [1694]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ exists in some form in ECS, consider the following guidelines:
399399
data, user issue reports, feature requests, examples of prior work on a
400400
different standard or comparable evidence about the alternatives.
401401
- When no suitable alternatives are provided, altering an ECS name solely
402-
for the purpose of complying with [Name Pluralization guidelines](docs/general/attribute-naming.md#name-pluralization-guidelines)
402+
for the purpose of complying with [Name Pluralization guidelines](docs/general/naming.md#attribute-name-pluralization-guidelines)
403403
MAY BE avoided.
404404
- Do not use an existing ECS name as a namespace. If the name must differ, use a
405405
different namespace name to avoid clashes or avoid using the namespace

docs/attributes-registry/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ Currently, the following namespaces exist:
102102
- [VCS](vcs.md)
103103
- [Webengine](webengine.md)
104104

105-
[developers recommendations]: ../general/attribute-naming.md#recommendations-for-application-developers
105+
[developers recommendations]: ../general/naming.md#recommendations-for-application-developers

docs/general/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,3 @@ The following general Semantic Conventions are defined:
1717
* [Logs](logs.md): General Semantic Conventions for logs.
1818
* [Metrics](metrics.md): General Semantic Conventions for metrics.
1919
* [Spans](trace.md): General Semantic Conventions for traces / spans.
20-
21-
## Event Name Reuse Prohibition
22-
23-
A new event MUST NOT be added with the same name as an event that existed in
24-
the past but was renamed (with a corresponding schema file).
25-
26-
When introducing a new event name check all existing schema files to make sure
27-
the name does not appear as a key of any "rename_events" section (keys denote
28-
old event names in rename operations).

docs/general/attribute-naming.md

Lines changed: 0 additions & 177 deletions
This file was deleted.

docs/general/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ structure and semantics will also be defined.
3131
## General event semantics
3232

3333
* An event MUST have an [Event name property](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.40.0/specification/logs/data-model.md#field-eventname)
34-
that uniquely identifies the event. Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md).
34+
that uniquely identifies the event. Event names are subject to the [Naming guidelines](/docs/general/naming.md).
3535
* Event MAY have [standard](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.39.0/specification/common#attribute)
3636
attributes that provide additional context about the event.
3737
* It MAY contain a _payload_ (body) that describes the specific details of the

0 commit comments

Comments
 (0)