Aggregate FunctionsMetrics
otel_rate
Computes the per-second rate from an OpenTelemetry type=sum metric.
Syntax
otel_rate($raw)Parameters
Prop
Type
Returns: real
Syntax
otel_rate($raw, per_duration)Parameters
Prop
Type
Returns: real
Examples
Example 1
OtelMetrics
| where metric_type == "sum"
| summarize otel_rate($raw) by bin(timestamp, 1m), metric_name| timestamp (datetime) | metric_name (dynamic) | otel_rate_$raw (real) |
|---|---|---|
| 2024-01-01T00:00:00Z | "http.requests.total" | null |
| 2024-01-01T00:01:00Z | "http.requests.total" | 100.0 |
| 2024-01-01T00:02:00Z | "http.requests.total" | 100.0 |
Example 2
OtelMetrics
| where metric_type == "sum"
| summarize otel_rate($raw, 1m) by metric_name| metric_name (dynamic) | otel_rate_$raw (real) |
|---|---|
| "http.requests.total" | 6000.0 |