Skip to content

Commit

Permalink
Add guidance on when to use and not use nested namespaces (open-telem…
Browse files Browse the repository at this point in the history
…etry#1197)

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/opentelemetry-specification#789 (comment)
open-telemetry/opentelemetry-specification#882 (comment)
open-telemetry/opentelemetry-specification#1194 (comment)
  • Loading branch information
tigrannajaryan committed Nov 10, 2020
1 parent ccef73a commit e99bc0b
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 e99bc0b

Please sign in to comment.