Skip to content

Commit

Permalink
Merge branch 'main' into ck/host.id
Browse files Browse the repository at this point in the history
  • Loading branch information
christos68k authored Jan 29, 2024
2 parents e5d083b + fa07257 commit 6857a2d
Show file tree
Hide file tree
Showing 74 changed files with 3,587 additions and 397 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@
/model/registry/container.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers
/model/registry/oci.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-container-approvers

# .NET semantic conventions approvers
/model/metrics/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
/docs/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers

# TODO - Add semconv area experts
17 changes: 17 additions & 0 deletions .github/workflows/stale-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Close stale spull requests"
on:
schedule:
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 7 days.'
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
exempt-pr-labels: 'release:after-ga'
days-before-stale: 15
days-before-close: 7
2 changes: 1 addition & 1 deletion .markdown_link_check_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"replacement": "{{BASEURL}}/"
},
{
"pattern": "^https://github.com/open-telemetry/semantic-conventions/(blob|tree)/[^/]+/docs/",
"pattern": "^https://github.com/open-telemetry/semantic-conventions/(blob|tree)/main/docs/",
"replacement": "LINK-CHECK-ERROR-USE-LOCAL-PATH-TO-DOC-PAGE-NOT-EXTERNAL-URL/"
}
],
Expand Down
3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends: default

ignore-from-file:
- .gitignore

rules:
document-start: disable
octal-values: enable
Expand Down
74 changes: 73 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,46 @@ release.

### Breaking

