Skip to content

Commit

Permalink
Merge branch 'main' into openj9
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth authored Dec 19, 2023
2 parents 3c08451 + cafda71 commit 1b5b159
Show file tree
Hide file tree
Showing 8 changed files with 394 additions and 39 deletions.
27 changes: 22 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ release.

## Unreleased

- Replace AWS X-Ray Environment Span Link section with AWS X-Ray Active Tracing Considerations
([#354](https://github.com/open-telemetry/semantic-conventions/pull/354))
- Move Exceptions to attribute registry
([#574](https://github.com/open-telemetry/semantic-conventions/pull/574))
### Breaking

### Features

### Fixes

## v1.24.0 (2023-12-15)

### Breaking

- Update `jvm.gc.duration` histogram buckets to `[ 0.01, 0.1, 1, 10 ]`
([#317](https://github.com/open-telemetry/semantic-conventions/pull/317))
- BREAKING: Change type of `host.cpu.model.id` and `host.cpu.model.family` to string.
([#495](https://github.com/open-telemetry/semantic-conventions/issues/495))
([#499](https://github.com/open-telemetry/semantic-conventions/pull/499))
- Changed `messaging.system` attribute type to an open enum
([#517](https://github.com/open-telemetry/semantic-conventions/pull/517))
- Rename metrics `jvm.memory.usage` to `jvm.memory.used` and `jvm.memory.usage_after_last_gc`
Expand All @@ -28,11 +31,19 @@ release.
- BREAKING: Change `system.disk.io.direction` and `system.network.io.direction`
to global attributes `disk.io.direction` and `network.io.direction`
([#530](https://github.com/open-telemetry/semantic-conventions/pull/530))
- BREAKING: Change `messaging.kafka.partition` to `messaging.kafka.destination.partition`
([#547](https://github.com/open-telemetry/semantic-conventions/pull/547))

### Features

- Adds `labels` attribute to `k8s.pod` resource
([#494](https://github.com/open-telemetry/semantic-conventions/pull/494))
- Change Erlang managed thread attribute to be the Erlang process
([#491](https://github.com/open-telemetry/semantic-conventions/pull/491))
- Add gcp_pubsub as a messaging system
([#490](https://github.com/open-telemetry/semantic-conventions/pull/490))
- Adds `annotation` attribute to `k8s.pod` resource
([#494](https://github.com/open-telemetry/semantic-conventions/pull/573))
- Add `code.stacktrace` attribute
([#435](https://github.com/open-telemetry/semantic-conventions/pull/435))
- Add `http.flavor` and `http.user_agent` to list of deprecated attributes
Expand All @@ -50,8 +61,14 @@ release.
([#163](https://github.com/open-telemetry/semantic-conventions/pull/163))
- Add .NET 8.0 metrics for HTTP client, ASP.NET Core, SignalR server and Kestrel.
([#283](https://github.com/open-telemetry/semantic-conventions/pull/283))
- Add system shared IO direction attributes
([#530](https://github.com/open-telemetry/semantic-conventions/pull/530))
- JVM metrics marked stable
([#569](https://github.com/open-telemetry/semantic-conventions/pull/569))
- Add attribute for k8s pod annotations
([#573](https://github.com/open-telemetry/semantic-conventions/pull/573))
- Replace AWS X-Ray Environment Span Link section with AWS X-Ray Active Tracing Considerations
([#354](https://github.com/open-telemetry/semantic-conventions/pull/354))

### Fixes

Expand Down
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,24 @@ to merge**.
- Send staging tag as PR for review.
- Create a tag `v{version}` on the merged PR and push remote.

## Merging existing ECS conventions

The Elastic Common Schema (ECS) is being merged into OpenTelemetry Semantic
Conventions per [OTEP 222][otep222]. When adding a semantic convention that
exists in some form in ECS, consider the following guidelines:

- Prefer using the existing ECS name when possible. In particular:
- If proposing a name that differs from the ECS convention, provide usage
data, user issue reports, feature requests, examples of prior work on a
different standard or comparable evidence about the alternatives.
- When no suitable alternatives are provided, altering an ECS name solely
for the purpose of complying with [Name Pluralization guidelines](docs/general/attribute-naming.md#name-pluralization-guidelines)
MAY BE avoided.
- Do not use an existing ECS name as a namespace. If the name must differ, use a
different namespace name to avoid clashes or avoid using the namespace
entirely. See the [ECS field reference] for existing namespaces.

[nvm]: https://github.com/nvm-sh/nvm/blob/master/README.md#installing-and-updating
[stability guarantees]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/versioning-and-stability.md#semantic-conventions-stability
[otep222]: https://github.com/open-telemetry/oteps/pull/222
[ECS field reference]: https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html
51 changes: 26 additions & 25 deletions docs/attributes-registry/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@

## Kubernetes Resource Attributes

<!-- semconv registry.k8s -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | Recommended |
| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended |
| `k8s.container.name` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` | Recommended |
| `k8s.container.restart_count` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | `0`; `2` | Recommended |
| `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` | Recommended |
| `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` | Recommended |
| `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` | Recommended |
| `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.job.name` | string | The name of the Job. | `opentelemetry` | Recommended |
| `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | Recommended |
| `k8s.node.name` | string | The name of the Node. | `node-1` | Recommended |
| `k8s.node.uid` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` | Recommended |
| `k8s.pod.labels.<key>` | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | Recommended |
| `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended |
| `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | Recommended |
| `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
| `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` | Recommended |
| `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
<!-- semconv registry.k8s(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` |
| `k8s.cluster.uid` | string | A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| `k8s.container.name` | string | The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). | `redis` |
| `k8s.container.restart_count` | int | Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. | `0`; `2` |
| `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` |
| `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` |
| `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` |
| `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.job.name` | string | The name of the Job. | `opentelemetry` |
| `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` |
| `k8s.node.name` | string | The name of the Node. | `node-1` |
| `k8s.node.uid` | string | The UID of the Node. | `1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2` |
| `k8s.pod.annotation.<key>` | string | The annotation key-value pairs placed on the Pod, the `<key>` being the annotation name, the value being the annotation value. | `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true`; `k8s.pod.annotation.mycompany.io/arch=x64`; `k8s.pod.annotation.data=` |
| `k8s.pod.labels.<key>` | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` |
| `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` |
| `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` |
| `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |
| `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` |
| `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` |

**[1]:** K8s doesn't have support for obtaining a cluster ID. If this is ever
added, we will recommend collecting the `k8s.cluster.uid` through the
Expand Down
1 change: 1 addition & 0 deletions docs/resource/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ containers on your cluster.
<!-- semconv k8s.pod -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`k8s.pod.annotation.<key>`](../attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Pod, the `<key>` being the annotation name, the value being the annotation value. | `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true`; `k8s.pod.annotation.mycompany.io/arch=x64`; `k8s.pod.annotation.data=` | Opt-In |
| [`k8s.pod.labels.<key>`](../attributes-registry/k8s.md) | string | The labels placed on the Pod, the `<key>` being the label name, the value being the label value. | `k8s.pod.labels.app=my-app`; `k8s.pod.labels.mycompany.io/arch=x64`; `k8s.pod.labels.data=` | Recommended |
| [`k8s.pod.name`](../attributes-registry/k8s.md) | string | The name of the Pod. | `opentelemetry-pod-autoconf` | Recommended |
| [`k8s.pod.uid`](../attributes-registry/k8s.md) | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | Recommended |
Expand Down
5 changes: 5 additions & 0 deletions model/registry/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ groups:
brief: >
The labels placed on the Pod, the `<key>` being the label name, the value being the label value.
examples: ['k8s.pod.labels.app=my-app', 'k8s.pod.labels.mycompany.io/arch=x64', 'k8s.pod.labels.data=']
- id: pod.annotation
type: template[string]
brief: >
The annotation key-value pairs placed on the Pod, the `<key>` being the annotation name, the value being the annotation value.
examples: [ 'k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true', 'k8s.pod.annotation.mycompany.io/arch=x64', 'k8s.pod.annotation.data=' ]
- id: container.name
type: string
brief: >
Expand Down
2 changes: 2 additions & 0 deletions model/resource/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ groups:
- ref: k8s.pod.uid
- ref: k8s.pod.name
- ref: k8s.pod.labels
- ref: k8s.pod.annotation
requirement_level: opt_in

- id: k8s.container
prefix: k8s.container
Expand Down
22 changes: 13 additions & 9 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/next
versions:
next:
# https://github.com/open-telemetry/semantic-conventions/pull/536
- rename_metrics:
jvm.memory.usage: jvm.memory.used
jvm.memory.usage_after_last_gc: jvm.memory.used_after_last_gc
# https://github.com/open-telemetry/semantic-conventions/pull/530
- rename_attributes:
attribute_map:
system.network.io.direction: network.io.direction
system.disk.io.direction: disk.io.direction
1.24.0:
metrics:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/536
- rename_metrics:
jvm.memory.usage: jvm.memory.used
jvm.memory.usage_after_last_gc: jvm.memory.used_after_last_gc
# https://github.com/open-telemetry/semantic-conventions/pull/530
- rename_attributes:
attribute_map:
system.network.io.direction: network.io.direction
system.disk.io.direction: disk.io.direction
1.23.1:
1.23.0:
metrics:
changes:
Expand Down
Loading

0 comments on commit 1b5b159

Please sign in to comment.