aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/opentelemetry/metric-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/opentelemetry/metric-helpers')
-rw-r--r--server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
index b66fa474c..8ed219e9e 100644
--- a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
+++ b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
@@ -1,5 +1,5 @@
1import { readdir } from 'fs-extra' 1import { readdir } from 'fs-extra'
2import { constants, PerformanceObserver } from 'perf_hooks' 2import { constants, NodeGCPerformanceDetail, PerformanceObserver } from 'perf_hooks'
3import * as process from 'process' 3import * as process from 'process'
4import { Meter, ObservableResult } from '@opentelemetry/api' 4import { Meter, ObservableResult } from '@opentelemetry/api'
5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' 5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics'
@@ -110,9 +110,9 @@ export class NodeJSObserversBuilder {
110 // Node < 16 uses entry.kind 110 // Node < 16 uses entry.kind
111 // Node >= 16 uses entry.detail.kind 111 // Node >= 16 uses entry.detail.kind
112 // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties 112 // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties
113 const kind = (entry as any).detail 113 const kind = entry.detail
114 ? kinds[(entry as any).detail.kind] 114 ? kinds[(entry.detail as NodeGCPerformanceDetail).kind]
115 : kinds[entry.kind] 115 : kinds[(entry as any).kind]
116 116
117 // Convert duration from milliseconds to seconds 117 // Convert duration from milliseconds to seconds
118 histogram.record(entry.duration / 1000, { 118 histogram.record(entry.duration / 1000, {