|
| 1 | +# Specification Principles |
| 2 | + |
| 3 | +This document defines common principles that will help designers create and extend |
| 4 | +the OpenTelemetry specification to adapt to new use cases and fix issues. |
| 5 | + |
| 6 | +## OpenTelemetry Mission and Values |
| 7 | + |
| 8 | +It should be taken in context of the [overall values of OpenTelemetry](https://opentelemetry.io/community/mission/), which lays out the following core values: |
| 9 | + |
| 10 | +- [Telemetry should be easy](https://opentelemetry.io/community/mission/#telemetry-should-be-easy) |
| 11 | +- [Telemetry should be universal](https://opentelemetry.io/community/mission/#telemetry-should-be-universal) |
| 12 | +- [Telemetry should be vendor-neutral](https://opentelemetry.io/community/mission/#telemetry-should-be-vendor-neutral) |
| 13 | +- [Telemetry should be loosely-coupled](https://opentelemetry.io/community/mission/#telemetry-should-be-loosely-coupled) |
| 14 | +- [Telemetry should be built-in](https://opentelemetry.io/community/mission/#telemetry-should-be-built-in) |
| 15 | + |
| 16 | +Additionally, it lays out the following core Engineering Values: |
| 17 | + |
| 18 | +- [Compatibility](https://opentelemetry.io/community/mission/#we-value-_compatibility_) |
| 19 | +- [Stability](https://opentelemetry.io/community/mission/#we-value-_stability_) |
| 20 | +- [Resilience](https://opentelemetry.io/community/mission/#we-value-_resilience_) |
| 21 | +- [Performance](https://opentelemetry.io/community/mission/#we-value-_performance_) |
| 22 | + - See [Specification Performance Principles](performance.md) for more details. |
| 23 | + |
| 24 | +In addition to these core values, there are a set of things we've learned about |
| 25 | +Specification work and drive how we write our Specification. |
| 26 | + |
| 27 | +## Specification Principles |
| 28 | + |
| 29 | +Here are the key principles of the OpenTelemetry Specification: |
| 30 | + |
| 31 | +- [Be User Driven](#be-user-driven) |
| 32 | +- [Be General](#be-general) |
| 33 | +- [Be Stable](#be-stable) |
| 34 | +- [Be Consistent](#be-consistent) |
| 35 | +- [Be Simple](#be-stable) |
| 36 | + |
| 37 | +Note that at times some of these principles are at odds with each other. For |
| 38 | +example, keeping things stable may put constraints on possible simplicity. These |
| 39 | +principles are a rubric to guide design, and form a spectrum through which we |
| 40 | +evaluate additions or changes to the Specification. |
| 41 | + |
| 42 | +Let's look at each in more detail. |
| 43 | + |
| 44 | +### Be User Driven |
| 45 | + |
| 46 | +The specification is useless without the ecosystem it enables. Changes should |
| 47 | +focus on real world use cases, and real user needs. Additionally, changes should |
| 48 | +be implementable across the entire OpenTelemetry ecosystem. |
| 49 | + |
| 50 | +This means proposals should think "end to end" not "add this one little thing". |
| 51 | + |
| 52 | +Projects and proposals should provide prototypes or implementations |
| 53 | +before changes are made to the Specification. |
| 54 | + |
| 55 | +We have a few simple rules of thumb regarding prototypes: |
| 56 | + |
| 57 | +- API/SDK changes should be prototyped in three languages. The goal is |
| 58 | + coverage of possible API designs, not any specific language: |
| 59 | + - One language should cover typed Object-Oriented ecosystems (Java, .NET, etc.) |
| 60 | + - One language should cover dynamically typed ecosystems (Python, JavaScript) |
| 61 | + - One language should cover structural ecosystems (Go, Rust) |
| 62 | +- Protocol changes should be prototyped both on the client and the server. |
| 63 | +- Prototypes can be unmerged Pull Requests, existing projects, etc. but must |
| 64 | + demonstrate the feature with confidence that the Specification of it will |
| 65 | + be successful. |
| 66 | + |
| 67 | +### Be General |
| 68 | + |
| 69 | +The specification needs to be implementable across a wide range of languages, |
| 70 | +frameworks, ecosystems and communities. The specification should allow |
| 71 | +OpenTelemetry components to provide idiomatic experiences to their users. |
| 72 | + |
| 73 | +The specification should focus on *what* not *how*. When describing how, use |
| 74 | +non-normative language or supplementary guidelines, like this document. |
| 75 | + |
| 76 | +### Be Stable |
| 77 | + |
| 78 | +Don't. Break. Users. |
| 79 | + |
| 80 | +Yes, this is a repeat of the overall OpenTelemetry mission of |
| 81 | +[Stability](https://opentelemetry.io/community/mission/#we-value-_stability_). |
| 82 | +That's how important stability is. |
| 83 | + |
| 84 | +To achieve OpenTelemetry's mission of "Telemetry should be built-in", we need to |
| 85 | +create a set of components that are safe for users to depend on. Instability |
| 86 | +breaks trust, and hurts the mission of being a solution which application |
| 87 | +and library authors are glad to integrate with their software out of the box. |
| 88 | + |
| 89 | +When things do change, the specification (and implementation) should do the |
| 90 | +heavy lifting to ensure seamless, smooth experience for the OpenTelemetry |
| 91 | +ecosystem. |
| 92 | + |
| 93 | +### Be Consistent |
| 94 | + |
| 95 | +Don't make users learn new concepts and behaviors for each feature they interact |
| 96 | +with in OpenTelemetry. This has three sub-principles: |
| 97 | + |
| 98 | +- Favor simple, broadly applicable features. |
| 99 | +- Prefer similar concepts and behaviors between signals. |
| 100 | +- Reuse naming conventions between signals, components, where possible. |
| 101 | + |
| 102 | +### Be Simple |
| 103 | + |
| 104 | +Simple is better than complicated. Abstractions should pay for themselves. |
| 105 | +OpenTelemetry has a large scope and many components. Solving a complex problem |
| 106 | +with simple design and solution leads to a much lower maintenance burden and |
| 107 | +easier evolution in the future. |
| 108 | + |
| 109 | +Additionally, a Specification is read and interpreted by many individuals. |
| 110 | +Complex language, nuanced wording and unclear descriptions lead to confusion and |
| 111 | +often times poor user experience as sections are not interpreted as desired. |
0 commit comments