diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0027724c..527764e4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ release. ([#297](https://github.com/open-telemetry/semantic-conventions/pull/297)) - Fix `server.port` to be not required when `server.address` is not set. ([#429](https://github.com/open-telemetry/semantic-conventions/pull/429)) +- Use seconds as default duration for FaaS duration histograms + ([#384](https://github.com/open-telemetry/semantic-conventions/pull/384)) ### Features diff --git a/docs/faas/faas-metrics.md b/docs/faas/faas-metrics.md index b64d90dd01..e84a0921dc 100644 --- a/docs/faas/faas-metrics.md +++ b/docs/faas/faas-metrics.md @@ -45,10 +45,14 @@ The following metrics are recorded by the FaaS instance. This metric is [recommended][MetricRecommended]. +This metric SHOULD be specified with +[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/metrics/api.md#instrument-advice) +of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`. + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `faas.invoke_duration` | Histogram | `ms` | Measures the duration of the function's logic execution | +| `faas.invoke_duration` | Histogram | `s` | Measures the duration of the function's logic execution | @@ -71,10 +75,14 @@ This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended]. +This metric SHOULD be specified with +[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/metrics/api.md#instrument-advice) +of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`. + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `faas.init_duration` | Histogram | `ms` | Measures the duration of the function's initialization, such as a cold start | +| `faas.init_duration` | Histogram | `s` | Measures the duration of the function's initialization, such as a cold start | @@ -227,10 +235,14 @@ This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended]. +This metric SHOULD be specified with +[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/metrics/api.md#instrument-advice) +of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`. + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `faas.cpu_usage` | Histogram | `ms` | Distribution of CPU usage per invocation | +| `faas.cpu_usage` | Histogram | `s` | Distribution of CPU usage per invocation | diff --git a/model/metrics/faas-metrics.yaml b/model/metrics/faas-metrics.yaml index 6a753a7351..d68119f320 100644 --- a/model/metrics/faas-metrics.yaml +++ b/model/metrics/faas-metrics.yaml @@ -4,7 +4,7 @@ groups: metric_name: faas.invoke_duration brief: "Measures the duration of the function's logic execution" instrument: histogram - unit: "ms" + unit: "s" attributes: - ref: faas.trigger @@ -13,7 +13,7 @@ groups: metric_name: faas.init_duration brief: "Measures the duration of the function's initialization, such as a cold start" instrument: histogram - unit: "ms" + unit: "s" attributes: - ref: faas.trigger @@ -67,7 +67,7 @@ groups: metric_name: faas.cpu_usage brief: "Distribution of CPU usage per invocation" instrument: histogram - unit: "ms" + unit: "s" attributes: - ref: faas.trigger