Skip to content

Commit e52b14a

Browse files
authored
Merge branch 'main' into python-runtime-metrics
2 parents 1e07767 + 10e3a0f commit e52b14a

File tree

17 files changed

+171
-34
lines changed

17 files changed

+171
-34
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
change_type: enhancement
2+
3+
component: k8s
4+
5+
note: How to populate resource attributes based on attributes, labels and transformation
6+
7+
issues: [236]
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: process
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Adjust the semantic expectations for `process.executable.name`
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1736]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

.github/CODEOWNERS

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@
5959
/model/device/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-mobile-approvers
6060

6161
# K8s semantic conventions
62-
/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
63-
/model/k8s/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
64-
/docs/non-normative/k8s-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
62+
/docs/resource/k8s.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
63+
/model/k8s/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
64+
/docs/non-normative/k8s-attributes.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
65+
/docs/non-normative/k8s-migration.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-k8s-approvers
6566

6667
# Container semantic conventions
6768
/docs/resource/container.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers

Makefile

+31-14
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,28 @@ SEMCONVGEN_CONTAINER=$(SEMCONVGEN_CONTAINER_REPOSITORY)/$(VERSIONED_SEMCONVGEN_C
4848
OPA_CONTAINER=$(OPA_CONTAINER_REPOSITORY)/$(VERSIONED_OPA_CONTAINER_NO_REPO)
4949

5050

51-
DOCKER_USER=$(shell id -u):$(shell id -g)
52-
5351
CHECK_TARGETS=install-tools markdownlint misspell table-check compatibility-check \
5452
schema-check check-file-and-folder-names-in-docs
5553

54+
# Determine if "docker" is actually podman
55+
DOCKER_IS_PODMAN=$(docker --version | grep podman | wc -l)
56+
ifeq ($(DOCKER_IS_PODMAN),0)
57+
DOCKER_COMMAND=docker
58+
else
59+
DOCKER_COMMAND=podman
60+
endif
61+
62+
DOCKER_RUN=$(DOCKER_COMMAND) run
63+
DOCKER_USER=$(shell id -u):$(shell id -g)
64+
DOCKER_USER_IS_HOST_USER_ARG=-u $(DOCKER_USER)
65+
ifeq ($(DOCKER_COMMAND),podman)
66+
# On podman, additional arguments are needed to make "-u" work
67+
# correctly with the host user ID and host group ID.
68+
#
69+
# Error: OCI runtime error: crun: setgroups: Invalid argument
70+
DOCKER_USER_IS_HOST_USER_ARG=--userns=keep-id -u $(DOCKER_USER)
71+
endif
72+
5673

5774
# TODO: add `yamllint` step to `all` after making sure it works on Mac.
5875
.PHONY: all
@@ -95,7 +112,7 @@ normalized-link-check:
95112

96113
.PHONY: markdown-link-check
97114
markdown-link-check: normalized-link-check
98-
docker run --rm \
115+
$(DOCKER_RUN) --rm \
99116
--mount 'type=bind,source=$(PWD),target=/home/repo' \
100117
lycheeverse/lychee \
101118
--config home/repo/.lychee.toml \
@@ -106,7 +123,7 @@ markdown-link-check: normalized-link-check
106123

107124
.PHONY: markdown-link-check-changelog-preview
108125
markdown-link-check-changelog-preview:
109-
docker run --rm \
126+
$(DOCKER_RUN) --rm \
110127
--mount 'type=bind,source=$(PWD),target=/home/repo' \
111128
lycheeverse/lychee \
112129
--config /home/repo/.lychee.toml \
@@ -153,8 +170,8 @@ yamllint:
153170
# Generate markdown tables from YAML definitions
154171
.PHONY: table-generation
155172
table-generation:
156-
docker run --rm \
157-
-u $(DOCKER_USER) \
173+
$(DOCKER_RUN) --rm \
174+
$(DOCKER_USER_IS_HOST_USER_ARG) \
158175
--mount 'type=bind,source=$(PWD)/templates,target=/home/weaver/templates,readonly' \
159176
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
160177
--mount 'type=bind,source=$(PWD)/docs,target=/home/weaver/target' \
@@ -169,8 +186,8 @@ table-generation:
169186
# Generate attribute registry markdown.
170187
.PHONY: attribute-registry-generation
171188
attribute-registry-generation:
172-
docker run --rm \
173-
-u $(DOCKER_USER) \
189+
$(DOCKER_RUN) --rm \
190+
$(DOCKER_USER_IS_HOST_USER_ARG) \
174191
--mount 'type=bind,source=$(PWD)/templates,target=/home/weaver/templates,readonly' \
175192
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
176193
--mount 'type=bind,source=$(PWD)/docs,target=/home/weaver/target' \
@@ -183,7 +200,7 @@ attribute-registry-generation:
183200
# Check if current markdown tables differ from the ones that would be generated from YAML definitions (weaver).
184201
.PHONY: table-check
185202
table-check:
186-
docker run --rm \
203+
$(DOCKER_RUN) --rm \
187204
--mount 'type=bind,source=$(PWD)/templates,target=/home/weaver/templates,readonly' \
188205
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
189206
--mount 'type=bind,source=$(PWD)/docs,target=/home/weaver/target,readonly' \
@@ -242,8 +259,8 @@ chlog-update: $(CHLOGGEN)
242259
.PHONY: generate-gh-issue-templates
243260
generate-gh-issue-templates:
244261
mkdir -p $(TOOLS_DIR)/bin
245-
docker run --rm \
246-
-u $(id -u ${USER}):$(id -g ${USER}) \
262+
$(DOCKER_RUN) --rm \
263+
$(DOCKER_USER_IS_HOST_USER_ARG) \
247264
--mount 'type=bind,source=$(PWD)/internal/tools/scripts,target=/home/weaver/templates,readonly' \
248265
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
249266
--mount 'type=bind,source=$(TOOLS_DIR)/bin,target=/home/weaver/target' \
@@ -271,7 +288,7 @@ generate-gh-issue-templates:
271288
LATEST_RELEASED_SEMCONV_VERSION := $(shell git ls-remote --tags https://github.com/open-telemetry/semantic-conventions.git | cut -f 2 | sort --reverse | head -n 1 | tr '/' ' ' | cut -d ' ' -f 3 | $(SED) 's/v//g')
272289
.PHONY: check-policies
273290
check-policies:
274-
docker run --rm \
291+
$(DOCKER_RUN) --rm \
275292
--mount 'type=bind,source=$(PWD)/policies,target=/home/weaver/policies,readonly' \
276293
--mount 'type=bind,source=$(PWD)/model,target=/home/weaver/source,readonly' \
277294
${WEAVER_CONTAINER} registry check \
@@ -282,7 +299,7 @@ check-policies:
282299
# Test rego policies
283300
.PHONY: test-policies
284301
test-policies:
285-
docker run --rm -v $(PWD)/policies:/policies -v $(PWD)/policies_test:/policies_test \
302+
$(DOCKER_RUN) --rm -v $(PWD)/policies:/policies -v $(PWD)/policies_test:/policies_test \
286303
${OPA_CONTAINER} test \
287304
--var-values \
288305
--explain fails \
@@ -293,5 +310,5 @@ test-policies:
293310
# once github action requirements are updated.
294311
.PHONY: compatibility-check
295312
compatibility-check:
296-
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec --pull=always \
313+
$(DOCKER_RUN) --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec --pull=always \
297314
$(SEMCONVGEN_CONTAINER) --continue-on-validation-errors -f /source compatibility --previous-version $(LATEST_RELEASED_SEMCONV_VERSION)

docs/attributes-registry/process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ An operating system process.
2222
| <a id="process-executable-build-id-gnu" href="#process-executable-build-id-gnu">`process.executable.build_id.gnu`</a> | string | The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). | `c89b11207f6479603b0d49bf291c092c2b719293` | ![Development](https://img.shields.io/badge/-development-blue) |
2323
| <a id="process-executable-build-id-go" href="#process-executable-build-id-go">`process.executable.build_id.go`</a> | string | The Go build ID as retrieved by `go tool buildid <go executable>`. | `foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY` | ![Development](https://img.shields.io/badge/-development-blue) |
2424
| <a id="process-executable-build-id-htlhash" href="#process-executable-build-id-htlhash">`process.executable.build_id.htlhash`</a> | string | Profiling specific build ID for executables. See the OTel specification for Profiles for more information. | `600DCAFE4A110000F2BF38C493F5FB92` | ![Development](https://img.shields.io/badge/-development-blue) |
25-
| <a id="process-executable-name" href="#process-executable-name">`process.executable.name`</a> | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
25+
| <a id="process-executable-name" href="#process-executable-name">`process.executable.name`</a> | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
2626
| <a id="process-executable-path" href="#process-executable-path">`process.executable.path`</a> | string | The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | ![Development](https://img.shields.io/badge/-development-blue) |
2727
| <a id="process-exit-code" href="#process-exit-code">`process.exit.code`</a> | int | The exit code of the process. | `127` | ![Development](https://img.shields.io/badge/-development-blue) |
2828
| <a id="process-exit-time" href="#process-exit-time">`process.exit.time`</a> | string | The date and time the process exited, in ISO 8601 format. | `2023-11-21T09:26:12.315Z` | ![Development](https://img.shields.io/badge/-development-blue) |

docs/attributes-registry/rpc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document defines attributes for remote procedure calls.
1212

1313
| Attribute | Type | Description | Examples | Stability |
1414
|---|---|---|---|---|
15-
| <a id="rpc-connect-rpc-error-code" href="#rpc-connect-rpc-error-code">`rpc.connect_rpc.error_code`</a> | string | The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. | `cancelled`; `unknown`; `invalid_argument` | ![Development](https://img.shields.io/badge/-development-blue) |
15+
| <a id="rpc-connect-rpc-error-code" href="#rpc-connect-rpc-error-code">`rpc.connect_rpc.error_code`</a> | string | The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. | `cancelled`; `unknown`; `invalid_argument` | ![Development](https://img.shields.io/badge/-development-blue) |
1616
| <a id="rpc-connect-rpc-request-metadata" href="#rpc-connect-rpc-request-metadata">`rpc.connect_rpc.request.metadata.<key>`</a> | string[] | Connect request metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [1] | `rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | ![Development](https://img.shields.io/badge/-development-blue) |
1717
| <a id="rpc-connect-rpc-response-metadata" href="#rpc-connect-rpc-response-metadata">`rpc.connect_rpc.response.metadata.<key>`</a> | string[] | Connect response metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values. [2] | `rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"]` | ![Development](https://img.shields.io/badge/-development-blue) |
1818
| <a id="rpc-grpc-request-metadata" href="#rpc-grpc-request-metadata">`rpc.grpc.request.metadata.<key>`</a> | string[] | gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. [3] | `rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"]` | ![Development](https://img.shields.io/badge/-development-blue) |

docs/attributes-registry/url.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ This list is subject to change over time.
7171
When a query string value is redacted, the query string key SHOULD still be preserved, e.g.
7272
`q=OpenTelemetry&sig=REDACTED`.
7373

74-
**[7] `url.registered_domain`:** This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`.
74+
**[7] `url.registered_domain`:** This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`.
7575

7676
**[8] `url.subdomain`:** The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period.
7777

78-
**[9] `url.top_level_domain`:** This value can be determined precisely with the [public suffix list](http://publicsuffix.org).
78+
**[9] `url.top_level_domain`:** This value can be determined precisely with the [public suffix list](https://publicsuffix.org/).

docs/cli/cli-spans.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ additional details on how to record span status.
2929

3030
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
3131
|---|---|---|---|---|---|
32-
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
32+
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3333
| [`process.exit.code`](/docs/attributes-registry/process.md) | int | The exit code of the process. | `127` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3434
| [`process.pid`](/docs/attributes-registry/process.md) | int | Process identifier (PID). | `1234` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
3535
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if and only if process.exit.code is not 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -80,7 +80,7 @@ it's RECOMMENDED to:
8080

8181
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
8282
|---|---|---|---|---|---|
83-
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
83+
| [`process.executable.name`](/docs/attributes-registry/process.md) | string | The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8484
| [`process.exit.code`](/docs/attributes-registry/process.md) | int | The exit code of the process. | `127` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8585
| [`process.pid`](/docs/attributes-registry/process.md) | int | Process identifier (PID). | `1234` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8686
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if and only if process.exit.code is not 0 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

docs/general/metrics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ using the OpenMetrics exposition format, use the
9595
**Status**: [Stable][DocumentStatus]
9696

9797
Units should follow the
98-
[Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html).
98+
[Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html).
9999

100100
- Instruments for **utilization** metrics (that measure the fraction out of a
101101
total) are dimensionless and SHOULD use the default unit `1` (the unity).

docs/messaging/kafka.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,6 @@ flowchart LR;
207207
| `messaging.operation.type` | `"send"` | `"receive"` | `"process"` | `"settle"` |
208208
| `messaging.client.id` | `"5"` | `"8"` | `"8"` | `"8"` |
209209
| `messaging.kafka.message.key` | `"myKey"` | `"myKey"` | `"myKey"` | |
210-
| `messaging.kafka.message.offset` | | `"12"` | `"12"` | `"12"` |
210+
| `messaging.kafka.offset` | | `"12"` | `"12"` | `"12"` |
211211

212212
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status

0 commit comments

Comments
 (0)