Skip to content

Commit

Permalink
Add guidance on when to use and not use nested namespaces
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:
open-telemetry#789 (comment)
open-telemetry#882 (comment)
open-telemetry#1194 (comment)
  • Loading branch information
Tigran Najaryan committed Nov 5, 2020
1 parent deeed1e commit 4ab2981
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 @@ -62,6 +62,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 4ab2981

Please sign in to comment.