Skip to content

Commit 9bbfb4f

Browse files
committed
Compute ext-service OpenTelemetry golden metrics from metrics instead of spans
1 parent 7889522 commit 9bbfb4f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

entity-types/ext-service/golden_metrics.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ throughput:
33
unit: REQUESTS_PER_MINUTE
44
queries:
55
opentelemetry:
6-
select: rate(count(*), 1 minute)
7-
from: Span
8-
where: span.kind LIKE 'server' OR span.kind LIKE 'consumer' OR kind LIKE 'server' OR kind LIKE 'consumer'
6+
select: rate(count(%.server%duration), 1 minute)
7+
from: Metric
8+
where: http.server.duration IS NOT NULL OR http.server.request.duration IS NOT NULL OR rpc.server.duration IS NOT NULL
99
newrelic-opentelemetry:
1010
select: rate(count(apm.service.transaction.duration), 1 minute)
1111
from: Metric
@@ -23,9 +23,9 @@ errorRate:
2323
unit: PERCENTAGE
2424
queries:
2525
opentelemetry:
26-
select: (filter(count(*), WHERE otel.status_code = 'ERROR') * 100) / count(*)
27-
from: Span
28-
where: span.kind LIKE 'server' OR span.kind LIKE 'consumer' OR kind LIKE 'server' OR kind LIKE 'consumer'
26+
select: filter(count(%.server%duration), WHERE numeric(http.status_code) >= 500 OR numeric(http.response.status_code) >= 500)/count(%.server%duration)
27+
from: Metric
28+
where: http.server.duration IS NOT NULL OR http.server.request.duration IS NOT NULL
2929
newrelic-opentelemetry:
3030
select: sum(apm.service.error.count) * 100 / count(apm.service.transaction.duration)
3131
from: Metric
@@ -43,9 +43,9 @@ responseTimeMs:
4343
unit: MS
4444
queries:
4545
opentelemetry:
46-
select: average(duration.ms)
47-
from: Span
48-
where: span.kind LIKE 'server' OR span.kind LIKE 'consumer' OR kind LIKE 'server' OR kind LIKE 'consumer'
46+
select: average(convert(%.server%duration, unit OR 's', 'ms'))
47+
from: Metric
48+
where: http.server.duration IS NOT NULL OR http.server.request.duration IS NOT NULL OR rpc.server.duration IS NOT NULL
4949
newrelic-opentelemetry:
5050
select: average(convert(apm.service.transaction.duration, unit, 'ms'))
5151
from: Metric

0 commit comments

Comments
 (0)