- Rename `system.processes.*` namespace to `system.process.*`
([#484](https://github.com/open-telemetry/semantic-conventions/pull/484))
- Depluralize labels for pod (`k8s.pod.labels.*`) and container (`container.labels.*`) resources
([#625](https://github.com/open-telemetry/semantic-conventions/pull/625))
- Make `network.protocol.name` conditionally required for messaging
([#644](https://github.com/open-telemetry/semantic-conventions/pull/644))
- BREAKING: Generate process metrics from YAML
([#330](https://github.com/open-telemetry/semantic-conventions/pull/330))
- Rename `process.threads` to `process.thread.count`
- Rename `process.open_file_descriptors` to `process.open_file_descriptor.count`
- Rename attributes for `process.cpu.*`
- `state` to `process.cpu.state`
- Change attributes for `process.disk.io`
- Instead of `direction` use `disk.io.direction` from global registry
- Change attributes for `process.network.io`
- Instead of `direction` use `network.io.direction` from global registry
- Rename attributes for `process.context_switches`
- `type` to `process.context_switch_type`
- Rename attributes for `process.paging.faults`
- `type` to `process.paging.fault_type`

### Features

- Add `azure_container_apps` to `cloud.platform` semantic conventions
([#615](https://github.com/open-telemetry/semantic-conventions/pull/615))
- Add `user_agent.name` and `user_agent.version` attributes
([#452](https://github.com/open-telemetry/semantic-conventions/pull/452/))
- Add an example for gcp_pubsub asynchronous batch publish
([#545](https://github.com/open-telemetry/semantic-conventions/pull/545))

### 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 @@ -23,11 +59,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 @@ -43,6 +87,17 @@ release.
([#345](https://github.com/open-telemetry/semantic-conventions/pull/345))
- Add messaging metrics
([#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))
- Add fallback for `host.id` in Cloud
([#576](https://github.com/open-telemetry/semantic-conventions/pull/576))

Expand All @@ -52,6 +107,23 @@ release.
([#488](https://github.com/open-telemetry/semantic-conventions/pull/488))
- Remove no longer relevant Oct 1 mention from `OTEL_SEMCONV_STABILITY_OPT_IN`
([#541](https://github.com/open-telemetry/semantic-conventions/pull/541))
- Update stability definitions of HTTP client and server duration metrics to
be consistent with markdown.
([#587](https://github.com/open-telemetry/semantic-conventions/pull/587))
- Use `deprecated` property to mark attributes as deprecated instead of `stability`
([#588](https://github.com/open-telemetry/semantic-conventions/pull/588))

## v1.23.1 (2023-11-17)

### Breaking

### Features

### Fixes

- [backport to 1.23.x] Temp fix for separation of resource and semantic attributes
([#524](https://github.com/open-telemetry/semantic-conventions/pull/524)) via
([#537](https://github.com/open-telemetry/semantic-conventions/pull/537))

## v1.23.0 (2023-11-03)

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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Maintainers ([@open-telemetry/specs-semconv-maintainers](https://github.com/orgs
- [Josh Suereth](https://github.com/jsuereth), Google
- [Reiley Yang](https://github.com/reyang), Microsoft

_Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).
_Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer)._
2 changes: 2 additions & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All registered attributes are listed by namespace in this registry.
Currently, the following namespaces exist:

* [Browser](browser.md)
* [Client](client.md)
* [Cloud](cloud.md)
* [Code](code.md)
Expand All @@ -36,6 +37,7 @@ Currently, the following namespaces exist:
* [Device](device.md)
* [Disk](disk.md)
* [Error](error.md)
* [Exception](exception.md)
* [Host](host.md)
* [HTTP](http.md)
* [K8s](k8s.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/attributes-registry/browser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Browser

## Browser Attributes

<!-- semconv registry.browser(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `browser.brands` | string[] | Array of brand name and version separated by a space [1] | `[ Not A;Brand 99, Chromium 99, Chrome 99]` |
| `browser.language` | string | Preferred language of the user using the browser [2] | `en`; `en-US`; `fr`; `fr-FR` |
| `browser.mobile` | boolean | A boolean that is true if the browser is running on a mobile device [3] | |
| `browser.platform` | string | The platform on which the browser is running [4] | `Windows`; `macOS`; `Android` |

**[1]:** This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`).

**[2]:** This value is intended to be taken from the Navigator API `navigator.language`.

**[3]:** This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.

**[4]:** This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.
The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
<!-- endsemconv -->
1 change: 1 addition & 0 deletions docs/attributes-registry/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The following well-known definitions MUST be used if you set this attribute and
| `aws_app_runner` | AWS App Runner |
| `aws_openshift` | Red Hat OpenShift on AWS (ROSA) |
| `azure_vm` | Azure Virtual Machines |
| `azure_container_apps` | Azure Container Apps |
| `azure_container_instances` | Azure Container Instances |
| `azure_aks` | Azure Kubernetes Service |
| `azure_functions` | Azure Functions |
Expand Down
2 changes: 1 addition & 1 deletion docs/attributes-registry/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| `container.image.name` | string | Name of the image the container was built on. | `gcr.io/opentelemetry/operator` |
| `container.image.repo_digests` | string[] | Repo digests of the container image as provided by the container runtime. [3] | `[example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb, internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578]` |
| `container.image.tags` | string[] | Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`. | `[v1.27.1, 3.5.7-0]` |
| `container.labels.<key>` | string | Container labels, `<key>` being the label name, the value being the label value. | `container.labels.app=nginx` |
| `container.label.<key>` | string | Container labels, `<key>` being the label name, the value being the label value. | `container.label.app=nginx` |
| `container.name` | string | Container name used by container runtime. | `opentelemetry-autoconf` |
| `container.runtime` | string | The container runtime managing this container. | `docker`; `containerd`; `rkt` |

Expand Down
37 changes: 37 additions & 0 deletions docs/attributes-registry/exception.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Exceptions

## Exception Attributes

<!-- semconv registry.exception(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `exception.escaped` | boolean | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. [1] | |
| `exception.message` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The exception message. | `Division by zero`; `Can't convert 'int' object to str implicitly` |
| `exception.stacktrace` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` |
| `exception.type` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` |

**[1]:** An exception is considered to have escaped (or left) the scope of a span,
if that span is ended while the exception is still logically "in flight".
This may be actually "in flight" in some languages (e.g. if the exception
is passed to a Context manager's `__exit__` method in Python) but will
usually be caught at the point of recording the exception in most languages.

It is usually not possible to determine at the point where an exception is thrown
whether it will escape the scope of a span.
However, it is trivial to know that an exception
will escape, if one checks for an active exception just before ending the span,
as done in the [example for recording span exceptions](#recording-an-exception).

It follows that an exception may still escape the scope of the span
even if the `exception.escaped` attribute was not set or set to false,
since the event might have been recorded at a time where it was not
clear whether the exception will escape.
<!-- endsemconv -->

### Recording An Exception

The `exception.escaped` attribute has special semantics in the context of
a span. Please read the [details here](../exceptions/exceptions-spans.md#recording-an-exception).
18 changes: 9 additions & 9 deletions docs/attributes-registry/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
<!-- semconv attributes.http.deprecated(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `http.flavor` | string | Deprecated, use `network.protocol.name` instead. | `1.0` |
| `http.method` | string | Deprecated, use `http.request.method` instead. | `GET`; `POST`; `HEAD` |
| `http.request_content_length` | int | Deprecated, use `http.request.header.content-length` instead. | `3495` |
| `http.response_content_length` | int | Deprecated, use `http.response.header.content-length` instead. | `3495` |
| `http.scheme` | string | Deprecated, use `url.scheme` instead. | `http`; `https` |
| `http.status_code` | int | Deprecated, use `http.response.status_code` instead. | `200` |
| `http.target` | string | Deprecated, use `url.path` and `url.query` instead. | `/search?q=OpenTelemetry#SemConv` |
| `http.url` | string | Deprecated, use `url.full` instead. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` |
| `http.user_agent` | string | Deprecated, use `user_agent.original` instead. | `CERN-LineMode/2.15 libwww/2.17b3`; `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1` |
| `http.flavor` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `network.protocol.name` instead. | `1.0` |
| `http.method` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `http.request.method` instead. | `GET`; `POST`; `HEAD` |
| `http.request_content_length` | int | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `http.request.header.content-length` instead. | `3495` |
| `http.response_content_length` | int | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `http.response.header.content-length` instead. | `3495` |
| `http.scheme` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `url.scheme` instead. | `http`; `https` |
| `http.status_code` | int | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `http.response.status_code` instead. | `200` |
| `http.target` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `url.path` and `url.query` instead. | `/search?q=OpenTelemetry#SemConv` |
| `http.url` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `url.full` instead. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` |
| `http.user_agent` | string | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, use `user_agent.original` instead. | `CERN-LineMode/2.15 libwww/2.17b3`; `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1` |

`http.flavor` 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.

Expand Down
Loading

0 comments on commit 6857a2d

Please sign in to comment.