Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into add-process-registry-…
Browse files Browse the repository at this point in the history
…fields
  • Loading branch information
mjwolf committed Jan 29, 2024
2 parents b9b6b80 + fa07257 commit 16cf7dd
Show file tree
Hide file tree
Showing 14 changed files with 445 additions and 50 deletions.
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
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
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,31 @@ release.
([#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)).
([#545](https://github.com/open-telemetry/semantic-conventions/pull/545))

### Fixes

Expand Down
6 changes: 6 additions & 0 deletions docs/attributes-registry/user-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
<!-- semconv registry.user_agent(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `user_agent.name` | string | Name of the user-agent extracted from original. Usually refers to the browser's name [1] | `Safari` |
| `user_agent.original` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `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` |
| `user_agent.version` | string | Version of the user-agent extracted from original. Usually refers to the browser's version [2] | `14.1.2` |

**[1]:** [Example](https://www.whatsmyua.info) of extracting browser's name from original string

**[2]:** [Example](https://www.whatsmyua.info) of extracting browser's version from original string
<!-- endsemconv -->
2 changes: 1 addition & 1 deletion docs/database/couchdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ described on this page.
|---|---|---|---|---|
| [`db.operation`](../attributes-registry/db.md) | string | The HTTP method + the target REST route. [1] | `GET /{db}/{docid}` | Conditionally Required: If `db.statement` is not applicable. |

**[1]:** In **CouchDB**, `db.operation` should be set to the HTTP method + the target REST route according to the API reference documentation. For example, when retrieving a document, `db.operation` would be set to (literally, i.e., without replacing the placeholders with concrete values): [`GET /{db}/{docid}`](http://docs.couchdb.org/en/stable/api/document/common.html#get--db-docid).
**[1]:** In **CouchDB**, `db.operation` should be set to the HTTP method + the target REST route according to the API reference documentation. For example, when retrieving a document, `db.operation` would be set to (literally, i.e., without replacing the placeholders with concrete values): [`GET /{db}/{docid}`](https://docs.couchdb.org/en/stable/api/document/common.html#get--db-docid).
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
18 changes: 9 additions & 9 deletions docs/http/http-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Retries and redirects cause more than one physical HTTP request to be sent.
A request is resent when an HTTP client library sends more than one HTTP request to satisfy the same API call.
This may happen due to following redirects, authorization challenges, 503 Server Unavailable, network issues, or any other.

Each time an HTTP request is resent, the `http.resend_count` attribute SHOULD be added to each repeated span and set to the ordinal number of the request resend attempt.
Each time an HTTP request is resent, the `http.request.resend_count` attribute SHOULD be added to each repeated span and set to the ordinal number of the request resend attempt.

See the examples for more details about:

Expand Down Expand Up @@ -433,11 +433,11 @@ request (SERVER, trace=t1, span=s1)
| |
| --- server (SERVER, trace=t1, span=s3)
|
-- GET / - 500 (CLIENT, trace=t1, span=s4, http.resend_count=1)
-- GET / - 500 (CLIENT, trace=t1, span=s4, http.request.resend_count=1)
| |
| --- server (SERVER, trace=t1, span=s5)
|
-- GET / - 200 (CLIENT, trace=t1, span=s6, http.resend_count=2)
-- GET / - 200 (CLIENT, trace=t1, span=s6, http.request.resend_count=2)
|
--- server (SERVER, trace=t1, span=s7)
```
Expand All @@ -449,11 +449,11 @@ GET / - 500 (CLIENT, trace=t1, span=s1)
|
--- server (SERVER, trace=t1, span=s2)
GET / - 500 (CLIENT, trace=t2, span=s1, http.resend_count=1)
GET / - 500 (CLIENT, trace=t2, span=s1, http.request.resend_count=1)
|
--- server (SERVER, trace=t2, span=s2)
GET / - 200 (CLIENT, trace=t3, span=s1, http.resend_count=2)
GET / - 200 (CLIENT, trace=t3, span=s1, http.request.resend_count=2)
|
--- server (SERVER, trace=t3, span=s1)
```
Expand All @@ -469,7 +469,7 @@ request (SERVER, trace=t1, span=s1)
| |
| --- server (SERVER, trace=t1, span=s3)
|
-- GET /hello - 200 (CLIENT, trace=t1, span=s4, http.resend_count=1)
-- GET /hello - 200 (CLIENT, trace=t1, span=s4, http.request.resend_count=1)
|
--- server (SERVER, trace=t1, span=s5)
```
Expand All @@ -481,7 +481,7 @@ GET /hello - 401 (CLIENT, trace=t1, span=s1)
|
--- server (SERVER, trace=t1, span=s2)
GET /hello - 200 (CLIENT, trace=t2, span=s1, http.resend_count=1)
GET /hello - 200 (CLIENT, trace=t2, span=s1, http.request.resend_count=1)
|
--- server (SERVER, trace=t2, span=s2)
```
Expand All @@ -497,7 +497,7 @@ request (SERVER, trace=t1, span=s1)
| |
| --- server (SERVER, trace=t1, span=s3)
|
-- GET /hello - 200 (CLIENT, trace=t1, span=s4, http.resend_count=1)
-- GET /hello - 200 (CLIENT, trace=t1, span=s4, http.request.resend_count=1)
|
--- server (SERVER, trace=t1, span=s5)
```
Expand All @@ -509,7 +509,7 @@ GET / - 302 (CLIENT, trace=t1, span=s1)
|
--- server (SERVER, trace=t1, span=s2)
GET /hello - 200 (CLIENT, trace=t2, span=s1, http.resend_count=1)
GET /hello - 200 (CLIENT, trace=t2, span=s1, http.request.resend_count=1)
|
--- server (SERVER, trace=t2, span=s2)
```
Expand Down
16 changes: 9 additions & 7 deletions docs/messaging/messaging-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ All messaging metrics share the same set of attributes:
| [`messaging.destination.name`](../attributes-registry/messaging.md) | string | The message destination name [3] | `MyQueue`; `MyTopic` | Conditionally Required: [4] |
| [`messaging.destination.template`](../attributes-registry/messaging.md) | string | Low cardinality representation of the messaging destination name [5] | `/customers/{customerId}` | Conditionally Required: if available. |
| [`messaging.system`](../attributes-registry/messaging.md) | string | An identifier for the messaging system being used. See below for a list of well-known identifiers. | `activemq` | Required |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [6] | `amqp`; `mqtt` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [7] | `3.1.1` | Recommended |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [8] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: If available. |
| [`server.port`](../attributes-registry/server.md) | int | Server port number. [9] | `80`; `8080`; `443` | Recommended |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [6] | `amqp`; `mqtt` | Conditionally Required: [7] |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [8] | `3.1.1` | Recommended |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [9] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: If available. |
| [`server.port`](../attributes-registry/server.md) | int | Server port number. [10] | `80`; `8080`; `443` | Recommended |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
Instrumentations SHOULD document the list of errors they report.
Expand Down Expand Up @@ -61,11 +61,13 @@ the broker doesn't have such notion, the destination name SHOULD uniquely identi

**[6]:** The value SHOULD be normalized to lowercase.

**[7]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
**[7]:** Only for messaging systems and frameworks that support more than one protocol.

**[8]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.
**[8]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.

**[9]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
**[9]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.

**[10]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.

`error.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.

Expand Down
24 changes: 13 additions & 11 deletions docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ as described in [Attributes specific to certain messaging systems](#attributes-s
| [`messaging.system`](../attributes-registry/messaging.md) | string | An identifier for the messaging system being used. See below for a list of well-known identifiers. | `activemq` | Required |
| [`network.peer.address`](../attributes-registry/network.md) | string | Peer address of the network connection - IP address or Unix domain socket name. | `10.1.2.80`; `/tmp/my.sock` | Recommended |
| [`network.peer.port`](../attributes-registry/network.md) | int | Peer port number of the network connection. | `65123` | Recommended: If `network.peer.address` is set. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [14] | `amqp`; `mqtt` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [15] | `3.1.1` | Recommended |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [16] | `tcp`; `udp` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [17] | `ipv4`; `ipv6` | Recommended |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [18] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: If available. |
| [`server.port`](../attributes-registry/server.md) | int | Server port number. [19] | `80`; `8080`; `443` | Recommended |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [14] | `amqp`; `mqtt` | Conditionally Required: [15] |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [16] | `3.1.1` | Recommended |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [17] | `tcp`; `udp` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [18] | `ipv4`; `ipv6` | Recommended |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [19] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Conditionally Required: If available. |
| [`server.port`](../attributes-registry/server.md) | int | Server port number. [20] | `80`; `8080`; `443` | Recommended |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
Instrumentations SHOULD document the list of errors they report.
Expand Down Expand Up @@ -354,19 +354,21 @@ size should be used.

**[14]:** The value SHOULD be normalized to lowercase.

**[15]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
**[15]:** Only for messaging systems and frameworks that support more than one protocol.

**[16]:** The value SHOULD be normalized to lowercase.
**[16]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.

**[17]:** The value SHOULD be normalized to lowercase.

Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.

**[17]:** The value SHOULD be normalized to lowercase.
**[18]:** The value SHOULD be normalized to lowercase.

**[18]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.
**[19]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.

**[19]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
**[20]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.

`error.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.

Expand Down
Loading

0 comments on commit 16cf7dd

Please sign in to comment.