Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Use seconds as default duration for FaaS duration histograms #384

Merged
Merged
Next Next commit
Use seconds as default duration for FaaS metrics
pyohannes committed Oct 11, 2023
commit ae47bc35f95bb0272e9b73a3a2247b97588c8a70
12 changes: 9 additions & 3 deletions docs/faas/faas-metrics.md
Original file line number Diff line number Diff line change
@@ -45,10 +45,12 @@ The following metrics are recorded by the FaaS instance.

This metric is [recommended][MetricRecommended].

This metric SHOULD use [`ExplicitBucketBoundaries`](../general/metrics-general.md#explicit-bucket-boundaries-for-duration-histograms).

<!-- semconv metric.faas.invoke_duration(metric_table) -->
| 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 |
<!-- endsemconv -->

<!-- semconv metric.faas.invoke_duration(full) -->
@@ -71,10 +73,12 @@ This metric is [recommended][MetricRecommended].

This metric is [recommended][MetricRecommended].

This metric SHOULD use [`ExplicitBucketBoundaries`](../general/metrics-general.md#explicit-bucket-boundaries-for-duration-histograms).

<!-- semconv metric.faas.init_duration(metric_table) -->
| 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 |
<!-- endsemconv -->

<!-- semconv metric.faas.init_duration(full) -->
@@ -227,10 +231,12 @@ This metric is [recommended][MetricRecommended].

This metric is [recommended][MetricRecommended].

This metric SHOULD use [`ExplicitBucketBoundaries`](../general/metrics-general.md#explicit-bucket-boundaries-for-duration-histograms).

<!-- semconv metric.faas.cpu_usage(metric_table) -->
| 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 |
<!-- endsemconv -->

<!-- semconv metric.faas.cpu_usage(full) -->
6 changes: 3 additions & 3 deletions model/metrics/faas-metrics.yaml
Original file line number Diff line number Diff line change
@@ -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"
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
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