Skip to content

Commit

Permalink
Merge branch 'main' into messaging-span-kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
pyohannes authored Sep 6, 2024
2 parents 862c1a9 + 4b30709 commit e397360
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 28 deletions.
22 changes: 22 additions & 0 deletions .chloggen/add_lookup_for_os.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: os

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: add lookup for os.build_id

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1318]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ WEAVER_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="weaver" {print
SEMCONVGEN_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="semconvgen" {print $$2}')
OPA_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="opa" {print $$2}')

DOCKER_USER=$(shell id -u):$(shell id -g)


# TODO: add `yamllint` step to `all` after making sure it works on Mac.
.PHONY: all
Expand Down Expand Up @@ -114,7 +116,7 @@ yamllint:
.PHONY: table-generation
table-generation:
docker run --rm \
-u $(id -u ${USER}):$(id -g ${USER}) \
-u $(DOCKER_USER) \
--mount 'type=bind,source=$(PWD)/templates,target=/home/weaver/templates,readonly' \
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
--mount 'type=bind,source=$(PWD)/docs,target=/home/weaver/target' \
Expand All @@ -129,7 +131,7 @@ table-generation:
.PHONY: attribute-registry-generation
attribute-registry-generation:
docker run --rm \
-u $(id -u ${USER}):$(id -g ${USER}) \
-u $(DOCKER_USER) \
--mount 'type=bind,source=$(PWD)/templates,target=/home/weaver/templates,readonly' \
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
--mount 'type=bind,source=$(PWD)/docs,target=/home/weaver/target' \
Expand Down Expand Up @@ -227,7 +229,6 @@ LATEST_RELEASED_SEMCONV_VERSION := $(shell git ls-remote --tags https://github.c
.PHONY: check-policies
check-policies:
docker run --rm \
-u $(id -u ${USER}):$(id -g ${USER}) \
--mount 'type=bind,source=$(PWD)/policies,target=/home/weaver/policies,readonly' \
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
${WEAVER_CONTAINER} registry check \
Expand Down
6 changes: 3 additions & 3 deletions docs/attributes-registry/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The Android platform on which the Android application is running.

This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform.

| Attribute | Type | Description | Examples | Stability |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------------- |
| `android.state` | string | Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. [1] | `created`; `background`; `foreground` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| Attribute | Type | Description | Examples | Stability |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `android.state` | string | Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. [1] | `created`; `background`; `foreground` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `device.app.lifecycle`. |

**[1]:** 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.

Expand Down
2 changes: 1 addition & 1 deletion docs/attributes-registry/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ This group defines attributes for Elasticsearch.
| Attribute | Type | Description | Examples | Stability |
| ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `db.cassandra.table` | string | Deprecated, use `db.collection.name` instead. | `mytable` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.collection.name`. |
| `db.connection_string` | string | Deprecated, use `server.address`, `server.port` attributes instead. | `Server=(localdb)\v11.0;Integrated Security=true;` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>"Replaced by `server.address` and `server.port`." |
| `db.connection_string` | string | Deprecated, use `server.address`, `server.port` attributes instead. | `Server=(localdb)\v11.0;Integrated Security=true;` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `server.address` and `server.port`. |
| `db.cosmosdb.container` | string | Deprecated, use `db.collection.name` instead. | `mytable` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.collection.name`. |
| `db.elasticsearch.cluster.name` | string | Deprecated, use `db.namespace` instead. | `e9106fc68e3044f0b1475b04bf4ffd5f` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.namespace`. |
| `db.instance.id` | string | Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. | `mysql-e26b99z.example.com` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. |
Expand Down
8 changes: 4 additions & 4 deletions docs/attributes-registry/otel.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concept

Describes deprecated otel.library attributes.

| Attribute | Type | Description | Examples | Stability |
| ---------------------- | ------ | ----------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `otel.library.name` | string | | `io.opentelemetry.contrib.mongodb` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>use the `otel.scope.name` attribute. |
| `otel.library.version` | string | | `1.0.0` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>use the `otel.scope.version` attribute. |
| Attribute | Type | Description | Examples | Stability |
| ---------------------- | ------ | --------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `otel.library.name` | string | Deprecated. Use the `otel.scope.name` attribute | `io.opentelemetry.contrib.mongodb` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Use the `otel.scope.name` attribute. |
| `otel.library.version` | string | Deprecated. Use the `otel.scope.version` attribute. | `1.0.0` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Use the `otel.scope.version` attribute. |
12 changes: 11 additions & 1 deletion docs/resource/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ In case of virtualized environments, this is the operating system as it is obser
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`os.type`](/docs/attributes-registry/os.md) | string | The operating system type. | `windows`; `linux`; `darwin` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`os.build_id`](/docs/attributes-registry/os.md) | string | Unique identifier for a particular build or compilation of the operating system. | `TQ3C.230805.001.B2`; `20E247`; `22621` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`os.build_id`](/docs/attributes-registry/os.md) | string | Unique identifier for a particular build or compilation of the operating system. [1] | `TQ3C.230805.001.B2`; `20E247`; `22621` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`os.description`](/docs/attributes-registry/os.md) | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`; `Ubuntu 18.04.1 LTS` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`os.name`](/docs/attributes-registry/os.md) | string | Human readable operating system name. | `iOS`; `Android`; `Ubuntu` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`os.version`](/docs/attributes-registry/os.md) | string | The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). | `14.2.1`; `18.04.1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** `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`; <br> contents of `/proc/sys/kernel/osrelease`|



`os.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
Expand Down
1 change: 1 addition & 0 deletions model/registry/deprecated/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ groups:
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.
Expand Down
3 changes: 1 addition & 2 deletions model/registry/deprecated/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ groups:
type: string
brief: 'Deprecated, use `server.address`, `server.port` attributes instead.'
stability: experimental
deprecated: >
"Replaced by `server.address` and `server.port`."
deprecated: "Replaced by `server.address` and `server.port`."
examples: Server=(localdb)\v11.0;Integrated Security=true;
- id: db.jdbc.driver_classname
type: string
Expand Down
15 changes: 5 additions & 10 deletions model/registry/deprecated/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ groups:
type: string
brief: >
Deprecated, use `messaging.consumer.group.name` instead.
deprecated: >
Replaced by `messaging.consumer.group.name`.
deprecated: "Replaced by `messaging.consumer.group.name`."
stability: experimental
examples: 'my-group'
- id: messaging.rocketmq.client_group
Expand All @@ -39,32 +38,28 @@ groups:
Deprecated, use `messaging.consumer.group.name` instead.
stability: experimental
examples: 'myConsumerGroup'
deprecated: >
Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans.
deprecated: "Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans."
- id: messaging.eventhubs.consumer.group
type: string
brief: >
Deprecated, use `messaging.consumer.group.name` instead.
stability: experimental
examples: '$Default'
deprecated: >
Replaced by `messaging.consumer.group.name`.
deprecated: "Replaced by `messaging.consumer.group.name`."
- id: messaging.servicebus.destination.subscription_name
type: string
brief: >
Deprecated, use `messaging.servicebus.destination.subscription_name` instead.
stability: experimental
examples: 'subscription-a'
deprecated: >
Replaced by `messaging.servicebus.destination.subscription_name`.
deprecated: "Replaced by `messaging.servicebus.destination.subscription_name`."
- id: messaging.kafka.message.offset
type: int
stability: experimental
brief: >
Deprecated, use `messaging.kafka.offset` instead.
examples: 42
deprecated: >
Replaced by `messaging.kafka.offset`.
deprecated: "Replaced by `messaging.kafka.offset`."
- id: messaging.destination_publish.anonymous
type: boolean
stability: experimental
Expand Down
8 changes: 4 additions & 4 deletions model/registry/deprecated/otel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ groups:
attributes:
- id: otel.library.name
type: string
deprecated: use the `otel.scope.name` attribute.
deprecated: "Use the `otel.scope.name` attribute."
stability: experimental
brief: ""
brief: "Deprecated. Use the `otel.scope.name` attribute"
examples: ['io.opentelemetry.contrib.mongodb']
- id: otel.library.version
type: string
deprecated: use the `otel.scope.version` attribute.
deprecated: "Use the `otel.scope.version` attribute."
stability: experimental
brief: ""
brief: "Deprecated. Use the `otel.scope.version` attribute."
examples: ['1.0.0']
13 changes: 13 additions & 0 deletions model/resource/os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ groups:
- 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`; <br> contents of `/proc/sys/kernel/osrelease`|

0 comments on commit e397360

Please sign in to comment.