Skip to content

Commit

Permalink
Update metrics semantic conventions to use the new instrument names (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#1976)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
  • Loading branch information
bogdandrutu and carlosalberto authored Oct 5, 2021
1 parent 113ea83 commit 2260388
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 76 deletions.
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` | ValueRecorder | milliseconds | measures the duration of the inbound HTTP request |
| `http.server.active_requests` | UpDownSumObserver | requests | measures the number of concurrent HTTP requests that are currently in-flight |
| Name | Instrument | Units | Description |
|-------------------------------|----------------------------|--------------|-------------|
| `http.server.duration` | Histogram | milliseconds | measures the duration of the inbound HTTP request |
| `http.server.active_requests` | Asynchronous UpDownCounter | 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` | ValueRecorder | milliseconds | measure the duration of the outbound HTTP request |
| Name | Instrument | Units | Description |
|------------------------|------------|--------------|-------------|
| `http.client.duration` | Histogram | milliseconds | 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` | ValueRecorder | milliseconds | 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` | ValueRecorder | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.server.response.size` | ValueRecorder | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per response in a streaming batch |
| `rpc.server.requests_per_rpc` | ValueRecorder | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.server.responses_per_rpc` | ValueRecorder | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| Name | Instrument | Units | Description | Status | Streaming |
|------|------------|-------|-------------|--------|-----------|
| `rpc.server.duration` | Histogram | milliseconds | 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 | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.server.response.size` | Histogram | bytes | measures size of RPC response messages (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 |

### 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` | ValueRecorder | milliseconds | 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` | ValueRecorder | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.response.size` | ValueRecorder | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.requests_per_rpc` | ValueRecorder | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| `rpc.client.responses_per_rpc` | ValueRecorder | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required |
| Name | Instrument | Units | Description | Status | Streaming |
|------|------------|-------|-------------|--------|-----------|
| `rpc.client.duration` | Histogram | milliseconds | 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 | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch |
| `rpc.client.response.size` | Histogram | bytes | measures size of RPC response messages (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 |

## Attributes

Expand Down
Loading

0 comments on commit 2260388

Please sign in to comment.