From d23431fcb8d2c78e14128f549ca1a56461d49b25 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Mon, 30 Jan 2023 21:37:01 -0500 Subject: [PATCH] fix metrics import (#721) Signed-off-by: Pierre Tessier --- src/frontend/utils/telemetry/Instrumentation.js | 2 -- src/frontend/utils/telemetry/InstrumentationMiddleware.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/utils/telemetry/Instrumentation.js b/src/frontend/utils/telemetry/Instrumentation.js index 3d83a0245c..e357a95e1b 100644 --- a/src/frontend/utils/telemetry/Instrumentation.js +++ b/src/frontend/utils/telemetry/Instrumentation.js @@ -3,8 +3,6 @@ const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumenta const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc'); const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-grpc'); const { PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics'); - - const { alibabaCloudEcsDetector } = require('@opentelemetry/resource-detector-alibaba-cloud'); const { awsEc2Detector, awsEksDetector } = require('@opentelemetry/resource-detector-aws'); const { containerDetector } = require('@opentelemetry/resource-detector-container'); diff --git a/src/frontend/utils/telemetry/InstrumentationMiddleware.ts b/src/frontend/utils/telemetry/InstrumentationMiddleware.ts index 8c7ba56fd7..b3390414e7 100644 --- a/src/frontend/utils/telemetry/InstrumentationMiddleware.ts +++ b/src/frontend/utils/telemetry/InstrumentationMiddleware.ts @@ -1,7 +1,7 @@ import { NextApiHandler } from 'next'; import { context, Exception, propagation, Span, SpanKind, SpanStatusCode, trace } from '@opentelemetry/api'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; -import { metrics } from '@opentelemetry/api-metrics'; +import { metrics } from '@opentelemetry/api'; const meter = metrics.getMeter('frontend'); const requestCounter = meter.createCounter('app.frontend.requests');