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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 15 additions & 3 deletions docs/faas/faas-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]`.

<!-- 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) -->
Expand All @@ -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 ]`.

<!-- 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) -->
Expand Down Expand Up @@ -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 ]`.

<!-- 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) -->
Expand Down
6 changes: 3 additions & 3 deletions model/metrics/faas-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading