Skip to content

Commit

Permalink
add column for ucum units. change default unit to annotation in faas-…
Browse files Browse the repository at this point in the history
…metrics.
  • Loading branch information
pichlermarc committed Dec 7, 2021
1 parent 93a88d2 commit 439d665
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
26 changes: 13 additions & 13 deletions specification/metrics/semantic_conventions/faas-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ type and units.

Below is a table of FaaS invocation metric instruments.

| Name | Instrument | Units | Description |
|------|------------|----|-------------|
| `faas.invoke_duration` | Histogram | ms | Measures the duration of the invocation in milliseconds |
| `faas.init_duration` | Histogram | ms | Measures the duration of the function's initialization, such as a cold start, in milliseconds |
| `faas.coldstarts` | Counter | 1 | Number of invocation cold starts. |
| `faas.errors` | Counter | 1 | Number of invocation errors. |
| `faas.executions` | Counter | 1 | Number of successful invocations. |
| `faas.timeouts` | Counter | 1 | Number of invocation timeouts. |
| Name | Instrument | Unit | Unit (UCUM) | Description |
|------|------------|------|-------------|-------------|
| `faas.invoke_duration` | Histogram | milliseconds |`ms` | Measures the duration of the invocation |
| `faas.init_duration` | Histogram | milliseconds | `ms` | Measures the duration of the function's initialization, such as a cold start |
| `faas.coldstarts` | Counter | default unit | `{coldstarts}` | Number of invocation cold starts. |
| `faas.errors` | Counter | default unit | `{errors}` | Number of invocation errors. |
| `faas.executions` | Counter | default unit |`{executions}` | Number of successful invocations. |
| `faas.timeouts` | Counter | default unit | `{timeouts}` | Number of invocation timeouts. |

Optionally, when applicable:

| Name | Instrument | Units | Description |
|------|------------|----|-------------|
| `faas.mem_usage` | Histogram | By | Distribution of max memory usage per invocation in bytes |
| `faas.cpu_usage` | Histogram | ms | Distribution of cpu usage per invocation in milliseconds |
| `faas.net_io` | Histogram | By | Distribution of net I/O usage per invocation in bytes|
| Name | Instrument | Unit | Unit (UCUM) | Description |
|------|------------|------|-------------|-------------|
| `faas.mem_usage` | Histogram | Bytes | `By` | Distribution of max memory usage per invocation |
| `faas.cpu_usage` | Histogram | milliseconds | `ms` | Distribution of cpu usage per invocation |
| `faas.net_io` | Histogram | Bytes | `By` | Distribution of net I/O usage per invocation |

## Attributes

Expand Down
14 changes: 7 additions & 7 deletions specification/metrics/semantic_conventions/http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ type and units.

Below is a table of HTTP server metric instruments.

| Name | Instrument | Units | Description |
|-------------------------------|----------------------------|------------|-------------|
| `http.server.duration` | Histogram | ms | measures the duration of the inbound HTTP request in milliseconds |
| `http.server.active_requests` | Asynchronous UpDownCounter | {requests} | measures the number of concurrent HTTP requests that are currently in-flight |
| Name | Instrument | Unit | Unit (UCUM) | Description |
|-------------------------------|----------------------------|--------------|--------------|-------------|
| `http.server.duration` | Histogram | milliseconds | `ms` | measures the duration of the inbound HTTP request |
| `http.server.active_requests` | Asynchronous UpDownCounter | requests | `{requests}` | measures the number of concurrent HTTP requests that are currently in-flight |

### HTTP Client

Below is a table of HTTP client metric instruments.

| Name | Instrument | Units | Description |
|------------------------|------------|-------|-------------|
| `http.client.duration` | Histogram | ms | measure the duration of the outbound HTTP request in milliseconds |
| Name | Instrument | Unit | Unit (UCUM) | Description |
|------------------------|------------|--------------|-------------|-------------|
| `http.client.duration` | Histogram | milliseconds | `ms` | measure the duration of the outbound HTTP request |

## Attributes

Expand Down
28 changes: 14 additions & 14 deletions specification/metrics/semantic_conventions/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ MUST be of the specified type and units.

Below is a table of RPC server metric instruments.

| Name | Instrument | Units | Description | Status | Streaming |
|------|------------|-------|-------------|--------|-----------|
| `rpc.server.duration` | Histogram | ms | measures duration of inbound RPC in milliseconds | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. |
| `rpc.server.request.size` | Histogram | By | measures size of RPC request messages in bytes (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.server.response.size` | Histogram | By | measures size of RPC response messages in bytes (uncompressed) | Optional | Recorded per response in a streaming batch |
| `rpc.server.requests_per_rpc` | Histogram | {count} | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.server.responses_per_rpc` | Histogram | {count} | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| Name | Instrument | Unit | Unit (UCUM) | Description | Status | Streaming |
|------|------------|------|-------------|-------------|--------|-----------|
| `rpc.server.duration` | Histogram | Bytes | `ms` | measures duration of inbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. |
| `rpc.server.request.size` | Histogram | Bytes | `By` | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.server.response.size` | Histogram | Bytes | `By` | measures size of RPC response messages (uncompressed) | Optional | Recorded per response in a streaming batch |
| `rpc.server.requests_per_rpc` | Histogram | count | `{count}` | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.server.responses_per_rpc` | Histogram | count | `{count}` | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |

### RPC Client

Below is a table of RPC client metric instruments. These apply to traditional
RPC usage, not streaming RPCs.

| Name | Instrument | Units | Description | Status | Streaming |
|------|------------|-------|-------------|--------|-----------|
| `rpc.client.duration` | Histogram | ms | measures duration of outbound RPC in milliseconds | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. |
| `rpc.client.request.size` | Histogram | By | measures size of RPC request messages in bytes (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.response.size` | Histogram | By | measures size of RPC response messages in bytes (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.requests_per_rpc` | Histogram | {count} | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.client.responses_per_rpc` | Histogram | {count} | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| Name | Instrument | Unit | Unit (UCUM) | Description | Status | Streaming |
|------|------------|------|-------------|-------------|--------|-----------|
| `rpc.client.duration` | Histogram | milliseconds | `ms` | measures duration of outbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. |
| `rpc.client.request.size` | Histogram | Bytes | `By` | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.response.size` | Histogram | Bytes | `By` | measures size of RPC response messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.requests_per_rpc` | Histogram | count | `{count}` | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.client.responses_per_rpc` | Histogram | count | `{count}` | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |

## Attributes

Expand Down

0 comments on commit 439d665

Please sign in to comment.