-
Notifications
You must be signed in to change notification settings - Fork 992
Create initial Entities data model specification. #4442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jsuereth
merged 29 commits into
open-telemetry:main
from
jsuereth:wip-entities-data-model
Apr 10, 2025
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
8c6d33f
Create initial Entities data model specification.
jsuereth 14b0d1a
Add changelog with PR number.
jsuereth 0804931
Markdownlint.
jsuereth 02b1dc5
Fix more markdownlint.
jsuereth fc3e90a
Fix lint issue.
jsuereth 80769a0
Fix lint issues.
jsuereth c8adaf0
Apply suggestions from code review
jsuereth 1f10be2
Update specification/entities/data-model.md
jsuereth 1d43246
Address missing repeatability language for id.
jsuereth 912e572
Add cached but not saved vscode changes.
jsuereth 9865527
Fix typos.
jsuereth 3b112cf
Apply suggestions from code review
jsuereth 45173f3
Update specification/entities/data-model.md
jsuereth a2d6288
Update toc.
jsuereth 2cfecbf
reword a poorly worded sentence.
jsuereth 5e717cf
Merge branch 'main' into wip-entities-data-model
jsuereth 9ee7c45
Enforce 80 character limit on markdown lines.
jsuereth ae7e933
Address some comments.
jsuereth ef20cc8
Clean up the specification examples.
jsuereth 15c85fc
Another english cleanup.
jsuereth c46fa82
Another language nit cleaned up.
jsuereth 8436b6e
Add a better transition statement.
jsuereth 9a86182
Regenerate toc.
jsuereth 62a8848
Fix last nit comment.
jsuereth 14742d8
Update layout from feedback.
jsuereth 4422a24
Fix lint issue.
jsuereth 316d170
Remove references to Resource being immutable on the data model.
jsuereth b39bd07
Fix up bad reference.
jsuereth 67e7e5d
Update specification/resource/README.md
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
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,28 @@ | ||
| <!--- Hugo front matter used to generate the website version of this page: | ||
| path_base_for_github_subdir: | ||
| from: tmp/otel/specification/entities/_index.md | ||
| to: entities/README.md | ||
| ---> | ||
|
|
||
| # Entities | ||
|
|
||
| <details> | ||
| <summary>Table of Contents</summary> | ||
|
|
||
| <!-- toc --> | ||
|
|
||
| - [Overview](#overview) | ||
| - [Specifications](#specifications) | ||
|
|
||
| <!-- tocstop --> | ||
|
|
||
| </details> | ||
|
|
||
| ## Overview | ||
|
|
||
| Entity represents an object of interest associated with produced telemetry: | ||
| traces, metrics, logs, profiles etc. | ||
|
|
||
| ## Specifications | ||
|
|
||
| - [Data Model](./data-model.md) |
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,209 @@ | ||
| # Entity Data Model | ||
|
|
||
| **Status**: [Development](../document-status.md) | ||
|
|
||
| <details> | ||
| <summary>Table of Contents</summary> | ||
|
|
||
| <!-- toc --> | ||
|
|
||
| - [Minimally Sufficient Identity](#minimally-sufficient-identity) | ||
| - [Repeatable Identity](#repeatable-identity) | ||
| - [Examples of Entities](#examples-of-entities) | ||
|
|
||
| <!-- tocstop --> | ||
|
|
||
| </details> | ||
|
|
||
| Entity represents an object of interest associated with produced telemetry: | ||
| traces, metrics, profiles, or logs. | ||
|
|
||
| For example, telemetry produced using an OpenTelemetry SDK is normally | ||
| associated with a `service` entity. Similarly, OpenTelemetry defines system | ||
| metrics for a `host`. The `host` is the entity we want to associate metrics with | ||
| in this case. | ||
|
|
||
| Entities may be also associated with produced telemetry indirectly. | ||
| For example a service that produces | ||
| telemetry is also related to a process in which the service runs, so we say that | ||
| the `service` entity is related to the `process` entity. The process normally | ||
| also runs on a host, so we say that the `process` entity is related to the | ||
| `host` entity. | ||
|
|
||
| > Note: Entity relationship modelling will be refined in future specification | ||
| > work. | ||
|
|
||
| The data model below defines a logical model for an entity (irrespective of the | ||
| physical format and encoding of how entity data is recorded). | ||
|
|
||
| <table> | ||
| <tr> | ||
| <td><strong>Field</strong> | ||
| </td> | ||
| <td><strong>Type</strong> | ||
| </td> | ||
| <td><strong>Description</strong> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Type | ||
| </td> | ||
| <td>string | ||
| </td> | ||
| <td>Defines the type of the entity. MUST not change during the | ||
| lifetime of the entity. For example: "service" or "host". This field is | ||
| required and MUST not be empty for valid entities. | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Id | ||
| </td> | ||
| <td>map<string, standard attribute value> | ||
| </td> | ||
| <td>Attributes that identify the entity. | ||
| <p> | ||
| MUST not change during the lifetime of the entity. The Id must contain | ||
| at least one attribute. | ||
| <p> | ||
| Follows OpenTelemetry <a | ||
| href="../../specification/common/README.md#standard-attribute">Standard | ||
| attribute definition</a>. SHOULD follow OpenTelemetry <a | ||
| href="https://github.com/open-telemetry/semantic-conventions">semantic | ||
| conventions</a> for attributes. | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Description | ||
| </td> | ||
| <td>map<string, any> | ||
| </td> | ||
| <td>Descriptive (non-identifying) attributes of the entity. | ||
| <p> | ||
| MAY change over the lifetime of the entity. MAY be empty. These | ||
| attributes are not part of entity's identity. | ||
| <p> | ||
| Follows <a | ||
| href="../../specification/logs/data-model.md#type-any">any</a> | ||
| value definition in the OpenTelemetry spec. Arbitrary deep nesting of values | ||
| for arrays and maps is allowed. | ||
| <p> | ||
| SHOULD follow OpenTelemetry <a | ||
| href="https://github.com/open-telemetry/semantic-conventions">semantic | ||
| conventions</a> for attributes. | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| ## Minimally Sufficient Identity | ||
|
|
||
| Commonly, a number of attributes of an entity are readily available for the telemetry | ||
| producer to compose an Id from. Of the available attributes the entity Id should | ||
| include the minimal set of attributes that is sufficient for uniquely identifying | ||
| that entity. For example a Process on a host can be uniquely identified by | ||
| (`process.pid`,`process.start_time`) attributes. Adding for example `process.executable.name` attribute to the Id is unnecessary and violates the | ||
| Minimally Sufficient Identity rule. | ||
|
|
||
| ## Repeatable Identity | ||
|
|
||
| The identifying attributes for entity SHOULD be values that can be repeatably | ||
| obtained by observers of that entity. For example, a `process` entity SHOULD | ||
| have the same identity (and be recognized as the same process), regardless of whether | ||
| the identity was generated from the process itself, e.g. via SDK, or by an | ||
| OpenTelemetry Collector running on the same host, or by some other system | ||
| describing the process. | ||
|
|
||
| > Aside: There are many ways to accomplish repeatable identifying attributes | ||
| > across multiple observers. While many successful systems rely on pushing down | ||
| > identity from a central registry or knowledge store, OpenTelemetry must | ||
| > support all possible scenarios. | ||
|
|
||
| ## Examples of Entities | ||
|
|
||
| _This section is non-normative and is present only for the purposes of | ||
| demonstrating the data model._ | ||
|
|
||
| Here are examples of entities, the typical identifying attributes they | ||
| have and some examples of descriptive attributes that may be | ||
| associated with the entity. | ||
|
|
||
| _Note: These examples MAY diverge from semantic conventions._ | ||
|
|
||
| <table> | ||
| <tr> | ||
| <td><strong>Entity</strong> | ||
| </td> | ||
| <td><strong>Entity Type</strong> | ||
| </td> | ||
| <td><strong>Identifying Attributes</strong> | ||
| </td> | ||
| <td><strong>Descriptive Attributes</strong> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Container | ||
| </td> | ||
| <td><pre>container</pre> | ||
| </td> | ||
| <td>container.id | ||
| </td> | ||
| <td>container.image.id<br/> | ||
| container.image.name<br/> | ||
| container.image.tag.{key}<br/> | ||
| container.label.{key}<br/> | ||
| container.name<br/> | ||
| container.runtime<br/> | ||
| oci.manifest.digest<br/> | ||
| container.command<br/> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Host | ||
| </td> | ||
| <td><pre>host</pre> | ||
| </td> | ||
| <td>host.id | ||
| </td> | ||
| <td>host.arch<br/> | ||
| host.name<br/> | ||
| host.type<br/> | ||
| host.image.id<br/> | ||
| host.image.name<br/> | ||
| host.image.version<br/> | ||
| host.type | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Kubernetes Node | ||
| </td> | ||
| <td><pre>k8s.node</pre> | ||
| </td> | ||
| <td>k8s.node.uid | ||
| </td> | ||
| <td>k8s.node.name | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Kubernetes Pod | ||
| </td> | ||
| <td><pre>k8s.pod</pre> | ||
| </td> | ||
| <td>k8s.pod.uid | ||
| </td> | ||
| <td>k8s.pod.name<br/> | ||
| k8s.pod.label.{key}<br/> | ||
| k8s.pod.annotation.{key}<br/> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td>Service Instance | ||
| </td> | ||
| <td><pre>service.instance</pre> | ||
| </td> | ||
| <td>service.instance.id<br/> | ||
| service.name<br/> | ||
| service.namesapce | ||
| </td> | ||
| <td>service.version | ||
| </td> | ||
| </tr> | ||
| </table> | ||
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
Oops, something went wrong.
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.