This repository was archived by the owner on Nov 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
Separate semantic conventions from the specification. #227
Merged
carlosalberto
merged 30 commits into
open-telemetry:main
from
jsuereth:wip-semconv-separate
May 5, 2023
Merged
Changes from 6 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1f41fb5
Separate semantic convention proposal.
jsuereth 732779c
Fixes from review.
jsuereth e0470a4
Rename file.
jsuereth efe6ca7
Expand on directory restructuring.
jsuereth 50180cb
Fix spellcheck.
jsuereth 1a50ac5
Fix lint checks.
jsuereth 90cd3c7
Update text/0227-separate-semantic-conventions.md
jsuereth 44bad93
Update text/0227-separate-semantic-conventions.md
jsuereth 912d160
Update text/0227-separate-semantic-conventions.md
jsuereth 8557719
Clarifications to the proposal.
jsuereth 5cdd6d2
Update from discussions.
jsuereth 27f534d
Cleanup errors.
jsuereth 77bb706
Merge branch 'main' into wip-semconv-separate
jsuereth ff75943
Update text/0227-separate-semantic-conventions.md
jsuereth 8cee4ca
Update text/0227-separate-semantic-conventions.md
jsuereth 8ee43b5
Update text/0227-separate-semantic-conventions.md
jsuereth c1026c1
Update text/0227-separate-semantic-conventions.md
jsuereth 6a22347
Fixes from review.
jsuereth 84cc07e
Update text/0227-separate-semantic-conventions.md
jsuereth 6433d0a
Update text/0227-separate-semantic-conventions.md
jsuereth 1560851
Update text/0227-separate-semantic-conventions.md
jsuereth 70add2c
Update text/0227-separate-semantic-conventions.md
jsuereth 5a0542d
Update text/0227-separate-semantic-conventions.md
jsuereth d657939
Update text/0227-separate-semantic-conventions.md
jsuereth 31c450a
Update text/0227-separate-semantic-conventions.md
jsuereth ff2e00f
Update text/0227-separate-semantic-conventions.md
jsuereth e4fd7da
Update text/0227-separate-semantic-conventions.md
jsuereth dc61c3c
Update text/0227-separate-semantic-conventions.md
jsuereth 09f9088
Move next version number to open question.
jsuereth ae976c0
Fix lint checks.
jsuereth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| # Separate Semantic Conventions | ||
|
|
||
| Move Semantic Conventions outside of the main Specifications and version them | ||
| separately. | ||
|
|
||
| ## Motivation | ||
|
|
||
| We need to allow semantic conventions to evolve mostly independent of the | ||
| overall OpenTelemetry specification. Today, any breaking change in a semantic | ||
| convention would require bumping the version number of the entirety of the | ||
| OpenTelemetry specification. | ||
|
|
||
| ## Explanation | ||
|
|
||
| A new github repository called `semantic-conventions` would be created in the | ||
| OpenTelemetry organization. | ||
|
|
||
| This would *initially* have the following structure: | ||
|
|
||
| - Boilerplate files, e.g. `README.md`, `LICENSE`, `CODEOWNERS`, `CONTRIBUTING.md` | ||
| - `Makefile` that allows automatic generation of documentation from model. | ||
| - `model/` The set of YAML files that exist in | ||
| `{specification}/semantic_conventions` today. | ||
| - `docs/` A new directory that contains human readable documentation for how to | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| create instrumentation compliant with semantic conventions. | ||
| - `resource/` - Contents of `{specification}/resource/semantic_conventions` | ||
| - `trace/` - Contents of `{specification}/trace/semantic_conventions` | ||
| - `metrics/` - Contents of `{specification}/metrics/semantic_conventions` | ||
| - `logs/`- Contents of `{specification}/logs/semantic_conventions` | ||
| - `schemas/` - A new location for [Telemetry Schemas](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/schemas/README.md) | ||
| to live. This directory will be hosted at | ||
| `https://opentelemetry.io/semantic_conventions/schemas/` | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Existing semantic conventions in the specification would be marked as | ||
| deprecated, with documentation denoting the move. | ||
carlosalberto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Additionally, if the semantic conventions eventually move to domain-specific | ||
| director structure (e.g. `docs/{domain}/README.md`, with trace, metrics, events | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| in the same file), then this can be refactored in the new repository, preserving | ||
| git history. | ||
|
|
||
| There will also be the following exceptions in the specification: | ||
|
|
||
| - Semantic convetions used to implement API/SDK details will be fully specified | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| and will not be allowed to change in the Semantic Convention directory. | ||
| - Error/Exception handling will remain in the specification. | ||
| - SDK configuration interaction w/ semantic convention will remain in the | ||
| specification. Specifically `service.name`. | ||
| - The specification may elevate some semantic conventions as necessary for | ||
| compatibility requirements, e.g. `service.instance.id` and | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [Prometheus Compatibility](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md). | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| These exceptions exist because: | ||
|
|
||
| - Stable portions of the specification already rely on these conventions | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - These conventions are required to implement an SDK today. | ||
|
|
||
| As such, the Specification should define the absolute minimum of reserved or | ||
| required attribute names and their interaction with the SDK. | ||
|
|
||
| ## Internal details | ||
|
|
||
| The following process would be used to ensure semantic conventions are | ||
| seamlessly moved to their new location. | ||
|
|
||
| - A new repository `opentelemetry/semantic_conventions` will be constructed with | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| the proposed format and necessary `Makefile` / tooling. | ||
| - A moratorium will be placed on Semantic Convention PRs to the specififcation | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| repository. (Caveat that PRs related to this proposal would be allowed). | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - All semantic conventions in the Specification will be copied to the new | ||
| repository. | ||
| - Semantic conventions in the Specification will be marked as deprecated with | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| links to the new location. | ||
| - The Specification will be updated to require "special" conventions, like | ||
| `service.name` and configuration interaction. | ||
| - Instrumentation authors will update their `SchemaURL` to | ||
| `https://opentelemetry.io/semantic_conventions/schemas/{semconv_version}` | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| from | ||
| `https://opentelemetry.io/schemas/{spec_version}` | ||
carlosalberto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
jsuereth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Trade-offs and mitigations | ||
|
|
||
| This proposal has a few drawbacks: | ||
|
|
||
| - The semantic conventions will no longer be easily referencable form the specification. | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - This is actually a benefit. We can ensure isolation of convention from | ||
| specification and require the Specification to use firm language for | ||
| attributes it requires, like `service.name`. | ||
| - We will provide x-links from existing location to the new location. | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - Semantic Convention version will no longer match the specification version. | ||
jsuereth marked this conversation as resolved.
Show resolved
Hide resolved
jsuereth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Instrumentation authors will need to consume a separate semantic-convention | ||
| bundle from Specification bundle. What used to be ONE upgrade effort will | ||
tigrannajaryan marked this conversation as resolved.
Show resolved
Hide resolved
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| now be split into two (hopefully smaller) efforts. | ||
carlosalberto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - We expect changes from Semantic Conventions and Specification to be | ||
| orthogonal, so this should not add significant wall-clock time. | ||
tigrannajaryan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Initially this repository would have the following ownership: | ||
jsuereth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - Approvers | ||
| - [Liudmila Molkova](github.com/lmolkova) | ||
carlosalberto marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - Approvers (HTTP Only) | ||
| - [Trask Stalnaker](github.com/trask) | ||
| - Maintainers | ||
| - [Josh Suereth](github.com/jsuereth) | ||
| - [Armin Reuch](github.com/arminru) | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - [Reiley Yang](github.com/reyang) | ||
|
|
||
| That is, Maintenance would initially continue to fall on (a subset of) the | ||
| Technical committee. Approvers would start targeted at HTTP semantic convention | ||
| stability and expand rapidly as we build momentum on semantic conventions. | ||
|
|
||
| ## Prior art and alternatives | ||
|
|
||
| When we evaluate equivalent communities and efforts we see the following: | ||
|
|
||
| - `OpenTracing` - had specification and [semantics](https://github.com/opentracing/specification/blob/master/semantic_conventions.md) | ||
| merged. | ||
| - `OpenCensus` - had specification and semantics merged. However, OpenCensus | ||
| merged with OpenTelemetry prior to mass adoption or stable release of its | ||
| specification. | ||
| - `Elastic Common Schema` - the schema is its own project / document. | ||
| - `Prometheus` - Prometheus does not define rigid guidelines for telemetry, like | ||
| semantic conventions, instead relying on naming conventions and | ||
| standardization through mass adoption. | ||
|
|
||
| ## Open questions | ||
|
|
||
| This OTEP doesn't address the full needs of tooling and codegen that will be | ||
| needed for the community to shift to a separate semantic convention directory. | ||
| This will require each SiG that uses autogenarated semantic conventions to | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| adapt to the new location. | ||
|
|
||
| ## Future possibilities | ||
|
|
||
| This OTEP paves way for the following desirable features: | ||
|
|
||
| - Semantic Conventions can decide to bump major version numbers to accommodate | ||
| new signals or hard-to-resolve new domains without breaking the Specification | ||
| version number. | ||
| - Semantic Conventions can have dedicated maintainers and approvers. | ||
| - Semantic Conventions can restructure to better enable subject matter experts | ||
| (SMEs) to have approver/CODEOWNER status on relevant directories. | ||
|
|
||
| There is a desire to move semantic conventions to domain-specific directories | ||
| instead of signal-specific. This can occur after a separation of the repository. | ||
jsuereth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| For example: | ||
|
|
||
| - `docs/` | ||
| - `signals/` - Conventions for metrics, traces + logs | ||
| - `http/` | ||
| - `db/` | ||
| - `messaging/` | ||
| - `client/` | ||
| - `resource/` - We still need resource-specific semantic conventions | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.