Skip to content

Commit

Permalink
Add guidance on when to use and not use nested namespaces (#1197)
Browse files Browse the repository at this point in the history
This topic has come up at least 3 times now. I believe a clarification is
warranted. The clarification is aligned with previous recommendations:
#789 (comment)
#882 (comment)
#1194 (comment)
  • Loading branch information
tigrannajaryan authored Nov 10, 2020
1 parent 3fee202 commit 4052a2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions specification/common/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Names SHOULD follow these rules:
- Namespaces can be nested. For example `telemetry.sdk` is a namespace inside
top-level `telemetry` namespace and `telemetry.sdk.name` is an attribute
inside `telemetry.sdk` namespace.
Note: the fact that an entity is located within another entity is typically
not a sufficient reason for forming nested namespaces. The purpose of a
namespace is to avoid name clashes, not to indicate entity hierarchies. This
purpose should primarily drive the decision about forming nested namespaces.

- For each multi-word dot-delimited component of the attribute name separate the
words by underscores (i.e. use snake_case). For example `http.status_code`
Expand Down

0 comments on commit 4052a2c

Please sign in to comment.