diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3727362773..d0efd84320 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,8 +28,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 66ca32a455..206cc1c715 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,8 +20,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 815d472020..1c9cfe8ef9 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,8 +29,8 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - area:cloud + - area:cloudevents - area:code - area:container - area:cpu diff --git a/.github/workflows/scripts/get-registry-areas.sh b/.github/workflows/scripts/get-registry-areas.sh deleted file mode 100755 index b33c9b3c60..0000000000 --- a/.github/workflows/scripts/get-registry-areas.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 -# -# Get a list of the semantic conventions areas from the registry. - -CUR_DIRECTORY=$(dirname "$0") -REPO_DIR="$( cd "$CUR_DIRECTORY/../../../" && pwd )" -REGISTRY_DIR="$( cd "$REPO_DIR/model/registry" && pwd )" - -# Explicitly sort with `-d` (dictionary) so BSD and GNU work alike. -for entry in $(ls $REGISTRY_DIR | egrep '\.yaml$' | sort -d) -do - echo "$entry" -done diff --git a/model/andrioid/deprecated/registry-deprecated.yaml b/model/andrioid/deprecated/registry-deprecated.yaml new file mode 100644 index 0000000000..3b0c9ce079 --- /dev/null +++ b/model/andrioid/deprecated/registry-deprecated.yaml @@ -0,0 +1,36 @@ +groups: + - id: registry.android.deprecated + type: attribute_group + display_name: Deprecated Android Attributes + brief: > + This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform. + attributes: + - id: android.state + stability: experimental + deprecated: "Replaced by `device.app.lifecycle`." + brief: > + Deprecated use the `device.app.lifecycle` event definition including + `android.state` as a payload field instead. + note: > + The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), + and from which the `OS identifiers` are derived. + type: + members: + - id: created + value: 'created' + brief: > + Any time before Activity.onResume() or, if the app has no Activity, Context.startService() + has been called in the app for the first time. + stability: experimental + - id: background + value: 'background' + brief: > + Any time after Activity.onPause() or, if the app has no Activity, + Context.stopService() has been called when the app was in the foreground state. + stability: experimental + - id: foreground + value: 'foreground' + brief: > + Any time after Activity.onResume() or, if the app has no Activity, + Context.startService() has been called when the app was in either the created or background states. + stability: experimental diff --git a/model/andrioid/registry.yaml b/model/andrioid/registry.yaml new file mode 100644 index 0000000000..b55ef0fd12 --- /dev/null +++ b/model/andrioid/registry.yaml @@ -0,0 +1,15 @@ +groups: + - id: registry.android + type: attribute_group + display_name: Android Attributes + brief: > + The Android platform on which the Android application is running. + attributes: + - id: android.os.api_level + type: string + stability: experimental + brief: > + Uniquely identifies the framework API revision offered by a version + (`os.version`) of the android operating system. More information can be found + [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). + examples: ['33', '32'] diff --git a/model/andrioid/resources.yaml b/model/andrioid/resources.yaml new file mode 100644 index 0000000000..7138bc2902 --- /dev/null +++ b/model/andrioid/resources.yaml @@ -0,0 +1,8 @@ +groups: + - id: android + type: resource + name: android + brief: > + The Android platform on which the Android application is running. + attributes: + - ref: android.os.api_level diff --git a/model/file/registry.yaml b/model/file/registry.yaml index cf138ba9a3..742f95afee 100644 --- a/model/file/registry.yaml +++ b/model/file/registry.yaml @@ -4,42 +4,6 @@ groups: display_name: File Attributes brief: "Describes file attributes." attributes: - - id: file.accessed - type: string - brief: > - Time when the file was last accessed, in ISO 8601 format. - note: > - This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc. - stability: experimental - examples: ['2021-01-01T12:00:00Z'] - - id: file.attributes - type: string[] - brief: > - Array of file attributes. - note: > - Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected for this - attribute: `archive`, `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, `write`. - stability: experimental - examples: - - ['readonly', 'hidden'] - - id: file.created - type: string - brief: > - Time when the file was created, in ISO 8601 format. - note: > - This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc. - stability: experimental - examples: ['2021-01-01T12:00:00Z'] - - id: file.changed - type: string - brief: > - Time when the file attributes or metadata was last changed, in ISO 8601 format. - note: > - `file.changed` captures the time when any of the file's properties or attributes - (including the content) are changed, while `file.modified` captures the timestamp - when the file content is modified. - stability: experimental - examples: ['2021-01-01T12:00:00Z'] - id: file.directory type: string brief: > @@ -55,69 +19,12 @@ groups: note: > When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - - id: file.fork_name - type: string - brief: > - Name of the fork. A fork is additional data associated with a filesystem object. - note: > - On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at - least one fork for the data portion, and additional forks may exist. - - On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is - just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. - An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name is the - value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` - should populate `file.extension`. The full path, `file.path`, will include the fork name. - stability: experimental - examples: ['Zone.Identifer'] - - id: file.group.id - type: string - brief: > - Primary Group ID (GID) of the file. - stability: experimental - examples: ["1000"] - - id: file.group.name - type: string - brief: > - Primary group name of the file. - stability: experimental - examples: ['users'] - - id: file.inode - type: string - brief: > - Inode representing the file in the filesystem. - stability: experimental - examples: ['256383'] - - id: file.mode - type: string - brief: > - Mode of the file in octal representation. - stability: experimental - examples: ['0640'] - - id: file.modified - type: string - brief: > - Time when the file content was last modified, in ISO 8601 format. - stability: experimental - examples: ['2021-01-01T12:00:00Z'] - id: file.name type: string brief: > Name of the file including the extension, without the directory. stability: experimental examples: ['example.png'] - - id: file.owner.id - type: string - brief: > - The user ID (UID) or security identifier (SID) of the file owner. - stability: experimental - examples: ["1000"] - - id: file.owner.name - type: string - brief: > - Username of the file owner. - stability: experimental - examples: ['root'] - id: file.path type: string brief: > @@ -129,11 +36,3 @@ groups: brief: > File size in bytes. stability: experimental - - id: file.symbolic_link.target_path - type: string - brief: > - Path to the target of a symbolic link. - note: > - This attribute is only applicable to symbolic links. - stability: experimental - examples: ['/usr/bin/python3'] diff --git a/model/graphgl/registry.yaml b/model/graphgl/registry.yaml new file mode 100644 index 0000000000..acb5e312e7 --- /dev/null +++ b/model/graphgl/registry.yaml @@ -0,0 +1,35 @@ +groups: + - id: registry.graphql + type: attribute_group + display_name: GraphQL Attributes + brief: 'This document defines attributes for GraphQL.' + attributes: + - id: graphql.operation.name + brief: "The name of the operation being executed." + type: string + stability: experimental + examples: 'findBookById' + - id: graphql.operation.type + brief: "The type of the operation being executed." + stability: experimental + type: + members: + - id: query + value: "query" + brief: "GraphQL query" + stability: experimental + - id: mutation + value: "mutation" + brief: "GraphQL mutation" + stability: experimental + - id: subscription + value: "subscription" + brief: "GraphQL subscription" + stability: experimental + examples: ['query', 'mutation', 'subscription'] + - id: graphql.document + brief: "The GraphQL document being executed." + type: string + stability: experimental + note: The value may be sanitized to exclude sensitive information. + examples: 'query findBookById { bookById(id: ?) { name } }' diff --git a/model/graphgl/spans.yml b/model/graphgl/spans.yml new file mode 100644 index 0000000000..a14948da0a --- /dev/null +++ b/model/graphgl/spans.yml @@ -0,0 +1,13 @@ +groups: + - id: graphql + type: span + brief: > + This document defines semantic conventions to apply when instrumenting the GraphQL implementation. They map + GraphQL operations to attributes on a Span. + attributes: + - ref: graphql.operation.name + requirement_level: recommended + - ref: graphql.operation.type + requirement_level: recommended + - ref: graphql.document + requirement_level: recommended diff --git a/model/resource/host.yaml b/model/resource/host.yaml deleted file mode 100644 index 5e2b8fc7c6..0000000000 --- a/model/resource/host.yaml +++ /dev/null @@ -1,61 +0,0 @@ -groups: - - id: host - type: resource - brief: > - A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array. - attributes: - - ref: host.id - note: | - Collecting `host.id` from non-containerized systems - - **Non-privileged Machine ID Lookup** - - When collecting `host.id` for non-containerized systems non-privileged lookups - of the machine id are preferred. SDK detector implementations MUST use the - sources listed below to obtain the machine id. - - | OS | Primary | Fallback | - |---------|---------|---------| - | Linux | contents of `/etc/machine-id` | contents of `/var/lib/dbus/machine-id` | - | BSD | contents of `/etc/hostid` | output of `kenv -q smbios.system.uuid` | - | MacOS | `IOPlatformUUID` line from the output of `ioreg -rd1 -c "IOPlatformExpertDevice"` | - | - | Windows | `MachineGuid` from registry `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` | - | - - **Privileged Machine ID Lookup** - - The `host.id` can be looked up using privileged sources. For example, Linux - systems can use the output of `dmidecode -t system`, `dmidecode -t baseboard`, - `dmidecode -t chassis`, or read the corresponding data from the filesystem - (e.g. `cat /sys/devices/virtual/dmi/id/product_id`, - `cat /sys/devices/virtual/dmi/id/product_uuid`, etc), however, SDK resource - detector implementations MUST not collect `host.id` from privileged sources. If - privileged lookup of `host.id` is required, the value should be injected via the - `OTEL_RESOURCE_ATTRIBUTES` environment variable. - - ref: host.name - - ref: host.type - - ref: host.arch - - ref: host.image.name - - ref: host.image.id - - ref: host.image.version - - ref: host.ip - requirement_level: opt_in - - ref: host.mac - requirement_level: opt_in - - - id: host.cpu - type: resource - brief: > - A host's CPU information - attributes: - - ref: host.cpu.vendor.id - requirement_level: opt_in - - ref: host.cpu.family - requirement_level: opt_in - - ref: host.cpu.model.id - requirement_level: opt_in - - ref: host.cpu.model.name - requirement_level: opt_in - - ref: host.cpu.stepping - requirement_level: opt_in - - ref: host.cpu.cache.l2.size - requirement_level: opt_in diff --git a/model/resource/os.yaml b/model/resource/os.yaml deleted file mode 100644 index 374d2e1594..0000000000 --- a/model/resource/os.yaml +++ /dev/null @@ -1,28 +0,0 @@ -groups: - - id: os - type: resource - brief: > - The operating system (OS) on which the process represented by this resource is running. - note: > - In case of virtualized environments, this is the operating system as it is observed by - the process, i.e., the virtualized guest rather than the underlying host. - attributes: - - ref: os.type - requirement_level: required - - ref: os.description - - ref: os.name - - ref: os.version - - ref: os.build_id - note: > - `build_id` values SHOULD be obtained from the following sources: - - - | OS | Primary | Fallback | - - | ------- | ------- | ------- | - - | Windows | `CurrentBuildNumber` from registry `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion` | - | - - | MacOS | `ProductBuildVersion` from `/System/Library/CoreServices/SystemVersion.plist` | `ProductBuildVersion` from `/System/Library/CoreServices/ServerVersion.plist` | - - | Linux | `BUILD_ID` from `/etc/os-release` | `BUILD_ID` from `/usr/lib/os-release`;
contents of `/proc/sys/kernel/osrelease`|