From 0f3e4dea3c2cf9f1dc37dc13fbae23608eabd4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Wed, 20 Apr 2022 20:52:52 +0200 Subject: [PATCH] chore: cleanup API dependencies (#2904) --- .../src/PrometheusSerializer.ts | 2 +- .../opentelemetry-sdk-metrics-base/package.json | 1 - .../packages/opentelemetry-sdk-node/package.json | 10 +++++----- experimental/packages/otlp-transformer/package.json | 5 ++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts b/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts index 391eeba0a0..710ceaf8d8 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts +++ b/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts @@ -24,7 +24,7 @@ import { DataPoint, Histogram, } from '@opentelemetry/sdk-metrics-base'; -import { MetricAttributes } from '@opentelemetry/api-metrics'; +import type { MetricAttributes } from '@opentelemetry/api-metrics'; import { hrTimeToMilliseconds } from '@opentelemetry/core'; type PrometheusDataTypeLiteral = diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/package.json b/experimental/packages/opentelemetry-sdk-metrics-base/package.json index 715edd2fec..d380ffe9b2 100644 --- a/experimental/packages/opentelemetry-sdk-metrics-base/package.json +++ b/experimental/packages/opentelemetry-sdk-metrics-base/package.json @@ -77,7 +77,6 @@ "peerDependencies": { "@opentelemetry/api": "^1.0.0" }, - "todo": "Move API metrics to peer dependencies. While it is using an unpublished name, lerna doesn't properly link it if it is in peer dependencies", "dependencies": { "@opentelemetry/api-metrics": "0.27.0", "@opentelemetry/core": "1.1.1", diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index aa3efbd215..6cca89666f 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -45,21 +45,21 @@ }, "dependencies": { "@opentelemetry/api-metrics": "0.27.0", - "@opentelemetry/core": "~1.1.1", + "@opentelemetry/core": "1.1.1", "@opentelemetry/instrumentation": "0.27.0", "@opentelemetry/resource-detector-aws": "~1.0.0", "@opentelemetry/resource-detector-gcp": "~0.26.0", - "@opentelemetry/resources": "~1.1.1", + "@opentelemetry/resources": "1.1.1", "@opentelemetry/sdk-metrics-base": "0.27.0", - "@opentelemetry/sdk-trace-base": "~1.1.1", - "@opentelemetry/sdk-trace-node": "~1.1.1" + "@opentelemetry/sdk-trace-base": "1.1.1", + "@opentelemetry/sdk-trace-node": "1.1.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.2.0", - "@opentelemetry/context-async-hooks": "1.1.0", + "@opentelemetry/context-async-hooks": "1.1.1", "@types/mocha": "8.2.3", "@types/node": "14.17.33", "@types/semver": "7.3.9", diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index 675bf64c8d..dd848efbd8 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -44,12 +44,10 @@ "README.md" ], "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.2.0", - "@opentelemetry/api-metrics": "~0.27.0" + "@opentelemetry/api": ">=1.0.0 <1.2.0" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.2.0", - "@opentelemetry/api-metrics": "~0.27.0", "@types/mocha": "8.2.3", "@types/webpack-env": "1.16.3", "codecov": "3.8.3", @@ -71,6 +69,7 @@ "webpack": "4.46.0" }, "dependencies": { + "@opentelemetry/api-metrics": "0.27.0", "@opentelemetry/core": "1.1.1", "@opentelemetry/resources": "1.1.1", "@opentelemetry/sdk-metrics-base": "0.27.0",