-
Notifications
You must be signed in to change notification settings - Fork 369
Detect yaml groups that are not used in md files, deprecate otel.scope entity
#2310
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
lmolkova
merged 5 commits into
open-telemetry:main
from
lmolkova:detect-yaml-groups-that-are-not-used-in-md
Jun 19, 2025
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
447b694
Detect yaml groups that are not used in md files
cbc0ad3
permissions
d787ecd
deprecate otel.scope enitity
03b1537
Merge branch 'main' into detect-yaml-groups-that-are-not-used-in-md
a131483
prepare for auto-generated entities registry
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,4 @@ | ||
| change_type: bug_fix | ||
| component: otel | ||
| note: Removes `otel.scope` entity. | ||
| issues: [2310] |
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
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,42 @@ | ||
| # App | ||
|
|
||
| <!-- semconv entity.app --> | ||
| <!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. --> | ||
| <!-- see templates/registry/markdown/snippet.md.j2 --> | ||
| <!-- prettier-ignore-start --> | ||
| <!-- markdownlint-capture --> | ||
| <!-- markdownlint-disable --> | ||
|
|
||
|
|
||
| **Status:**  | ||
|
|
||
| **type:** `app` | ||
|
|
||
| **Description:** An app used directly by end users — like mobile, web, or desktop. | ||
|
|
||
| | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | ||
| |---|---|---|---|---|---| | ||
| | [`app.installation.id`](/docs/registry/attributes/app.md) | string | A unique identifier representing the installation of an application on a specific device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | `Recommended` |  | | ||
|
|
||
| **[1] `app.installation.id`:** Its value SHOULD persist across launches of the same application installation, including through application upgrades. | ||
| It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled. | ||
| Additionally, users might be able to reset this value (e.g. by clearing application data). | ||
| If an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value. | ||
| If multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`. | ||
| Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`. | ||
|
|
||
| For iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor). | ||
|
|
||
| For Android, examples of `app.installation.id` implementations include: | ||
|
|
||
| - [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations). | ||
| - A globally unique UUID which is persisted across sessions in your application. | ||
| - [App set ID](https://developer.android.com/identity/app-set-id). | ||
| - [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID). | ||
|
|
||
| More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids). | ||
|
|
||
| <!-- markdownlint-restore --> | ||
| <!-- prettier-ignore-end --> | ||
| <!-- END AUTOGENERATED TEXT --> | ||
| <!-- endsemconv --> | ||
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,48 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Description: This script checks if all signal groups declared in a YAML file are present in the markdown files under a specified directory. | ||
| # Usage: ./check_lines.sh <groups_list> <md_directory_path> | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| groups="$1" | ||
| docs_folder="$2" | ||
|
|
||
| if [[ ! -f "$groups" ]]; then | ||
| echo "File with groups does not exist: $groups" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ ! -d "$docs_folder" ]]; then | ||
| echo "Docs folder does not exist: $docs_folder" | ||
| exit 1 | ||
| fi | ||
|
|
||
| declare -A semconv_snippets | ||
| # Extract only lines of the form <!-- semconv ... --> from .md files | ||
| echo "Indexing semconv lines in .md files under: $docs_folder ..." | ||
| while IFS= read -r LINE; do | ||
| semconv_snippets["$LINE"]=1 | ||
| done < <( | ||
| grep -rhoP '<!--\s*semconv\s+\K[a-z0-9._]+(?=\s*-->)' "$docs_folder" --include="*.md" | ||
|
lmolkova marked this conversation as resolved.
|
||
| ) | ||
|
|
||
| not_found_groups=() | ||
|
|
||
| while IFS= read -r LINE || [[ -n "$LINE" ]]; do | ||
| if [[ -z "${semconv_snippets[$LINE]+_}" ]]; then | ||
| not_found_groups+=("$LINE") | ||
| fi | ||
| done < "$groups" | ||
|
|
||
| echo | ||
|
|
||
| if [[ ${#not_found_groups[@]} -gt 0 ]]; then | ||
| echo "❌ The following signals were declared in yaml and NOT found in markdown:" | ||
| for line in "${not_found_groups[@]}"; do | ||
| echo " - $line" | ||
| done | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "All groups were found." | ||
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,12 @@ | ||
| templates: | ||
| - pattern: signal-groups.j2 | ||
| filter: > | ||
| .groups | ||
| | map(select(.type != "attribute_group")) | ||
| | map(select(has("deprecated") | not)) | ||
| | .[].id | ||
| application_mode: single | ||
| whitespace_control: | ||
| trim_blocks: true | ||
| lstrip_blocks: true | ||
| keep_trailing_newline: true |
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,5 @@ | ||
| {{- template.set_file_name("signal-groups.txt") -}} | ||
|
|
||
| {% for item in ctx | sort %} | ||
| {{ item }} | ||
| {% endfor %} |
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.