diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 82a1493dab..744582a847 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,4 +12,4 @@ # https://help.github.com/en/articles/about-code-owners # -* @dyladan @mayurkale22 @OlivierAlbertini @vmarchaud @markwolff @obecny @mwear @naseemkullah @legendecas @Flarna @johnbley @MSNev @Rauno56 +* @open-telemetry/javascript-approvers diff --git a/README.md b/README.md index 266da91589..fb1e420742 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ npm install --save @opentelemetry/auto-instrumentations-node const process = require('process'); const opentelemetry = require('@opentelemetry/sdk-node'); const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); -const { ConsoleSpanExporter } = require('@opentelemetry/tracing'); +const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); @@ -128,7 +128,7 @@ process.on('SIGTERM', () => { node -r ./tracing.js app.js ``` -The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](getting-started/README.md). For more information about automatic instrumentation see [@opentelemetry/node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/tracing][otel-tracing] +The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](getting-started/README.md). For more information about automatic instrumentation see [@opentelemetry/sdk-trace-node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/sdk-trace-base][otel-tracing] ### Library Author @@ -223,10 +223,10 @@ Maintainers ([@open-telemetry/js-maintainers](https://github.com/orgs/open-telem | Package | Description | |----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [@opentelemetry/tracing][otel-tracing] | This module provides a full control over instrumentation and span creation. It doesn't load [`async_hooks`](https://nodejs.org/api/async_hooks.html) or any instrumentation by default. It is intended for use both on the server and in the browser. | -| [@opentelemetry/metrics][otel-metrics] | This module provides instruments and meters for reporting of time series data. | -| [@opentelemetry/node][otel-node] | This module provides automatic tracing for Node.js applications. It is intended for use on the server only. | -| [@opentelemetry/web][otel-web] | This module provides automated instrumentation and tracing for Web applications. It is intended for use in the browser only. | +| [@opentelemetry/sdk-trace-base][otel-tracing] | This module provides a full control over instrumentation and span creation. It doesn't load [`async_hooks`](https://nodejs.org/api/async_hooks.html) or any instrumentation by default. It is intended for use both on the server and in the browser. | +| [@opentelemetry/sdk-metrics-base][otel-metrics] | This module provides instruments and meters for reporting of time series data. | +| [@opentelemetry/sdk-trace-node][otel-node] | This module provides automatic tracing for Node.js applications. It is intended for use on the server only. | +| [@opentelemetry/sdk-trace-web][otel-web] | This module provides automated instrumentation and tracing for Web applications. It is intended for use in the browser only. | ### Compatible Exporters @@ -283,11 +283,18 @@ To request automatic tracing support for a module not on this list, please [file ## Upgrade guidelines -### 0.23.x to x +### 0.24.x to x -- `ResourceAttributes` renamed to `SemanticResourceAttributes` in the `@opentelemetry/semantic-conventions` package +- SDKs packages for trace and metrics has been renamed to have a consistent naming schema: + - @opentelemetry/tracing -> @opentelemetry/sdk-trace-base + - @opentelemetry/node -> @opentelemetry/sdk-trace-node + - @opentelemetry/web -> @opentelemetry/sdk-trace-web + - @opentelemetry/metrics -> @opentelemetry/sdk-metrics-base + - @opentelemetry/node-sdk -> @opentelemetry/sdk-node + +### 0.23.x to 0.24.x -### 0.20.x to x +- `ResourceAttributes` renamed to `SemanticResourceAttributes` in the `@opentelemetry/semantic-conventions` package ### 0.19.x to 0.20.0 @@ -471,8 +478,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [docs]: https://open-telemetry.github.io/opentelemetry-js [compliance-matrix]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md -[otel-metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics -[otel-node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node +[otel-metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-metrics-base +[otel-node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node [otel-instrumentation-fetch]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-fetch [otel-instrumentation-grpc]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-grpc @@ -480,8 +487,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [otel-instrumentation-xml-http-request]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-xml-http-request [otel-shim-opentracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing -[otel-tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing -[otel-web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web +[otel-tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base +[otel-web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web [otel-api]: https://github.com/open-telemetry/opentelemetry-js-api [otel-core]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core [generate-api-documentation]: https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md#generating-api-documentation diff --git a/backwards-compatability/node10/index.ts b/backwards-compatability/node10/index.ts index 985d78f7d2..d124b8ed05 100644 --- a/backwards-compatability/node10/index.ts +++ b/backwards-compatability/node10/index.ts @@ -1,5 +1,5 @@ import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +import {ConsoleSpanExporter} from '@opentelemetry/sdk-trace-base'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/backwards-compatability/node10/package.json b/backwards-compatability/node10/package.json index 591ea030a1..5982b63496 100644 --- a/backwards-compatability/node10/package.json +++ b/backwards-compatability/node10/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@opentelemetry/sdk-node": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" }, "devDependencies": { "@types/node": "10.17.60", diff --git a/backwards-compatability/node10/tsconfig.json b/backwards-compatability/node10/tsconfig.json index 0e5977e0b9..b5317ec3ef 100644 --- a/backwards-compatability/node10/tsconfig.json +++ b/backwards-compatability/node10/tsconfig.json @@ -12,7 +12,7 @@ "path": "../../packages/opentelemetry-sdk-node" }, { - "path": "../../packages/opentelemetry-tracing" + "path": "../../packages/opentelemetry-sdk-trace-base" } ] } diff --git a/backwards-compatability/node12/index.ts b/backwards-compatability/node12/index.ts index 985d78f7d2..d124b8ed05 100644 --- a/backwards-compatability/node12/index.ts +++ b/backwards-compatability/node12/index.ts @@ -1,5 +1,5 @@ import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +import {ConsoleSpanExporter} from '@opentelemetry/sdk-trace-base'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/backwards-compatability/node12/package.json b/backwards-compatability/node12/package.json index 78bf4febf3..e730eb0975 100644 --- a/backwards-compatability/node12/package.json +++ b/backwards-compatability/node12/package.json @@ -9,10 +9,10 @@ }, "dependencies": { "@opentelemetry/sdk-node": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" }, "devDependencies": { - "@types/node": "12.20.17", + "@types/node": "12.20.19", "typescript": "4.3.5" }, "author": "OpenTelemetry Authors", diff --git a/backwards-compatability/node12/tsconfig.json b/backwards-compatability/node12/tsconfig.json index 0e5977e0b9..b5317ec3ef 100644 --- a/backwards-compatability/node12/tsconfig.json +++ b/backwards-compatability/node12/tsconfig.json @@ -12,7 +12,7 @@ "path": "../../packages/opentelemetry-sdk-node" }, { - "path": "../../packages/opentelemetry-tracing" + "path": "../../packages/opentelemetry-sdk-trace-base" } ] } diff --git a/backwards-compatability/node8/index.ts b/backwards-compatability/node8/index.ts index 985d78f7d2..d124b8ed05 100644 --- a/backwards-compatability/node8/index.ts +++ b/backwards-compatability/node8/index.ts @@ -1,5 +1,5 @@ import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +import {ConsoleSpanExporter} from '@opentelemetry/sdk-trace-base'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/backwards-compatability/node8/package.json b/backwards-compatability/node8/package.json index cdf553ff85..a013a0a1cf 100644 --- a/backwards-compatability/node8/package.json +++ b/backwards-compatability/node8/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@opentelemetry/sdk-node": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" }, "devDependencies": { "@types/node": "8.10.66", diff --git a/backwards-compatability/node8/tsconfig.json b/backwards-compatability/node8/tsconfig.json index 0e5977e0b9..b5317ec3ef 100644 --- a/backwards-compatability/node8/tsconfig.json +++ b/backwards-compatability/node8/tsconfig.json @@ -12,7 +12,7 @@ "path": "../../packages/opentelemetry-sdk-node" }, { - "path": "../../packages/opentelemetry-tracing" + "path": "../../packages/opentelemetry-sdk-trace-base" } ] } diff --git a/benchmark/tracer.js b/benchmark/tracer.js index 5fda6521b9..62e30e2fab 100644 --- a/benchmark/tracer.js +++ b/benchmark/tracer.js @@ -2,7 +2,7 @@ const benchmark = require('./benchmark'); const opentelemetry = require('../packages/opentelemetry-api'); -const { BasicTracerProvider, BatchSpanProcessor, InMemorySpanExporter, SimpleSpanProcessor } = require('../packages/opentelemetry-tracing'); +const { BasicTracerProvider, BatchSpanProcessor, InMemorySpanExporter, SimpleSpanProcessor } = require('../packages/opentelemetry-sdk-trace-base'); // Clear any previous global logger opentelemetry.diag.setLogger(); diff --git a/doc/processor-api.md b/doc/processor-api.md index ec7caddb0c..b3abbcdecc 100644 --- a/doc/processor-api.md +++ b/doc/processor-api.md @@ -1,6 +1,6 @@ # Processor API Guide -[The processor](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-metrics/src/export/Processor.ts?rgh-link-date=2020-05-25T18%3A43%3A57Z) has two responsibilities: choosing which aggregator to choose for a metric instrument and store the last record for each metric ready to be exported. +[The processor](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-metrics-base/src/export/Processor.ts?rgh-link-date=2020-05-25T18%3A43%3A57Z) has two responsibilities: choosing which aggregator to choose for a metric instrument and store the last record for each metric ready to be exported. ## Selecting a specific aggregator for metrics @@ -9,7 +9,7 @@ Sometimes you may want to use a specific aggregator for one of your metric, expo Here is what an aggregator that does that would look like: ```ts -import { Aggregator } from '@opentelemetry/metrics'; +import { Aggregator } from '@opentelemetry/sdk-metrics-base'; import { hrTime } from '@opentelemetry/core'; export class AverageAggregator implements Aggregator { @@ -52,7 +52,7 @@ import { CounterSumAggregator, ObserverAggregator, MeasureExactAggregator, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; export class CustomProcessor extends UngroupedProcessor { aggregatorFor (metricDescriptor: MetricDescriptor) { @@ -84,7 +84,7 @@ import { MeasureExactAggregator, MeterProvider, Aggregator, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { hrTime } from '@opentelemetry/core'; export class AverageAggregator implements Aggregator { diff --git a/examples/basic-tracer-node/README.md b/examples/basic-tracer-node/README.md index 98ce8700c7..46f6d3c3a9 100644 --- a/examples/basic-tracer-node/README.md +++ b/examples/basic-tracer-node/README.md @@ -1,6 +1,6 @@ # Overview -This example shows how to use [@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing) to instrument a simple Node.js application - e.g. a batch job. +This example shows how to use [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base) to instrument a simple Node.js application - e.g. a batch job. Our example will export spans data simultaneously on `Console` and [Jaeger](https://www.jaegertracing.io), however you can run your code anywhere and can use any exporter that OpenTelemetry supports. @@ -35,7 +35,7 @@ Click on the trace to view its details. ## Useful links - For more information on OpenTelemetry, visit: -- For more information on tracing, visit: +- For more information on tracing, visit: ## LICENSE diff --git a/examples/basic-tracer-node/index.js b/examples/basic-tracer-node/index.js index 0125c7c233..3c85a54c6e 100644 --- a/examples/basic-tracer-node/index.js +++ b/examples/basic-tracer-node/index.js @@ -3,7 +3,7 @@ const opentelemetry = require('@opentelemetry/api'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const provider = new BasicTracerProvider({ diff --git a/examples/basic-tracer-node/package.json b/examples/basic-tracer-node/package.json index f8f145d627..990c0c4751 100644 --- a/examples/basic-tracer-node/package.json +++ b/examples/basic-tracer-node/package.json @@ -2,7 +2,7 @@ "name": "example-basic-tracer-node", "private": true, "version": "0.24.0", - "description": "Example of using @opentelemetry/tracing in Node.js", + "description": "Example of using @opentelemetry/sdk-trace-base in Node.js", "main": "index.js", "scripts": { "start": "node ./index.js" @@ -24,9 +24,9 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme" } diff --git a/examples/collector-exporter-node/README.md b/examples/collector-exporter-node/README.md index 543514476b..bbaf44229e 100644 --- a/examples/collector-exporter-node/README.md +++ b/examples/collector-exporter-node/README.md @@ -49,7 +49,7 @@ Note: It may take some time for the application metrics to appear on the Prometh ## Useful links - For more information on OpenTelemetry, visit: -- For more information on tracing, visit: +- For more information on tracing, visit: ## LICENSE diff --git a/examples/collector-exporter-node/metrics.js b/examples/collector-exporter-node/metrics.js index abcff409c1..d8df8be495 100644 --- a/examples/collector-exporter-node/metrics.js +++ b/examples/collector-exporter-node/metrics.js @@ -4,7 +4,7 @@ const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector'); // const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-grpc'); // const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-proto'); -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); diff --git a/examples/collector-exporter-node/package.json b/examples/collector-exporter-node/package.json index 51fe93d9ec..042e27b557 100644 --- a/examples/collector-exporter-node/package.json +++ b/examples/collector-exporter-node/package.json @@ -28,13 +28,13 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-collector": "0.24.0", "@opentelemetry/exporter-collector-grpc": "0.24.0", "@opentelemetry/exporter-collector-proto": "0.24.0", - "@opentelemetry/metrics": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-metrics-base": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme" } diff --git a/examples/collector-exporter-node/tracing.js b/examples/collector-exporter-node/tracing.js index 9e6428132b..c670d3624a 100644 --- a/examples/collector-exporter-node/tracing.js +++ b/examples/collector-exporter-node/tracing.js @@ -1,7 +1,7 @@ 'use strict'; const opentelemetry = require('@opentelemetry/api'); -const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); diff --git a/examples/grpc-js/README.md b/examples/grpc-js/README.md index a92fe4094c..1ec7a42a0e 100644 --- a/examples/grpc-js/README.md +++ b/examples/grpc-js/README.md @@ -64,7 +64,7 @@ Go to Jaeger with your browser (e ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry for Node.js, visit: ## LICENSE diff --git a/examples/grpc-js/package.json b/examples/grpc-js/package.json index 142aa2c4e5..d850a2b369 100644 --- a/examples/grpc-js/package.json +++ b/examples/grpc-js/package.json @@ -29,13 +29,13 @@ }, "dependencies": { "@grpc/grpc-js": "^1.2.12", - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/instrumentation-grpc": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "google-protobuf": "^3.9.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", diff --git a/examples/grpc-js/tracer.js b/examples/grpc-js/tracer.js index cb860c2ffd..5c5a9edb86 100644 --- a/examples/grpc-js/tracer.js +++ b/examples/grpc-js/tracer.js @@ -2,10 +2,10 @@ const opentelemetry = require('@opentelemetry/api'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); diff --git a/examples/grpc/README.md b/examples/grpc/README.md index a92fe4094c..1ec7a42a0e 100644 --- a/examples/grpc/README.md +++ b/examples/grpc/README.md @@ -64,7 +64,7 @@ Go to Jaeger with your browser (e ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry for Node.js, visit: ## LICENSE diff --git a/examples/grpc/package.json b/examples/grpc/package.json index 3bdba4c4e7..75f772161b 100644 --- a/examples/grpc/package.json +++ b/examples/grpc/package.json @@ -28,13 +28,13 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/instrumentation-grpc": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "google-protobuf": "^3.9.2", "grpc": "^1.23.3", "node-pre-gyp": "0.14.0" diff --git a/examples/grpc/tracer.js b/examples/grpc/tracer.js index 81eb9a6449..3dd3adddc7 100644 --- a/examples/grpc/tracer.js +++ b/examples/grpc/tracer.js @@ -2,10 +2,10 @@ const opentelemetry = require('@opentelemetry/api'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); diff --git a/examples/http/README.md b/examples/http/README.md index 2ac9b868b0..a35193c9b6 100644 --- a/examples/http/README.md +++ b/examples/http/README.md @@ -74,7 +74,7 @@ Go to Jaeger with your browser (e ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry for Node.js, visit: ## LICENSE diff --git a/examples/http/package.json b/examples/http/package.json index 7ae41be324..43cbf8b7ae 100644 --- a/examples/http/package.json +++ b/examples/http/package.json @@ -28,13 +28,13 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/instrumentation-http": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", "devDependencies": { diff --git a/examples/http/tracer.js b/examples/http/tracer.js index 7c034f4704..82dbca2f70 100644 --- a/examples/http/tracer.js +++ b/examples/http/tracer.js @@ -2,10 +2,10 @@ const opentelemetry = require('@opentelemetry/api'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); diff --git a/examples/https/README.md b/examples/https/README.md index 609375f703..0a57ae77ac 100644 --- a/examples/https/README.md +++ b/examples/https/README.md @@ -74,7 +74,7 @@ Go to Jaeger with your browser (e ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry for Node.js, visit: ## LICENSE diff --git a/examples/https/package.json b/examples/https/package.json index 952910bafe..479eb53ffc 100644 --- a/examples/https/package.json +++ b/examples/https/package.json @@ -29,13 +29,13 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/instrumentation-http": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", "devDependencies": { diff --git a/examples/https/tracer.js b/examples/https/tracer.js index b323f14614..a223e21804 100644 --- a/examples/https/tracer.js +++ b/examples/https/tracer.js @@ -2,10 +2,10 @@ const opentelemetry = require('@opentelemetry/api'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); diff --git a/examples/metrics/README.md b/examples/metrics/README.md index 8e7eb055ac..34f9f93d3d 100644 --- a/examples/metrics/README.md +++ b/examples/metrics/README.md @@ -42,7 +42,7 @@ npm run start:observer ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry metrics, visit: +- For more information on OpenTelemetry metrics, visit: ## LICENSE diff --git a/examples/metrics/metrics/observer.js b/examples/metrics/metrics/observer.js index 73f13f4a74..def56d872b 100644 --- a/examples/metrics/metrics/observer.js +++ b/examples/metrics/metrics/observer.js @@ -1,6 +1,6 @@ 'use strict'; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); diff --git a/examples/metrics/package.json b/examples/metrics/package.json index 8fbc15cde1..a6ec10654c 100644 --- a/examples/metrics/package.json +++ b/examples/metrics/package.json @@ -2,7 +2,7 @@ "name": "example-metrics", "private": true, "version": "0.24.0", - "description": "Example of using @opentelemetry/metrics", + "description": "Example of using @opentelemetry/sdk-metrics-base", "main": "index.js", "scripts": { "start:observer": "node metrics/observer.js" @@ -26,10 +26,10 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-prometheus": "0.24.0", - "@opentelemetry/metrics": "0.24.0" + "@opentelemetry/sdk-metrics-base": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme" } diff --git a/examples/opentracing-shim/README.md b/examples/opentracing-shim/README.md index 62cee30898..3be4c09d76 100644 --- a/examples/opentracing-shim/README.md +++ b/examples/opentracing-shim/README.md @@ -76,7 +76,7 @@ $ npm run jaeger:client ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry for Node.js, visit: - For more information on OpenTracing, visit: ## LICENSE diff --git a/examples/opentracing-shim/package.json b/examples/opentracing-shim/package.json index 452de9883f..21973dd2b7 100644 --- a/examples/opentracing-shim/package.json +++ b/examples/opentracing-shim/package.json @@ -29,15 +29,15 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", - "@opentelemetry/node": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", "@opentelemetry/resources": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", "@opentelemetry/shim-opentracing": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "opentracing": "^0.14.4" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", diff --git a/examples/opentracing-shim/shim.js b/examples/opentracing-shim/shim.js index f42f281365..fe6771ced4 100644 --- a/examples/opentracing-shim/shim.js +++ b/examples/opentracing-shim/shim.js @@ -2,8 +2,8 @@ const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); const { Resource } = require('@opentelemetry/resources'); -const { NodeTracerProvider } = require('@opentelemetry/node'); -const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); +const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); const { TracerShim } = require('@opentelemetry/shim-opentracing'); diff --git a/examples/prometheus/README.md b/examples/prometheus/README.md index 4b8422ae91..ed7cb9a135 100644 --- a/examples/prometheus/README.md +++ b/examples/prometheus/README.md @@ -54,8 +54,8 @@ If you are using the default configurations, the prometheus client will be avail ## Useful links - For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry metrics, visit: -- For more information on OpenTelemetry for Node.js, visit: +- For more information on OpenTelemetry metrics, visit: +- For more information on OpenTelemetry for Node.js, visit: ## LICENSE diff --git a/examples/prometheus/index.js b/examples/prometheus/index.js index f9ca6e01a6..e486c2701e 100644 --- a/examples/prometheus/index.js +++ b/examples/prometheus/index.js @@ -1,6 +1,6 @@ 'use strict'; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); const exporter = new PrometheusExporter( diff --git a/examples/prometheus/package.json b/examples/prometheus/package.json index b10691e444..7b38ef2072 100644 --- a/examples/prometheus/package.json +++ b/examples/prometheus/package.json @@ -1,7 +1,7 @@ { "name": "prometheus-example", "version": "0.24.0", - "description": "Example of using @opentelemetry/metrics and @opentelemetry/exporter-prometheus", + "description": "Example of using @opentelemetry/sdk-metrics-base and @opentelemetry/exporter-prometheus", "main": "index.js", "scripts": { "start": "node index.js" @@ -9,8 +9,8 @@ "author": "OpenTelemetry Authors", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-prometheus": "0.24.0", - "@opentelemetry/metrics": "0.24.0" + "@opentelemetry/sdk-metrics-base": "0.24.0" } } diff --git a/examples/tracer-web/README.md b/examples/tracer-web/README.md index 785b2d9de5..a8d3f76fd6 100644 --- a/examples/tracer-web/README.md +++ b/examples/tracer-web/README.md @@ -1,6 +1,6 @@ # Overview -This example shows how to use [@opentelemetry/web](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web) with different plugins and setup to instrument your JavaScript code running in the browser. +This example shows how to use [@opentelemetry/sdk-trace-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web) with different plugins and setup to instrument your JavaScript code running in the browser. ## Installation @@ -34,7 +34,7 @@ To see the results, open the browser at and make ## Useful links - For more information on OpenTelemetry, visit: -- For more information on web tracing, visit: +- For more information on web tracing, visit: ## LICENSE diff --git a/examples/tracer-web/examples/fetch/index.js b/examples/tracer-web/examples/fetch/index.js index 10a7c5f2a5..dd966100e9 100644 --- a/examples/tracer-web/examples/fetch/index.js +++ b/examples/tracer-web/examples/fetch/index.js @@ -1,8 +1,8 @@ 'use strict'; import { context, trace } from '@opentelemetry/api'; -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { B3Propagator } from '@opentelemetry/propagator-b3'; diff --git a/examples/tracer-web/examples/metrics/index.js b/examples/tracer-web/examples/metrics/index.js index 8519166ceb..2a84819d53 100644 --- a/examples/tracer-web/examples/metrics/index.js +++ b/examples/tracer-web/examples/metrics/index.js @@ -2,7 +2,7 @@ const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector'); -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); diff --git a/examples/tracer-web/examples/xml-http-request/index.js b/examples/tracer-web/examples/xml-http-request/index.js index 0c2b0d8a5e..da99a1bdd9 100644 --- a/examples/tracer-web/examples/xml-http-request/index.js +++ b/examples/tracer-web/examples/xml-http-request/index.js @@ -1,6 +1,6 @@ import { context, trace } from '@opentelemetry/api'; -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; diff --git a/examples/tracer-web/examples/zipkin/index.js b/examples/tracer-web/examples/zipkin/index.js index 2b1fb65f5b..71c2208fed 100644 --- a/examples/tracer-web/examples/zipkin/index.js +++ b/examples/tracer-web/examples/zipkin/index.js @@ -1,5 +1,5 @@ -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; const provider = new WebTracerProvider(); diff --git a/examples/tracer-web/package.json b/examples/tracer-web/package.json index c36ee25dc1..21c31f09fb 100644 --- a/examples/tracer-web/package.json +++ b/examples/tracer-web/package.json @@ -2,7 +2,7 @@ "name": "web-tracer-example", "private": true, "version": "0.24.0", - "description": "Example of using @opentelemetry/web in browser", + "description": "Example of using @opentelemetry/sdk-trace-web in browser", "main": "index.js", "scripts": { "start": "webpack-dev-server -d --progress --colors --port 8090 --config webpack.config.js --hot --inline --host 0.0.0.0 --content-base examples" @@ -34,7 +34,7 @@ "webpack-merge": "^4.2.2" }, "dependencies": { - "@opentelemetry/api": "^1.0.1", + "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-zone": "0.24.0", "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-collector": "0.24.0", @@ -42,10 +42,10 @@ "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/instrumentation-fetch": "0.24.0", "@opentelemetry/instrumentation-xml-http-request": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "@opentelemetry/propagator-b3": "0.24.0", - "@opentelemetry/tracing": "0.24.0", - "@opentelemetry/web": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0", + "@opentelemetry/sdk-trace-web": "0.24.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme" } diff --git a/getting-started/README.md b/getting-started/README.md index e7f7a02152..132bd340ae 100644 --- a/getting-started/README.md +++ b/getting-started/README.md @@ -54,12 +54,12 @@ This guide uses the example application provided in the [example directory](exam ([link to TypeScript version](ts-example/README.md#install-the-required-opentelemetry-libraries)) -To create traces on NodeJS, you need `@opentelemetry/node`, `@opentelemetry/core`, and any instrumentation required by your application such as gRPC or HTTP. If you're using the example application, you need to install `@opentelemetry/instrumentation-http` and `@opentelemetry/instrumentation-express`. +To create traces on NodeJS, you need `@opentelemetry/sdk-trace-node`, `@opentelemetry/core`, and any instrumentation required by your application such as gRPC or HTTP. If you're using the example application, you need to install `@opentelemetry/instrumentation-http` and `@opentelemetry/instrumentation-express`. ```sh $ npm install \ @opentelemetry/api \ - @opentelemetry/node \ + @opentelemetry/sdk-trace-node \ @opentelemetry/instrumentation-http \ @opentelemetry/instrumentation-express \ @opentelemetry/instrumentation-grpc @@ -77,7 +77,7 @@ Create a file named `tracing.js` and add the following code: 'use strict'; const { diag, DiagConsoleLogger, DiagLogLevel } = require("@opentelemetry/api"); -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { registerInstrumentations } = require("@opentelemetry/instrumentation"); const { HttpInstrumentation } = require("@opentelemetry/instrumentation-http"); const { GrpcInstrumentation } = require("@opentelemetry/instrumentation-grpc"); @@ -111,7 +111,7 @@ To export traces, you need a few more dependencies. Install them with the follow ```sh $ npm install \ - @opentelemetry/tracing \ + @opentelemetry/sdk-trace-base \ @opentelemetry/exporter-zipkin $ # for jaeger you would run this command: @@ -124,10 +124,10 @@ After you install these dependencies, initialize and register them. Modify `trac 'use strict'; const { diag, DiagConsoleLogger, DiagLogLevel } = require("@opentelemetry/api"); -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -const { SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base"); const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin"); const { registerInstrumentations } = require("@opentelemetry/instrumentation"); const { HttpInstrumentation } = require("@opentelemetry/instrumentation-http"); @@ -248,13 +248,13 @@ Here's an overview of what you'll be doing: #### Install the required OpenTelemetry metrics libraries -([link to TypeScript version](ts-example/README.md#install-the-required-opentelemetry-metrics-libraries)) +([link to TypeScript version](ts-example/README.md#install-the-required-opentelemetry-sdk-metrics-base-libraries)) -To create metrics on NodeJS, you need `@opentelemetry/metrics`. +To create metrics on NodeJS, you need `@opentelemetry/sdk-metrics-base`. ```sh $ npm install \ - @opentelemetry/metrics + @opentelemetry/sdk-metrics-base ``` #### Initialize a meter and collect metrics @@ -268,7 +268,7 @@ Create a file named `monitoring.js` and add the following code: ```javascript 'use strict'; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const meter = new MeterProvider().getMeter('your-meter-name'); ``` @@ -278,7 +278,7 @@ Now you can require this file from your application code and use the `Meter` to ```javascript 'use strict'; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const meter = new MeterProvider().getMeter('your-meter-name'); @@ -329,7 +329,7 @@ Next, modify your `monitoring.js` file to look like this: ```javascript "use strict"; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port diff --git a/getting-started/monitored-example/monitoring.js b/getting-started/monitored-example/monitoring.js index 473dd79a1f..4d01ccf675 100644 --- a/getting-started/monitored-example/monitoring.js +++ b/getting-started/monitored-example/monitoring.js @@ -1,6 +1,6 @@ "use strict"; -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port diff --git a/getting-started/monitored-example/package.json b/getting-started/monitored-example/package.json index a448ea6d92..e2869b627c 100644 --- a/getting-started/monitored-example/package.json +++ b/getting-started/monitored-example/package.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/exporter-prometheus": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "axios": "^0.21.0", "express": "^4.17.1" } diff --git a/getting-started/traced-example/package.json b/getting-started/traced-example/package.json index 1a4abfca94..c70ef72f0d 100644 --- a/getting-started/traced-example/package.json +++ b/getting-started/traced-example/package.json @@ -14,8 +14,8 @@ "@opentelemetry/instrumentation-express": "^0.24.0", "@opentelemetry/instrumentation-http": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "axios": "^0.21.0", "express": "^4.17.1" } diff --git a/getting-started/traced-example/tracing.js b/getting-started/traced-example/tracing.js index dd0372ee76..3508c1a0f2 100644 --- a/getting-started/traced-example/tracing.js +++ b/getting-started/traced-example/tracing.js @@ -1,7 +1,7 @@ "use strict"; -const { NodeTracerProvider } = require("@opentelemetry/node"); -const { SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); +const { SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base"); const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin"); diff --git a/getting-started/ts-example/README.md b/getting-started/ts-example/README.md index ee06e6fa5b..49da9bc4a5 100644 --- a/getting-started/ts-example/README.md +++ b/getting-started/ts-example/README.md @@ -12,7 +12,7 @@ This TypeScript guide will walk you through the setup and configuration process - [Collect Metrics Using OpenTelemetry](#collect-metrics-using-opentelemetry) - [Set up a Metrics Backend](#set-up-a-metrics-backend) - [Monitor Your NodeJS Application](#monitor-your-nodejs-application) - - [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-metrics-libraries) + - [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-sdk-metrics-base-libraries) - [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics) - [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter) @@ -54,12 +54,12 @@ This guide uses the example application provided in the [example directory](exam ([link to JavaScript version](../README.md#install-the-required-opentelemetry-libraries)) -To create traces on NodeJS, you will need `@opentelemetry/node`, `@opentelemetry/core`, and any plugins required by your application such as gRPC, or HTTP. If you are using the example application, you will need to install `@opentelemetry/plugin-http`. +To create traces on NodeJS, you will need `@opentelemetry/sdk-trace-node`, `@opentelemetry/core`, and any plugins required by your application such as gRPC, or HTTP. If you are using the example application, you will need to install `@opentelemetry/plugin-http`. ```sh $ npm install \ @opentelemetry/core \ - @opentelemetry/node \ + @opentelemetry/sdk-trace-node \ @opentelemetry/instrumentation \ @opentelemetry/instrumentation-http \ @opentelemetry/instrumentation-express @@ -75,7 +75,7 @@ Create a file named `tracing.ts` and add the following code: ```typescript import { LogLevel } from '@opentelemetry/core'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; @@ -110,7 +110,7 @@ To export traces, we will need a few more dependencies. Install them with the fo ```sh $ npm install \ - @opentelemetry/tracing \ + @opentelemetry/sdk-trace-base \ @opentelemetry/exporter-zipkin $ # for jaeger you would run this command: @@ -121,9 +121,9 @@ After these dependencies are installed, we will need to initialize and register ```typescript import { LogLevel } from '@opentelemetry/core'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; -import { SimpleSpanProcessor } from '@opentelemetry/tracing'; +import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; // For Jaeger, use the following line instead: // import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; @@ -248,12 +248,12 @@ An example application which can be used with this guide can be found at in the #### Install the required OpenTelemetry metrics libraries -([link to JavaScript version](../README.md#install-the-required-opentelemetry-metrics-libraries)) +([link to JavaScript version](../README.md#install-the-required-opentelemetry-sdk-metrics-base-libraries)) -To create metrics on NodeJS, you will need `@opentelemetry/metrics`. +To create metrics on NodeJS, you will need `@opentelemetry/sdk-metrics-base`. ```sh -npm install @opentelemetry/metrics +npm install @opentelemetry/sdk-metrics-base ``` #### Initialize a meter and collect metrics @@ -265,7 +265,7 @@ In order to create and monitor metrics, we will need a `Meter`. In OpenTelemetry Create a file named `monitoring.ts` and add the following code: ```typescript -import { MeterProvider } from '@opentelemetry/metrics'; +import { MeterProvider } from '@opentelemetry/sdk-metrics-base'; const meter = new MeterProvider().getMeter('your-meter-name'); ``` @@ -273,7 +273,7 @@ const meter = new MeterProvider().getMeter('your-meter-name'); Now, you can require this file from your application code and use the `Meter` to create and manage metrics. The simplest of these metrics is a counter. Let's create and export from our `monitoring.ts` file a middleware function that express can use to count all requests by route. Modify the `monitoring.ts` file so that it looks like this: ```typescript -import { MeterProvider } from '@opentelemetry/metrics'; +import { MeterProvider } from '@opentelemetry/sdk-metrics-base'; import { Request, Response, NextFunction } from 'express'; const meter = new MeterProvider().getMeter('your-meter-name'); @@ -324,7 +324,7 @@ Next, modify your `monitoring.ts` file to look like this: ```typescript import { Request, Response, NextFunction } from 'express'; -import { MeterProvider } from '@opentelemetry/metrics'; +import { MeterProvider } from '@opentelemetry/sdk-metrics-base'; import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'; const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port; diff --git a/getting-started/ts-example/example/package.json b/getting-started/ts-example/example/package.json index 7cc0713122..ba41a9a5aa 100644 --- a/getting-started/ts-example/example/package.json +++ b/getting-started/ts-example/example/package.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/express": "4.17.13", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "ts-node": "10.1.0" }, "dependencies": { diff --git a/getting-started/ts-example/monitored-example/monitoring.ts b/getting-started/ts-example/monitored-example/monitoring.ts index dd9432d5b0..626cc76323 100644 --- a/getting-started/ts-example/monitored-example/monitoring.ts +++ b/getting-started/ts-example/monitored-example/monitoring.ts @@ -1,5 +1,5 @@ import { Request, Response, NextFunction } from 'express'; -import { MeterProvider } from '@opentelemetry/metrics'; +import { MeterProvider } from '@opentelemetry/sdk-metrics-base'; import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'; const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port; diff --git a/getting-started/ts-example/monitored-example/package.json b/getting-started/ts-example/monitored-example/package.json index 7f9c420e7e..cc47ce0b08 100644 --- a/getting-started/ts-example/monitored-example/package.json +++ b/getting-started/ts-example/monitored-example/package.json @@ -10,12 +10,12 @@ "license": "Apache-2.0", "devDependencies": { "@types/express": "4.17.13", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "ts-node": "10.1.0" }, "dependencies": { "@opentelemetry/exporter-prometheus": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "axios": "^0.21.0", "express": "^4.17.1" } diff --git a/getting-started/ts-example/traced-example/package.json b/getting-started/ts-example/traced-example/package.json index e804f5844b..5969f5da1c 100644 --- a/getting-started/ts-example/traced-example/package.json +++ b/getting-started/ts-example/traced-example/package.json @@ -10,17 +10,17 @@ "license": "Apache-2.0", "devDependencies": { "@types/express": "4.17.13", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "ts-node": "10.1.0" }, "dependencies": { "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-zipkin": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", - "@opentelemetry/node": "0.24.0", "@opentelemetry/instrumentation-express": "^0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", "@opentelemetry/instrumentation-http": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "axios": "^0.21.0", "express": "^4.17.1" } diff --git a/getting-started/ts-example/traced-example/tracing.ts b/getting-started/ts-example/traced-example/tracing.ts index ebac14e034..fe2ce7e4b2 100644 --- a/getting-started/ts-example/traced-example/tracing.ts +++ b/getting-started/ts-example/traced-example/tracing.ts @@ -1,8 +1,8 @@ -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; const { Resource } = require('@opentelemetry/resources'); const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); -import { SimpleSpanProcessor } from '@opentelemetry/tracing'; +import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; // For Jaeger, use the following line instead: // import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 2e407b6a69..83efcb4c42 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -14,7 +14,7 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-async-hooks": "0.24.0", "@opentelemetry/core": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "axios": "0.21.1", "body-parser": "1.19.0", "express": "4.17.1" diff --git a/integration-tests/propagation-validation-server/tsconfig.json b/integration-tests/propagation-validation-server/tsconfig.json index 529c32cf6d..eb74c6b4c6 100644 --- a/integration-tests/propagation-validation-server/tsconfig.json +++ b/integration-tests/propagation-validation-server/tsconfig.json @@ -13,7 +13,7 @@ "path": "../../packages/opentelemetry-core" }, { - "path": "../../packages/opentelemetry-tracing" + "path": "../../packages/opentelemetry-sdk-trace-base" } ] } diff --git a/integration-tests/propagation-validation-server/validation-server.js b/integration-tests/propagation-validation-server/validation-server.js index 3587669cc5..1a1f8fab15 100644 --- a/integration-tests/propagation-validation-server/validation-server.js +++ b/integration-tests/propagation-validation-server/validation-server.js @@ -1,6 +1,6 @@ const axios = require("axios"); const { HttpTraceContextPropagator } = require("@opentelemetry/core"); -const { BasicTracerProvider } = require("@opentelemetry/tracing"); +const { BasicTracerProvider } = require("@opentelemetry/sdk-trace-base"); const { context, propagation, trace, ROOT_CONTEXT } = require("@opentelemetry/api"); const { AsyncHooksContextManager, diff --git a/package.json b/package.json index cb0233b2d2..67aff04614 100644 --- a/package.json +++ b/package.json @@ -47,11 +47,11 @@ "devDependencies": { "@commitlint/cli": "12.1.4", "@commitlint/config-conventional": "12.1.4", - "@typescript-eslint/eslint-plugin": "4.28.5", - "@typescript-eslint/parser": "4.28.5", + "@typescript-eslint/eslint-plugin": "4.29.0", + "@typescript-eslint/parser": "4.29.0", "beautify-benchmark": "0.2.4", "benchmark": "2.1.4", - "eslint": "7.31.0", + "eslint": "7.32.0", "eslint-config-airbnb-base": "14.2.1", "eslint-plugin-header": "3.1.1", "eslint-plugin-import": "2.23.4", @@ -61,7 +61,7 @@ "lerna": "3.22.1", "lerna-changelog": "1.0.1", "markdownlint-cli": "0.28.1", - "typedoc": "0.21.4", + "typedoc": "0.21.5", "typescript": "4.3.5", "update-ts-references": "2.4.0" }, diff --git a/packages/opentelemetry-api-metrics/README.md b/packages/opentelemetry-api-metrics/README.md index a8576e98e4..2f89541062 100644 --- a/packages/opentelemetry-api-metrics/README.md +++ b/packages/opentelemetry-api-metrics/README.md @@ -21,7 +21,7 @@ To get started you need to install the SDK and instrumentations, create a MeterP $ # Install metrics dependencies $ npm install \ @opentelemetry/api-metrics \ - @opentelemetry/metrics \ + @opentelemetry/sdk-metrics-base \ @opentelemetry/exporter-prometheus # add exporters as needed ``` @@ -37,7 +37,7 @@ To collect traces and metrics, you will have to tell the SDK where to export tel ```javascript const api = require("@opentelemetry/api-metrics"); -const { MeterProvider } = require("@opentelemetry/metrics"); +const { MeterProvider } = require("@opentelemetry/sdk-metrics-base"); const { PrometheusExporter } = require("@opentelemetry/exporter-prometheus"); const meterProvider = new MeterProvider({ @@ -102,9 +102,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html [context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html -[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web -[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing -[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node -[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics +[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web +[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base +[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node +[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-metrics-base [other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters diff --git a/packages/opentelemetry-api-metrics/package.json b/packages/opentelemetry-api-metrics/package.json index 6a0632d0f3..25164619e0 100644 --- a/packages/opentelemetry-api-metrics/package.json +++ b/packages/opentelemetry-api-metrics/package.json @@ -58,7 +58,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", "istanbul-instrumenter-loader": "3.0.1", diff --git a/packages/opentelemetry-api-metrics/src/NoopMeter.ts b/packages/opentelemetry-api-metrics/src/NoopMeter.ts index 45a90b8fd8..6e0fd5bd20 100644 --- a/packages/opentelemetry-api-metrics/src/NoopMeter.ts +++ b/packages/opentelemetry-api-metrics/src/NoopMeter.ts @@ -33,6 +33,7 @@ import { BoundBaseObserver, } from './types/BoundInstrument'; import { ObserverResult } from './types/ObserverResult'; +import { Observation } from './types/Observation'; /** * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses @@ -159,7 +160,7 @@ export class NoopMetric implements UnboundMetric { export class NoopCounterMetric extends NoopMetric implements Counter { - add(value: number, labels: Labels) { + add(value: number, labels: Labels): void { this.bind(labels).add(value); } } @@ -167,7 +168,7 @@ export class NoopCounterMetric export class NoopValueRecorderMetric extends NoopMetric implements ValueRecorder { - record(value: number, labels: Labels) { + record(value: number, labels: Labels): void { this.bind(labels).record(value); } } @@ -175,7 +176,7 @@ export class NoopValueRecorderMetric export class NoopBaseObserverMetric extends NoopMetric implements BaseObserver { - observation() { + observation(): Observation { return { observer: this as BaseObserver, value: 0, @@ -198,7 +199,7 @@ export class NoopBoundValueRecorder implements BoundValueRecorder { } export class NoopBoundBaseObserver implements BoundBaseObserver { - update(_value: number) {} + update(_value: number): void {} } export const NOOP_METER = new NoopMeter(); diff --git a/packages/opentelemetry-api-metrics/src/api/metrics.ts b/packages/opentelemetry-api-metrics/src/api/metrics.ts index 1ff07acc06..079fc952e4 100644 --- a/packages/opentelemetry-api-metrics/src/api/metrics.ts +++ b/packages/opentelemetry-api-metrics/src/api/metrics.ts @@ -78,7 +78,7 @@ export class MetricsAPI { } /** Remove the global meter provider */ - public disable() { + public disable(): void { delete _global[GLOBAL_METRICS_API_KEY]; } } diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 4690a3a58a..bed9dce96d 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -42,7 +42,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/shimmer": "1.0.2", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-context-zone-peer-dep/README.md b/packages/opentelemetry-context-zone-peer-dep/README.md index b167b31a0a..4fa14336d3 100644 --- a/packages/opentelemetry-context-zone-peer-dep/README.md +++ b/packages/opentelemetry-context-zone-peer-dep/README.md @@ -22,8 +22,8 @@ npm install --save @opentelemetry/context-zone-peer-dep ```js import { context, trace } from '@opentelemetry/api'; -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { ZoneContextManager } from '@opentelemetry/context-zone-peer-dep'; const providerWithZone = new WebTracerProvider(); diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 04a5aea5f3..9fd27f1046 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -45,10 +45,10 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "@types/zone.js": "0.5.12", diff --git a/packages/opentelemetry-context-zone-peer-dep/src/ZoneContextManager.ts b/packages/opentelemetry-context-zone-peer-dep/src/ZoneContextManager.ts index 9f56f46657..5afa99e1d6 100644 --- a/packages/opentelemetry-context-zone-peer-dep/src/ZoneContextManager.ts +++ b/packages/opentelemetry-context-zone-peer-dep/src/ZoneContextManager.ts @@ -15,7 +15,7 @@ */ import { Context, ContextManager, ROOT_CONTEXT } from '@opentelemetry/api'; -import { Func, TargetWithEvents } from './types'; +import { TargetWithEvents } from './types'; import { isListenerObject } from './util'; /* Key name to be used to save a context reference in Zone */ @@ -24,7 +24,7 @@ const ZONE_CONTEXT_KEY = 'OT_ZONE_CONTEXT'; /** * ZoneContextManager * This module provides an easy functionality for tracing action between asynchronous operations in web. - * It was not possible with standard [StackContextManager]{@link https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-web/src/StackContextManager.ts}. + * It was not possible with standard [StackContextManager]{@link https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-trace-web/src/StackContextManager.ts}. * It heavily depends on [zone.js]{@link https://www.npmjs.com/package/zone.js}. * It stores the information about context in zone. Each Context will have always new Zone; * It also supports binding a certain Span to a target that has "addEventListener" and "removeEventListener". @@ -53,9 +53,10 @@ export class ZoneContextManager implements ContextManager { * @param context A context (span) to be executed within target function * @param target Function to be executed within the context */ + // eslint-disable-next-line @typescript-eslint/ban-types private _bindFunction(context: Context, target: T): T { const manager = this; - const contextWrapper = function (this: any, ...args: unknown[]) { + const contextWrapper = function (this: unknown, ...args: unknown[]) { return manager.with(context, () => target.apply(this, args)); }; Object.defineProperty(contextWrapper, 'length', { @@ -134,16 +135,16 @@ export class ZoneContextManager implements ContextManager { */ private _patchAddEventListener( target: TargetWithEvents, - original: Function, + original: NonNullable, context: Context ) { const contextManager = this; return function ( - this: {}, - event: string, - listener: Func, - opts?: any + this: TargetWithEvents, + event, + listener, + opts ) { if (target.__ot_listeners === undefined) { target.__ot_listeners = {}; @@ -157,7 +158,7 @@ export class ZoneContextManager implements ContextManager { // store a weak reference of the user listener to ours listeners.set(listener, patchedListener); return original.call(this, event, patchedListener, opts); - }; + } as TargetWithEvents['addEventListener']; } /** @@ -167,9 +168,9 @@ export class ZoneContextManager implements ContextManager { */ private _patchRemoveEventListener( target: TargetWithEvents, - original: Function + original: NonNullable ) { - return function (this: {}, event: string, listener: Func) { + return function (this: TargetWithEvents, event, listener) { if ( target.__ot_listeners === undefined || target.__ot_listeners[event] === undefined @@ -180,7 +181,7 @@ export class ZoneContextManager implements ContextManager { const patchedListener = events.get(listener); events.delete(listener); return original.call(this, event, patchedListener || listener); - }; + } as TargetWithEvents['removeEventListener']; } /** diff --git a/packages/opentelemetry-context-zone-peer-dep/src/types.ts b/packages/opentelemetry-context-zone-peer-dep/src/types.ts index 4c073178c1..fbae9e3045 100644 --- a/packages/opentelemetry-context-zone-peer-dep/src/types.ts +++ b/packages/opentelemetry-context-zone-peer-dep/src/types.ts @@ -23,13 +23,13 @@ export type Func = (...args: unknown[]) => T; export interface TargetWithEvents { addEventListener?( event: string, - listener: (...args: any[]) => void, + listener: (...args: unknown[]) => void, opts?: { once: boolean } - ): any; + ): unknown; removeEventListener?( event: string, - listener: (...args: any[]) => void, + listener: (...args: unknown[]) => void, opts?: { once: boolean } - ): any; + ): unknown; __ot_listeners?: { [name: string]: WeakMap, Func> }; } diff --git a/packages/opentelemetry-context-zone/README.md b/packages/opentelemetry-context-zone/README.md index 8668fafe28..87dfcebdaf 100644 --- a/packages/opentelemetry-context-zone/README.md +++ b/packages/opentelemetry-context-zone/README.md @@ -19,8 +19,8 @@ npm install --save @opentelemetry/context-zone ```js import { context, trace } from '@opentelemetry/api'; -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { ZoneContextManager } from '@opentelemetry/context-zone'; const providerWithZone = new WebTracerProvider(); diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index 5415ea1a83..209944054e 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -42,9 +42,9 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.2", diff --git a/packages/opentelemetry-core/README.md b/packages/opentelemetry-core/README.md index f3ddb50cac..35e96e3e59 100644 --- a/packages/opentelemetry-core/README.md +++ b/packages/opentelemetry-core/README.md @@ -74,7 +74,7 @@ Samples every trace regardless of upstream sampling decisions. > This is used as a default Sampler ```js -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { AlwaysOnSampler } = require("@opentelemetry/core"); const tracerProvider = new NodeTracerProvider({ @@ -87,7 +87,7 @@ const tracerProvider = new NodeTracerProvider({ Doesn't sample any trace, regardless of upstream sampling decisions. ```js -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { AlwaysOffSampler } = require("@opentelemetry/core"); const tracerProvider = new NodeTracerProvider({ @@ -103,7 +103,7 @@ Any trace that would be sampled at a given percentage will also be sampled at an The `TraceIDRatioSampler` may be used with the `ParentBasedSampler` to respect the sampled flag of an incoming trace. ```js -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { TraceIdRatioBasedSampler } = require("@opentelemetry/core"); const tracerProvider = new NodeTracerProvider({ @@ -147,7 +147,7 @@ Optional parameters: |present|false|false|`localParentNotSampled()`| ```js -const { NodeTracerProvider } = require("@opentelemetry/node"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); const { ParentBasedSampler, AlwaysOffSampler, TraceIdRatioBasedSampler } = require("@opentelemetry/core"); const tracerProvider = new NodeTracerProvider({ diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index b37bbe86ef..cd99ea3f0d 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -57,7 +57,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", diff --git a/packages/opentelemetry-exporter-collector-grpc/README.md b/packages/opentelemetry-exporter-collector-grpc/README.md index f6bb5c842d..0e6738705b 100644 --- a/packages/opentelemetry-exporter-collector-grpc/README.md +++ b/packages/opentelemetry-exporter-collector-grpc/README.md @@ -23,7 +23,7 @@ In order to set the service name, use the `service.name` resource attribute as p The CollectorTraceExporter in Node expects the URL to only be the hostname. It will not work with `/v1/traces`. ```js -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-grpc'); const collectorOptions = { @@ -47,7 +47,7 @@ By default, plaintext connection is used. In order to use TLS in Node.js, provid const fs = require('fs'); const grpc = require('@grpc/grpc-js'); -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-grpc'); const collectorOptions = { @@ -83,7 +83,7 @@ The exporter can be configured to send custom metadata with each request as in t ```js const grpc = require('@grpc/grpc-js'); -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-grpc'); const metadata = new grpc.Metadata(); @@ -113,7 +113,7 @@ Note, that this will only work if TLS is also configured on the server. The CollectorTraceExporter in Node expects the URL to only be the hostname. It will not work with `/v1/metrics`. All options that work with trace also work with metrics. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-grpc'); const collectorOptions = { // url is optional and can be omitted - default is grpc://localhost:4317 diff --git a/packages/opentelemetry-exporter-collector-grpc/package.json b/packages/opentelemetry-exporter-collector-grpc/package.json index d037462daa..ab80a0173d 100644 --- a/packages/opentelemetry-exporter-collector-grpc/package.json +++ b/packages/opentelemetry-exporter-collector-grpc/package.json @@ -45,11 +45,11 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@opentelemetry/api-metrics": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "cpx": "1.5.0", @@ -69,8 +69,8 @@ "@grpc/proto-loader": "^0.6.0", "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-collector": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" } } diff --git a/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts b/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts index e1c84942cf..53e9dd39a1 100644 --- a/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts +++ b/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts @@ -18,7 +18,7 @@ import { collectorTypes, toCollectorExportMetricServiceRequest, } from '@opentelemetry/exporter-collector'; -import { MetricRecord, MetricExporter } from '@opentelemetry/metrics'; +import { MetricRecord, MetricExporter } from '@opentelemetry/sdk-metrics-base'; import { CollectorExporterConfigNode, ServiceClientType } from './types'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; import { baggageUtils, getEnv } from '@opentelemetry/core'; diff --git a/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts b/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts index cfb147fa39..c996417c9d 100644 --- a/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts +++ b/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; +import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; import { collectorTypes, diff --git a/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts index f765c250cb..139cb359b0 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts @@ -22,7 +22,7 @@ import { } from '@opentelemetry/api-metrics'; import { diag } from '@opentelemetry/api'; import { collectorTypes } from '@opentelemetry/exporter-collector'; -import * as metrics from '@opentelemetry/metrics'; +import * as metrics from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as fs from 'fs'; import * as grpc from '@grpc/grpc-js'; diff --git a/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts index bd498b6de3..d2d16a47ad 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts @@ -20,7 +20,7 @@ import { diag } from '@opentelemetry/api'; import { BasicTracerProvider, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as fs from 'fs'; diff --git a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts index b9346c92d0..871056ac31 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts @@ -23,9 +23,9 @@ import { ValueType, } from '@opentelemetry/api-metrics'; import { collectorTypes } from '@opentelemetry/exporter-collector'; -import * as metrics from '@opentelemetry/metrics'; +import * as metrics from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as grpc from '@grpc/grpc-js'; import { VERSION } from '@opentelemetry/core'; diff --git a/packages/opentelemetry-exporter-collector-grpc/tsconfig.json b/packages/opentelemetry-exporter-collector-grpc/tsconfig.json index 15f3cc9624..4714f84a60 100644 --- a/packages/opentelemetry-exporter-collector-grpc/tsconfig.json +++ b/packages/opentelemetry-exporter-collector-grpc/tsconfig.json @@ -19,13 +19,13 @@ "path": "../opentelemetry-exporter-collector" }, { - "path": "../opentelemetry-metrics" + "path": "../opentelemetry-sdk-metrics-base" }, { "path": "../opentelemetry-resources" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-exporter-collector-proto/README.md b/packages/opentelemetry-exporter-collector-proto/README.md index cd22a8769b..3ed53c555b 100644 --- a/packages/opentelemetry-exporter-collector-proto/README.md +++ b/packages/opentelemetry-exporter-collector-proto/README.md @@ -21,7 +21,7 @@ In order to set the service name, use the `service.name` resource attribute as p ## Traces in Node - PROTO over http ```js -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-proto'); const collectorOptions = { @@ -42,7 +42,7 @@ provider.register(); ## Metrics in Node - PROTO over http ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-proto'); const collectorOptions = { url: '', // url is optional and can be omitted - default is http://localhost:55681/v1/metrics diff --git a/packages/opentelemetry-exporter-collector-proto/package.json b/packages/opentelemetry-exporter-collector-proto/package.json index 4b99cf4056..03490d9f94 100644 --- a/packages/opentelemetry-exporter-collector-proto/package.json +++ b/packages/opentelemetry-exporter-collector-proto/package.json @@ -45,11 +45,11 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@opentelemetry/api-metrics": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "cpx": "1.5.0", @@ -68,9 +68,9 @@ "@grpc/proto-loader": "^0.6.0", "@opentelemetry/core": "0.24.0", "@opentelemetry/exporter-collector": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "protobufjs": "^6.9.0" } } diff --git a/packages/opentelemetry-exporter-collector-proto/src/CollectorMetricExporter.ts b/packages/opentelemetry-exporter-collector-proto/src/CollectorMetricExporter.ts index 76294f1d70..7b7f98d2d6 100644 --- a/packages/opentelemetry-exporter-collector-proto/src/CollectorMetricExporter.ts +++ b/packages/opentelemetry-exporter-collector-proto/src/CollectorMetricExporter.ts @@ -19,7 +19,7 @@ import { toCollectorExportMetricServiceRequest, CollectorExporterNodeConfigBase, } from '@opentelemetry/exporter-collector'; -import { MetricRecord, MetricExporter } from '@opentelemetry/metrics'; +import { MetricRecord, MetricExporter } from '@opentelemetry/sdk-metrics-base'; import { ServiceClientType } from './types'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; import { getEnv, baggageUtils } from '@opentelemetry/core'; diff --git a/packages/opentelemetry-exporter-collector-proto/src/CollectorTraceExporter.ts b/packages/opentelemetry-exporter-collector-proto/src/CollectorTraceExporter.ts index 2715f88474..75a6936a1a 100644 --- a/packages/opentelemetry-exporter-collector-proto/src/CollectorTraceExporter.ts +++ b/packages/opentelemetry-exporter-collector-proto/src/CollectorTraceExporter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; +import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; import { collectorTypes, diff --git a/packages/opentelemetry-exporter-collector-proto/test/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector-proto/test/CollectorMetricExporter.test.ts index 71f52a265b..78d62c2390 100644 --- a/packages/opentelemetry-exporter-collector-proto/test/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-proto/test/CollectorMetricExporter.test.ts @@ -25,7 +25,7 @@ import { CollectorExporterNodeConfigBase, collectorTypes, } from '@opentelemetry/exporter-collector'; -import * as metrics from '@opentelemetry/metrics'; +import * as metrics from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as http from 'http'; import * as sinon from 'sinon'; diff --git a/packages/opentelemetry-exporter-collector-proto/test/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector-proto/test/CollectorTraceExporter.test.ts index 3a8d2a6758..97d7b6b8c5 100644 --- a/packages/opentelemetry-exporter-collector-proto/test/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-proto/test/CollectorTraceExporter.test.ts @@ -21,7 +21,7 @@ import { collectorTypes, CompressionAlgorithm, } from '@opentelemetry/exporter-collector'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as http from 'http'; import * as sinon from 'sinon'; diff --git a/packages/opentelemetry-exporter-collector-proto/test/helper.ts b/packages/opentelemetry-exporter-collector-proto/test/helper.ts index 7c35bb8b53..85cf2b47ce 100644 --- a/packages/opentelemetry-exporter-collector-proto/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-proto/test/helper.ts @@ -24,9 +24,9 @@ import { } from '@opentelemetry/api-metrics'; import { hexToBase64 } from '@opentelemetry/core'; import { collectorTypes } from '@opentelemetry/exporter-collector'; -import * as metrics from '@opentelemetry/metrics'; +import * as metrics from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { Stream } from 'stream'; diff --git a/packages/opentelemetry-exporter-collector-proto/tsconfig.json b/packages/opentelemetry-exporter-collector-proto/tsconfig.json index 15f3cc9624..4714f84a60 100644 --- a/packages/opentelemetry-exporter-collector-proto/tsconfig.json +++ b/packages/opentelemetry-exporter-collector-proto/tsconfig.json @@ -19,13 +19,13 @@ "path": "../opentelemetry-exporter-collector" }, { - "path": "../opentelemetry-metrics" + "path": "../opentelemetry-sdk-metrics-base" }, { "path": "../opentelemetry-resources" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-exporter-collector/README.md b/packages/opentelemetry-exporter-collector/README.md index 93902d9326..0912079a55 100644 --- a/packages/opentelemetry-exporter-collector/README.md +++ b/packages/opentelemetry-exporter-collector/README.md @@ -23,8 +23,8 @@ In order to set the service name, use the `service.name` resource attribute as p The CollectorTraceExporter in Web expects the endpoint to end in `/v1/traces`. ```js -import { BatchSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; const collectorOptions = { @@ -55,7 +55,7 @@ provider.register(); The CollectorMetricExporter in Web expects the endpoint to end in `/v1/metrics`. ```js -import { MeterProvider } from '@opentelemetry/metrics'; +import { MeterProvider } from '@opentelemetry/sdk-metrics-base'; import { CollectorMetricExporter } from '@opentelemetry/exporter-collector'; const collectorOptions = { url: '', // url is optional and can be omitted - default is http://localhost:55681/v1/metrics @@ -79,7 +79,7 @@ counter.add(10, { 'key': 'value' }); ## Traces in Node - JSON over http ```js -const { BasicTracerProvider, BatchSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, BatchSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector'); const collectorOptions = { @@ -106,7 +106,7 @@ provider.register(); ## Metrics in Node ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector'); const collectorOptions = { url: '', // url is optional and can be omitted - default is http://localhost:55681/v1/metrics diff --git a/packages/opentelemetry-exporter-collector/package.json b/packages/opentelemetry-exporter-collector/package.json index 41b566d41f..5279a8f641 100644 --- a/packages/opentelemetry-exporter-collector/package.json +++ b/packages/opentelemetry-exporter-collector/package.json @@ -53,10 +53,10 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.2", @@ -86,8 +86,8 @@ "dependencies": { "@opentelemetry/api-metrics": "0.24.0", "@opentelemetry/core": "0.24.0", - "@opentelemetry/metrics": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" } } diff --git a/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorMetricExporter.ts b/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorMetricExporter.ts index 8d281e8c32..55a2f39d5b 100644 --- a/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorMetricExporter.ts +++ b/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorMetricExporter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MetricRecord, MetricExporter } from '@opentelemetry/metrics'; +import { MetricRecord, MetricExporter } from '@opentelemetry/sdk-metrics-base'; import { CollectorExporterConfigBase } from '../../types'; import * as collectorTypes from '../../types'; import { CollectorExporterBrowserBase } from './CollectorExporterBrowserBase'; diff --git a/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorTraceExporter.ts b/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorTraceExporter.ts index 305875a088..ddbba2696d 100644 --- a/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorTraceExporter.ts +++ b/packages/opentelemetry-exporter-collector/src/platform/browser/CollectorTraceExporter.ts @@ -16,7 +16,7 @@ import { CollectorExporterConfigBase } from '../../types'; import { CollectorExporterBrowserBase } from './CollectorExporterBrowserBase'; -import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; +import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { toCollectorExportTraceServiceRequest } from '../../transform'; import * as collectorTypes from '../../types'; import { getEnv, baggageUtils } from '@opentelemetry/core'; diff --git a/packages/opentelemetry-exporter-collector/src/platform/node/CollectorMetricExporter.ts b/packages/opentelemetry-exporter-collector/src/platform/node/CollectorMetricExporter.ts index dcffc1ac95..eeb01e6548 100644 --- a/packages/opentelemetry-exporter-collector/src/platform/node/CollectorMetricExporter.ts +++ b/packages/opentelemetry-exporter-collector/src/platform/node/CollectorMetricExporter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MetricRecord, MetricExporter } from '@opentelemetry/metrics'; +import { MetricRecord, MetricExporter } from '@opentelemetry/sdk-metrics-base'; import * as collectorTypes from '../../types'; import { CollectorExporterNodeConfigBase } from './types'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; diff --git a/packages/opentelemetry-exporter-collector/src/platform/node/CollectorTraceExporter.ts b/packages/opentelemetry-exporter-collector/src/platform/node/CollectorTraceExporter.ts index 7354491208..7bd0014882 100644 --- a/packages/opentelemetry-exporter-collector/src/platform/node/CollectorTraceExporter.ts +++ b/packages/opentelemetry-exporter-collector/src/platform/node/CollectorTraceExporter.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; +import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; import { CollectorExporterNodeConfigBase } from './types'; import * as collectorTypes from '../../types'; diff --git a/packages/opentelemetry-exporter-collector/src/transform.ts b/packages/opentelemetry-exporter-collector/src/transform.ts index 0554f055f9..710c01debf 100644 --- a/packages/opentelemetry-exporter-collector/src/transform.ts +++ b/packages/opentelemetry-exporter-collector/src/transform.ts @@ -23,7 +23,7 @@ import { } from '@opentelemetry/api'; import * as core from '@opentelemetry/core'; import { Resource } from '@opentelemetry/resources'; -import { ReadableSpan, TimedEvent } from '@opentelemetry/tracing'; +import { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base'; import { CollectorExporterBase } from './CollectorExporterBase'; import { COLLECTOR_SPAN_KIND_MAPPING, diff --git a/packages/opentelemetry-exporter-collector/src/transformMetrics.ts b/packages/opentelemetry-exporter-collector/src/transformMetrics.ts index 424bb77a43..bce26a45d8 100644 --- a/packages/opentelemetry-exporter-collector/src/transformMetrics.ts +++ b/packages/opentelemetry-exporter-collector/src/transformMetrics.ts @@ -22,7 +22,7 @@ import { Histogram, MetricKind, MetricRecord, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; import { CollectorExporterBase } from './CollectorExporterBase'; import { toCollectorResource } from './transform'; diff --git a/packages/opentelemetry-exporter-collector/test/browser/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector/test/browser/CollectorMetricExporter.test.ts index d5208d20a0..5503ef6d45 100644 --- a/packages/opentelemetry-exporter-collector/test/browser/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/browser/CollectorMetricExporter.test.ts @@ -27,7 +27,7 @@ import { BoundValueRecorder, Metric, MetricRecord, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { CollectorMetricExporter } from '../../src/platform/browser/index'; diff --git a/packages/opentelemetry-exporter-collector/test/browser/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector/test/browser/CollectorTraceExporter.test.ts index f0b8e6a1d2..8e8ff33682 100644 --- a/packages/opentelemetry-exporter-collector/test/browser/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/browser/CollectorTraceExporter.test.ts @@ -16,7 +16,7 @@ import { diag } from '@opentelemetry/api'; import { ExportResultCode } from '@opentelemetry/core'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { CollectorTraceExporter } from '../../src/platform/browser/index'; diff --git a/packages/opentelemetry-exporter-collector/test/common/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector/test/common/CollectorMetricExporter.test.ts index 63aea69a14..10c54f6c57 100644 --- a/packages/opentelemetry-exporter-collector/test/common/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/common/CollectorMetricExporter.test.ts @@ -21,7 +21,7 @@ import { BoundObserver, Metric, MetricRecord, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { CollectorExporterBase } from '../../src/CollectorExporterBase'; diff --git a/packages/opentelemetry-exporter-collector/test/common/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector/test/common/CollectorTraceExporter.test.ts index 4d025ad191..65abf27963 100644 --- a/packages/opentelemetry-exporter-collector/test/common/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/common/CollectorTraceExporter.test.ts @@ -15,7 +15,7 @@ */ import { ExportResultCode } from '@opentelemetry/core'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { CollectorExporterBase } from '../../src/CollectorExporterBase'; diff --git a/packages/opentelemetry-exporter-collector/test/common/transform.test.ts b/packages/opentelemetry-exporter-collector/test/common/transform.test.ts index b67eae84ea..0328aaea67 100644 --- a/packages/opentelemetry-exporter-collector/test/common/transform.test.ts +++ b/packages/opentelemetry-exporter-collector/test/common/transform.test.ts @@ -15,7 +15,7 @@ */ import { SpanAttributes } from '@opentelemetry/api'; -import { TimedEvent } from '@opentelemetry/tracing'; +import { TimedEvent } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as transform from '../../src/transform'; import { diff --git a/packages/opentelemetry-exporter-collector/test/common/transformMetrics.test.ts b/packages/opentelemetry-exporter-collector/test/common/transformMetrics.test.ts index 62b93cc077..e94a6cf71d 100644 --- a/packages/opentelemetry-exporter-collector/test/common/transformMetrics.test.ts +++ b/packages/opentelemetry-exporter-collector/test/common/transformMetrics.test.ts @@ -27,7 +27,7 @@ import { BoundValueRecorder, Metric, SumAggregator, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; import * as assert from 'assert'; import * as transform from '../../src/transformMetrics'; diff --git a/packages/opentelemetry-exporter-collector/test/helper.ts b/packages/opentelemetry-exporter-collector/test/helper.ts index 66a4a9ed5d..78c13a8290 100644 --- a/packages/opentelemetry-exporter-collector/test/helper.ts +++ b/packages/opentelemetry-exporter-collector/test/helper.ts @@ -25,9 +25,9 @@ import { ValueType, } from '@opentelemetry/api-metrics'; import { hexToBase64, InstrumentationLibrary, VERSION } from '@opentelemetry/core'; -import * as metrics from '@opentelemetry/metrics'; +import * as metrics from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as collectorTypes from '../src/types'; import { opentelemetryProto } from '../src/types'; diff --git a/packages/opentelemetry-exporter-collector/test/node/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector/test/node/CollectorMetricExporter.test.ts index 750b196a2c..bfef016cfa 100644 --- a/packages/opentelemetry-exporter-collector/test/node/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/node/CollectorMetricExporter.test.ts @@ -27,7 +27,7 @@ import { BoundValueRecorder, Metric, MetricRecord, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as http from 'http'; import * as sinon from 'sinon'; diff --git a/packages/opentelemetry-exporter-collector/test/node/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector/test/node/CollectorTraceExporter.test.ts index f8215d6494..4f38704bd4 100644 --- a/packages/opentelemetry-exporter-collector/test/node/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector/test/node/CollectorTraceExporter.test.ts @@ -16,7 +16,7 @@ import { diag } from '@opentelemetry/api'; import * as core from '@opentelemetry/core'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as http from 'http'; import * as assert from 'assert'; import * as sinon from 'sinon'; diff --git a/packages/opentelemetry-exporter-collector/tsconfig.json b/packages/opentelemetry-exporter-collector/tsconfig.json index 4d3d15abaf..bdfd2b795d 100644 --- a/packages/opentelemetry-exporter-collector/tsconfig.json +++ b/packages/opentelemetry-exporter-collector/tsconfig.json @@ -16,13 +16,13 @@ "path": "../opentelemetry-core" }, { - "path": "../opentelemetry-metrics" + "path": "../opentelemetry-sdk-metrics-base" }, { "path": "../opentelemetry-resources" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index cf314bdbb5..941e752758 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -43,7 +43,7 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/resources": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", @@ -60,7 +60,7 @@ "dependencies": { "@opentelemetry/core": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "jaeger-client": "^3.15.0" } } diff --git a/packages/opentelemetry-exporter-jaeger/src/jaeger.ts b/packages/opentelemetry-exporter-jaeger/src/jaeger.ts index 259ee086f8..614871d019 100644 --- a/packages/opentelemetry-exporter-jaeger/src/jaeger.ts +++ b/packages/opentelemetry-exporter-jaeger/src/jaeger.ts @@ -16,7 +16,7 @@ import { diag } from '@opentelemetry/api'; import { ExportResult, ExportResultCode, getEnv } from '@opentelemetry/core'; -import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; +import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { Socket } from 'dgram'; import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { spanToThrift } from './transform'; diff --git a/packages/opentelemetry-exporter-jaeger/src/transform.ts b/packages/opentelemetry-exporter-jaeger/src/transform.ts index 0d7a83062e..fe7eebfe7b 100644 --- a/packages/opentelemetry-exporter-jaeger/src/transform.ts +++ b/packages/opentelemetry-exporter-jaeger/src/transform.ts @@ -15,7 +15,7 @@ */ import { Link, SpanStatusCode, SpanKind } from '@opentelemetry/api'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { hrTimeToMilliseconds, hrTimeToMicroseconds, diff --git a/packages/opentelemetry-exporter-jaeger/test/jaeger.test.ts b/packages/opentelemetry-exporter-jaeger/test/jaeger.test.ts index 1f45cbc90f..c51dd2b022 100644 --- a/packages/opentelemetry-exporter-jaeger/test/jaeger.test.ts +++ b/packages/opentelemetry-exporter-jaeger/test/jaeger.test.ts @@ -19,7 +19,7 @@ import { JaegerExporter } from '../src'; import { ExportResult, ExportResultCode } from '@opentelemetry/core'; import * as api from '@opentelemetry/api'; import { ThriftProcess } from '../src/types'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { TraceFlags } from '@opentelemetry/api'; import { Resource } from '@opentelemetry/resources'; import * as nock from 'nock'; diff --git a/packages/opentelemetry-exporter-jaeger/test/transform.test.ts b/packages/opentelemetry-exporter-jaeger/test/transform.test.ts index 209b37c9b3..72fe5985d9 100644 --- a/packages/opentelemetry-exporter-jaeger/test/transform.test.ts +++ b/packages/opentelemetry-exporter-jaeger/test/transform.test.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import { spanToThrift } from '../src/transform'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { Resource } from '@opentelemetry/resources'; import * as api from '@opentelemetry/api'; import { ThriftUtils, Utils, ThriftReferenceType } from '../src/types'; diff --git a/packages/opentelemetry-exporter-jaeger/tsconfig.json b/packages/opentelemetry-exporter-jaeger/tsconfig.json index a5d1c2f05c..4c53104103 100644 --- a/packages/opentelemetry-exporter-jaeger/tsconfig.json +++ b/packages/opentelemetry-exporter-jaeger/tsconfig.json @@ -19,7 +19,7 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-exporter-prometheus/README.md b/packages/opentelemetry-exporter-prometheus/README.md index 8d6c711de9..1f64083407 100644 --- a/packages/opentelemetry-exporter-prometheus/README.md +++ b/packages/opentelemetry-exporter-prometheus/README.md @@ -5,14 +5,14 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -The OpenTelemetry Prometheus Metrics Exporter allows the user to send collected [OpenTelemetry Metrics](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics) to Prometheus. +The OpenTelemetry Prometheus Metrics Exporter allows the user to send collected [OpenTelemetry Metrics](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-metrics-base) to Prometheus. [Prometheus](https://prometheus.io/) is a monitoring system that collects metrics, by scraping exposed endpoints at regular intervals, evaluating rule expressions. It can also trigger alerts if certain conditions are met. For assistance setting up Prometheus, [Click here](https://opencensus.io/codelabs/prometheus/#0) for a guided codelab. ## Installation ```bash -npm install --save @opentelemetry/metrics +npm install --save @opentelemetry/sdk-metrics-base npm install --save @opentelemetry/exporter-prometheus ``` @@ -22,7 +22,7 @@ Create & register the exporter on your application. ```js const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); // Add your port and startServer to the Prometheus options const options = {port: 9464, startServer: true}; diff --git a/packages/opentelemetry-exporter-prometheus/package.json b/packages/opentelemetry-exporter-prometheus/package.json index c9324aa81d..98cfd11851 100644 --- a/packages/opentelemetry-exporter-prometheus/package.json +++ b/packages/opentelemetry-exporter-prometheus/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", @@ -57,6 +57,6 @@ "dependencies": { "@opentelemetry/api-metrics": "0.24.0", "@opentelemetry/core": "0.24.0", - "@opentelemetry/metrics": "0.24.0" + "@opentelemetry/sdk-metrics-base": "0.24.0" } } diff --git a/packages/opentelemetry-exporter-prometheus/src/PrometheusExporter.ts b/packages/opentelemetry-exporter-prometheus/src/PrometheusExporter.ts index 2fcf960451..c5f55f334f 100644 --- a/packages/opentelemetry-exporter-prometheus/src/PrometheusExporter.ts +++ b/packages/opentelemetry-exporter-prometheus/src/PrometheusExporter.ts @@ -20,7 +20,7 @@ import { globalErrorHandler, ExportResultCode, } from '@opentelemetry/core'; -import { MetricExporter, MetricRecord } from '@opentelemetry/metrics'; +import { MetricExporter, MetricRecord } from '@opentelemetry/sdk-metrics-base'; import { createServer, IncomingMessage, Server, ServerResponse } from 'http'; import * as url from 'url'; import { ExporterConfig } from './export/types'; diff --git a/packages/opentelemetry-exporter-prometheus/src/PrometheusLabelsBatcher.ts b/packages/opentelemetry-exporter-prometheus/src/PrometheusLabelsBatcher.ts index 5d123d4ef4..ae45d7efb9 100644 --- a/packages/opentelemetry-exporter-prometheus/src/PrometheusLabelsBatcher.ts +++ b/packages/opentelemetry-exporter-prometheus/src/PrometheusLabelsBatcher.ts @@ -17,7 +17,7 @@ import { MetricRecord, MetricDescriptor, AggregatorKind, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { PrometheusCheckpoint } from './types'; interface BatcherCheckpoint { diff --git a/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts b/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts index a05e25abe5..e62ba0478a 100644 --- a/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts +++ b/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts @@ -17,7 +17,7 @@ import { MetricRecord, AggregatorKind, MetricKind, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { PrometheusCheckpoint } from './types'; import { Labels } from '@opentelemetry/api-metrics'; import { hrTimeToMilliseconds } from '@opentelemetry/core'; diff --git a/packages/opentelemetry-exporter-prometheus/src/types.ts b/packages/opentelemetry-exporter-prometheus/src/types.ts index 343dc99197..d8bf3fb673 100644 --- a/packages/opentelemetry-exporter-prometheus/src/types.ts +++ b/packages/opentelemetry-exporter-prometheus/src/types.ts @@ -18,7 +18,7 @@ import { MetricDescriptor, AggregatorKind, MetricRecord, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; export interface PrometheusCheckpoint { descriptor: MetricDescriptor; diff --git a/packages/opentelemetry-exporter-prometheus/test/ExactProcessor.ts b/packages/opentelemetry-exporter-prometheus/test/ExactProcessor.ts index 5ea8d343b7..6330e93eb5 100644 --- a/packages/opentelemetry-exporter-prometheus/test/ExactProcessor.ts +++ b/packages/opentelemetry-exporter-prometheus/test/ExactProcessor.ts @@ -18,7 +18,7 @@ import { MetricDescriptor, MetricRecord, Processor, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; type Constructor = new (...args: T[]) => R; diff --git a/packages/opentelemetry-exporter-prometheus/test/PrometheusExporter.test.ts b/packages/opentelemetry-exporter-prometheus/test/PrometheusExporter.test.ts index 29527736f1..11d0090861 100644 --- a/packages/opentelemetry-exporter-prometheus/test/PrometheusExporter.test.ts +++ b/packages/opentelemetry-exporter-prometheus/test/PrometheusExporter.test.ts @@ -22,7 +22,7 @@ import { MeterProvider, LastValueAggregator, HistogramAggregator, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import * as http from 'http'; diff --git a/packages/opentelemetry-exporter-prometheus/test/PrometheusLabelsBatcher.test.ts b/packages/opentelemetry-exporter-prometheus/test/PrometheusLabelsBatcher.test.ts index 1a72880049..6e0a0d38c6 100644 --- a/packages/opentelemetry-exporter-prometheus/test/PrometheusLabelsBatcher.test.ts +++ b/packages/opentelemetry-exporter-prometheus/test/PrometheusLabelsBatcher.test.ts @@ -20,7 +20,7 @@ import { AggregatorKind, MeterProvider, Meter, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { Labels } from '@opentelemetry/api-metrics'; describe('PrometheusBatcher', () => { diff --git a/packages/opentelemetry-exporter-prometheus/test/PrometheusSerializer.test.ts b/packages/opentelemetry-exporter-prometheus/test/PrometheusSerializer.test.ts index 289631da39..4934ebb788 100644 --- a/packages/opentelemetry-exporter-prometheus/test/PrometheusSerializer.test.ts +++ b/packages/opentelemetry-exporter-prometheus/test/PrometheusSerializer.test.ts @@ -22,7 +22,7 @@ import { ValueRecorderMetric, UpDownCounterMetric, ValueObserverMetric, -} from '@opentelemetry/metrics'; +} from '@opentelemetry/sdk-metrics-base'; import { diag, DiagLogLevel } from '@opentelemetry/api'; import * as assert from 'assert'; import { Labels } from '@opentelemetry/api-metrics'; diff --git a/packages/opentelemetry-exporter-prometheus/test/util.ts b/packages/opentelemetry-exporter-prometheus/test/util.ts index 697dd8ee54..80d4be76f7 100644 --- a/packages/opentelemetry-exporter-prometheus/test/util.ts +++ b/packages/opentelemetry-exporter-prometheus/test/util.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Point, Sum } from '@opentelemetry/metrics'; +import { Point, Sum } from '@opentelemetry/sdk-metrics-base'; import { HrTime } from '@opentelemetry/api'; export const mockedHrTime: HrTime = [1586347902, 211_000_000]; diff --git a/packages/opentelemetry-exporter-prometheus/tsconfig.json b/packages/opentelemetry-exporter-prometheus/tsconfig.json index 006ea333e4..8c349908b1 100644 --- a/packages/opentelemetry-exporter-prometheus/tsconfig.json +++ b/packages/opentelemetry-exporter-prometheus/tsconfig.json @@ -16,7 +16,7 @@ "path": "../opentelemetry-core" }, { - "path": "../opentelemetry-metrics" + "path": "../opentelemetry-sdk-metrics-base" } ] } diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index ae51387fce..60b28be907 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -51,10 +51,10 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.2", @@ -85,6 +85,6 @@ "@opentelemetry/core": "0.24.0", "@opentelemetry/resources": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" } } diff --git a/packages/opentelemetry-exporter-zipkin/src/transform.ts b/packages/opentelemetry-exporter-zipkin/src/transform.ts index 3e34301f85..d20be0a14a 100644 --- a/packages/opentelemetry-exporter-zipkin/src/transform.ts +++ b/packages/opentelemetry-exporter-zipkin/src/transform.ts @@ -15,7 +15,7 @@ */ import * as api from '@opentelemetry/api'; -import { ReadableSpan, TimedEvent } from '@opentelemetry/tracing'; +import { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base'; import { hrTimeToMicroseconds } from '@opentelemetry/core'; import * as zipkinTypes from './types'; import { Resource } from '@opentelemetry/resources'; diff --git a/packages/opentelemetry-exporter-zipkin/src/zipkin.ts b/packages/opentelemetry-exporter-zipkin/src/zipkin.ts index 975a5f261f..17d2eb2bf9 100644 --- a/packages/opentelemetry-exporter-zipkin/src/zipkin.ts +++ b/packages/opentelemetry-exporter-zipkin/src/zipkin.ts @@ -16,7 +16,7 @@ import { diag } from '@opentelemetry/api'; import { ExportResult, ExportResultCode, getEnv } from '@opentelemetry/core'; -import { SpanExporter, ReadableSpan } from '@opentelemetry/tracing'; +import { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { prepareSend } from './platform/index'; import * as zipkinTypes from './types'; import { diff --git a/packages/opentelemetry-exporter-zipkin/test/browser/zipkin.test.ts b/packages/opentelemetry-exporter-zipkin/test/browser/zipkin.test.ts index 8b1a99666c..e9d2c083a6 100644 --- a/packages/opentelemetry-exporter-zipkin/test/browser/zipkin.test.ts +++ b/packages/opentelemetry-exporter-zipkin/test/browser/zipkin.test.ts @@ -18,7 +18,7 @@ import { setGlobalErrorHandler, loggingErrorHandler, } from '@opentelemetry/core'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { ZipkinExporter } from '../../src'; diff --git a/packages/opentelemetry-exporter-zipkin/test/common/transform.test.ts b/packages/opentelemetry-exporter-zipkin/test/common/transform.test.ts index f6ecb21f38..673803be0f 100644 --- a/packages/opentelemetry-exporter-zipkin/test/common/transform.test.ts +++ b/packages/opentelemetry-exporter-zipkin/test/common/transform.test.ts @@ -21,7 +21,7 @@ import { VERSION, } from '@opentelemetry/core'; import { Resource } from '@opentelemetry/resources'; -import { BasicTracerProvider, Span } from '@opentelemetry/tracing'; +import { BasicTracerProvider, Span } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { diff --git a/packages/opentelemetry-exporter-zipkin/test/helper.ts b/packages/opentelemetry-exporter-zipkin/test/helper.ts index 2ab7c4a3c3..b689631329 100644 --- a/packages/opentelemetry-exporter-zipkin/test/helper.ts +++ b/packages/opentelemetry-exporter-zipkin/test/helper.ts @@ -15,7 +15,7 @@ */ import { TraceFlags, SpanStatusCode } from '@opentelemetry/api'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { Resource } from '@opentelemetry/resources'; import * as assert from 'assert'; import { Span } from '../src/types'; diff --git a/packages/opentelemetry-exporter-zipkin/test/node/zipkin.test.ts b/packages/opentelemetry-exporter-zipkin/test/node/zipkin.test.ts index 7650e92307..8749917fe9 100644 --- a/packages/opentelemetry-exporter-zipkin/test/node/zipkin.test.ts +++ b/packages/opentelemetry-exporter-zipkin/test/node/zipkin.test.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import * as nock from 'nock'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { ExportResult, hrTimeToMicroseconds, diff --git a/packages/opentelemetry-exporter-zipkin/tsconfig.json b/packages/opentelemetry-exporter-zipkin/tsconfig.json index a5d1c2f05c..4c53104103 100644 --- a/packages/opentelemetry-exporter-zipkin/tsconfig.json +++ b/packages/opentelemetry-exporter-zipkin/tsconfig.json @@ -19,7 +19,7 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-instrumentation-fetch/README.md b/packages/opentelemetry-instrumentation-fetch/README.md index 33f2caec74..8e98c147f6 100644 --- a/packages/opentelemetry-instrumentation-fetch/README.md +++ b/packages/opentelemetry-instrumentation-fetch/README.md @@ -17,8 +17,8 @@ npm install --save @opentelemetry/instrumentation-fetch ```js 'use strict'; -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; diff --git a/packages/opentelemetry-instrumentation-fetch/package.json b/packages/opentelemetry-instrumentation-fetch/package.json index b24f57bf55..06318ec2f4 100644 --- a/packages/opentelemetry-instrumentation-fetch/package.json +++ b/packages/opentelemetry-instrumentation-fetch/package.json @@ -46,13 +46,13 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-zone": "0.24.0", "@opentelemetry/propagator-b3": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/shimmer": "1.0.2", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", @@ -83,6 +83,6 @@ "@opentelemetry/core": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/web": "0.24.0" + "@opentelemetry/sdk-trace-web": "0.24.0" } } diff --git a/packages/opentelemetry-instrumentation-fetch/src/fetch.ts b/packages/opentelemetry-instrumentation-fetch/src/fetch.ts index 5d107027d7..fe224dbb57 100644 --- a/packages/opentelemetry-instrumentation-fetch/src/fetch.ts +++ b/packages/opentelemetry-instrumentation-fetch/src/fetch.ts @@ -22,7 +22,7 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import * as core from '@opentelemetry/core'; -import * as web from '@opentelemetry/web'; +import * as web from '@opentelemetry/sdk-trace-web'; import { AttributeNames } from './enums/AttributeNames'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import { FetchError, FetchResponse, SpanData } from './types'; diff --git a/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts b/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts index 4c6de800c6..d2542e0f2f 100644 --- a/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts +++ b/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts @@ -28,11 +28,11 @@ import { X_B3_SAMPLED, } from '@opentelemetry/propagator-b3'; import { ZoneContextManager } from '@opentelemetry/context-zone'; -import * as tracing from '@opentelemetry/tracing'; +import * as tracing from '@opentelemetry/sdk-trace-base'; import { PerformanceTimingNames as PTN, WebTracerProvider, -} from '@opentelemetry/web'; +} from '@opentelemetry/sdk-trace-web'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { diff --git a/packages/opentelemetry-instrumentation-fetch/tsconfig.json b/packages/opentelemetry-instrumentation-fetch/tsconfig.json index ec15c2ba21..9777441f0b 100644 --- a/packages/opentelemetry-instrumentation-fetch/tsconfig.json +++ b/packages/opentelemetry-instrumentation-fetch/tsconfig.json @@ -26,10 +26,10 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" }, { - "path": "../opentelemetry-web" + "path": "../opentelemetry-sdk-trace-web" } ] } diff --git a/packages/opentelemetry-instrumentation-grpc/README.md b/packages/opentelemetry-instrumentation-grpc/README.md index 6544576699..ebfc7d4ffc 100644 --- a/packages/opentelemetry-instrumentation-grpc/README.md +++ b/packages/opentelemetry-instrumentation-grpc/README.md @@ -8,7 +8,7 @@ This module provides automatic instrumentation for [`grpc`](https://grpc.github.io/grpc/node/) and [`@grpc/grpc-js`](https://grpc.io/blog/grpc-js-1.0/). Currently, version [`1.x`](https://www.npmjs.com/package/grpc?activeTab=versions) of `grpc` and version [`1.x`](https://www.npmjs.com/package/@grpc/grpc-js?activeTab=versions) of `@grpc/grpc-js` is supported. For automatic instrumentation see the -[@opentelemetry/node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node) package. +[@opentelemetry/sdk-trace-node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package. ## Installation @@ -23,7 +23,7 @@ OpenTelemetry gRPC Instrumentation allows the user to automatically collect trac To load a specific instrumentation (**gRPC** in this case), specify it in the Node Tracer's configuration. ```javascript -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); diff --git a/packages/opentelemetry-instrumentation-grpc/package.json b/packages/opentelemetry-instrumentation-grpc/package.json index 189c7ec2ec..a1fb4dcbea 100644 --- a/packages/opentelemetry-instrumentation-grpc/package.json +++ b/packages/opentelemetry-instrumentation-grpc/package.json @@ -46,10 +46,10 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-async-hooks": "0.24.0", "@opentelemetry/core": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "@types/shimmer": "1.0.2", "@types/sinon": "10.0.2", diff --git a/packages/opentelemetry-instrumentation-grpc/test/helper.ts b/packages/opentelemetry-instrumentation-grpc/test/helper.ts index 62cab27167..559b9acf06 100644 --- a/packages/opentelemetry-instrumentation-grpc/test/helper.ts +++ b/packages/opentelemetry-instrumentation-grpc/test/helper.ts @@ -20,13 +20,13 @@ import { propagation, trace, } from '@opentelemetry/api'; import { HttpTraceContextPropagator } from '@opentelemetry/core'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { ContextManager } from '@opentelemetry/api'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as protoLoader from '@grpc/proto-loader'; import type * as grpcNapi from 'grpc'; diff --git a/packages/opentelemetry-instrumentation-grpc/test/utils/assertionUtils.ts b/packages/opentelemetry-instrumentation-grpc/test/utils/assertionUtils.ts index a0b863b03e..e399a4a5c5 100644 --- a/packages/opentelemetry-instrumentation-grpc/test/utils/assertionUtils.ts +++ b/packages/opentelemetry-instrumentation-grpc/test/utils/assertionUtils.ts @@ -18,7 +18,7 @@ import { SpanKind, SpanStatusCode } from '@opentelemetry/api'; import * as assert from 'assert'; import type * as grpc from 'grpc'; import type * as grpcJs from '@grpc/grpc-js'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { hrTimeToMilliseconds, hrTimeToMicroseconds, diff --git a/packages/opentelemetry-instrumentation-grpc/tsconfig.json b/packages/opentelemetry-instrumentation-grpc/tsconfig.json index b016cc5541..b883522e9b 100644 --- a/packages/opentelemetry-instrumentation-grpc/tsconfig.json +++ b/packages/opentelemetry-instrumentation-grpc/tsconfig.json @@ -22,13 +22,13 @@ "path": "../opentelemetry-instrumentation" }, { - "path": "../opentelemetry-node" + "path": "../opentelemetry-sdk-trace-node" }, { "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-instrumentation-http/README.md b/packages/opentelemetry-instrumentation-http/README.md index 660082f231..139014304f 100644 --- a/packages/opentelemetry-instrumentation-http/README.md +++ b/packages/opentelemetry-instrumentation-http/README.md @@ -8,7 +8,7 @@ This module provides automatic instrumentation for [`http`](https://nodejs.org/api/http.html) and [`https`](https://nodejs.org/api/https.html). For automatic instrumentation see the -[@opentelemetry/node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node) package. +[@opentelemetry/sdk-trace-node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package. ## Installation @@ -24,8 +24,8 @@ To load a specific instrumentation (HTTP in this case), specify it in the Node T ```js const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); -const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/tracing'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const provider = new NodeTracerProvider(); diff --git a/packages/opentelemetry-instrumentation-http/package.json b/packages/opentelemetry-instrumentation-http/package.json index 264b525016..a83bff8dcf 100644 --- a/packages/opentelemetry-instrumentation-http/package.json +++ b/packages/opentelemetry-instrumentation-http/package.json @@ -43,11 +43,11 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-async-hooks": "0.24.0", - "@opentelemetry/node": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "@types/got": "9.6.12", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/request-promise-native": "1.0.18", "@types/semver": "7.3.8", "@types/sinon": "10.0.2", diff --git a/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts b/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts index a43206006f..9f62d807b1 100644 --- a/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts @@ -22,11 +22,11 @@ import { trace, SpanAttributes, } from '@opentelemetry/api'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import { NetTransportValues, SemanticAttributes, diff --git a/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts b/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts index 9246e9e276..60ec6fc4e7 100644 --- a/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts @@ -16,11 +16,11 @@ import { context, SpanKind, Span, propagation } from '@opentelemetry/api'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as path from 'path'; import * as url from 'url'; diff --git a/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts b/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts index 3b9fa505d1..3811dbf803 100644 --- a/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts @@ -28,7 +28,7 @@ import { BasicTracerProvider, InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import { NetTransportValues, SemanticAttributes, diff --git a/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts b/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts index 6bac953bfd..8cec9b73b6 100644 --- a/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts @@ -16,11 +16,11 @@ import { context, SpanKind, propagation, Span } from '@opentelemetry/api'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as path from 'path'; import * as url from 'url'; diff --git a/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts b/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts index b0a659950e..d530fac61c 100644 --- a/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts @@ -21,7 +21,7 @@ import { TraceFlags, context, } from '@opentelemetry/api'; -import { BasicTracerProvider, Span } from '@opentelemetry/tracing'; +import { BasicTracerProvider, Span } from '@opentelemetry/sdk-trace-base'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import * as http from 'http'; diff --git a/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts b/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts index 75d21dd731..c9a170861b 100644 --- a/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts @@ -25,11 +25,11 @@ import * as url from 'url'; import { HttpInstrumentation } from '../../src/http'; import { assertSpan } from '../utils/assertSpan'; import * as utils from '../utils/utils'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; const instrumentation = new HttpInstrumentation(); diff --git a/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts b/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts index 729aa1fe91..f1ae83c030 100644 --- a/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts +++ b/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts @@ -28,11 +28,11 @@ import { Socket } from 'net'; import { assertSpan } from '../utils/assertSpan'; import * as url from 'url'; import * as utils from '../utils/utils'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { InMemorySpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { HttpInstrumentation } from '../../src'; diff --git a/packages/opentelemetry-instrumentation-http/test/utils/assertSpan.ts b/packages/opentelemetry-instrumentation-http/test/utils/assertSpan.ts index b28c7dfcaf..a2d67fd7c6 100644 --- a/packages/opentelemetry-instrumentation-http/test/utils/assertSpan.ts +++ b/packages/opentelemetry-instrumentation-http/test/utils/assertSpan.ts @@ -15,7 +15,7 @@ */ import { isValidSpanId, SpanKind, SpanStatus } from '@opentelemetry/api'; import { hrTimeToNanoseconds } from '@opentelemetry/core'; -import { ReadableSpan } from '@opentelemetry/tracing'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import * as http from 'http'; diff --git a/packages/opentelemetry-instrumentation-http/tsconfig.json b/packages/opentelemetry-instrumentation-http/tsconfig.json index 85e840b97b..7af2f290b8 100644 --- a/packages/opentelemetry-instrumentation-http/tsconfig.json +++ b/packages/opentelemetry-instrumentation-http/tsconfig.json @@ -19,13 +19,13 @@ "path": "../opentelemetry-instrumentation" }, { - "path": "../opentelemetry-node" + "path": "../opentelemetry-sdk-trace-node" }, { "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-instrumentation-xml-http-request/README.md b/packages/opentelemetry-instrumentation-xml-http-request/README.md index 1281f0427c..0ce21a824c 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/README.md +++ b/packages/opentelemetry-instrumentation-xml-http-request/README.md @@ -16,8 +16,8 @@ npm install --save @opentelemetry/instrumentation-xml-http-request ## Usage ```js -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; diff --git a/packages/opentelemetry-instrumentation-xml-http-request/package.json b/packages/opentelemetry-instrumentation-xml-http-request/package.json index f590d78094..60d68a0db6 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -46,13 +46,13 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-zone": "0.24.0", "@opentelemetry/propagator-b3": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.2", @@ -82,6 +82,6 @@ "@opentelemetry/core": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/web": "0.24.0" + "@opentelemetry/sdk-trace-web": "0.24.0" } } diff --git a/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts b/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts index eabab83d1c..09d8a0c588 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts +++ b/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts @@ -30,7 +30,7 @@ import { PerformanceTimingNames as PTN, shouldPropagateTraceHeaders, getUrlNormalizingAnchor -} from '@opentelemetry/web'; +} from '@opentelemetry/sdk-trace-web'; import { EventNames } from './enums/EventNames'; import { OpenFunction, diff --git a/packages/opentelemetry-instrumentation-xml-http-request/test/unmocked.test.ts b/packages/opentelemetry-instrumentation-xml-http-request/test/unmocked.test.ts index 95815ce50a..108ca75bb5 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/test/unmocked.test.ts +++ b/packages/opentelemetry-instrumentation-xml-http-request/test/unmocked.test.ts @@ -16,8 +16,8 @@ import { Span } from '@opentelemetry/api'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; -import { ReadableSpan, SpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { XMLHttpRequestInstrumentation } from '../src'; import assert = require('assert'); diff --git a/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts b/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts index 87896e8437..0f82d8b16c 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts +++ b/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts @@ -24,13 +24,13 @@ import { X_B3_TRACE_ID, } from '@opentelemetry/propagator-b3'; import { ZoneContextManager } from '@opentelemetry/context-zone'; -import * as tracing from '@opentelemetry/tracing'; +import * as tracing from '@opentelemetry/sdk-trace-base'; import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import { PerformanceTimingNames as PTN, WebTracerProvider, parseUrl, -} from '@opentelemetry/web'; +} from '@opentelemetry/sdk-trace-web'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { EventNames } from '../src/enums/EventNames'; diff --git a/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json b/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json index ec15c2ba21..9777441f0b 100644 --- a/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json +++ b/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.json @@ -26,10 +26,10 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" }, { - "path": "../opentelemetry-web" + "path": "../opentelemetry-sdk-trace-web" } ] } diff --git a/packages/opentelemetry-instrumentation/README.md b/packages/opentelemetry-instrumentation/README.md index e3beeb7f9d..71845bf879 100644 --- a/packages/opentelemetry-instrumentation/README.md +++ b/packages/opentelemetry-instrumentation/README.md @@ -165,7 +165,7 @@ It also supersedes PluginLoader for node. The old configurations usually looks l ### NODE - old way using TracerProvider - not available anymore ```javascript -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { B3Propagator } = require('@opentelemetry/propagator-b3'); const provider = new NodeTracerProvider({ plugins: { @@ -180,7 +180,7 @@ provider.register({ ### WEB - old way using TracerProvider - not available anymore ```javascript -const { WebTracerProvider } = require('@opentelemetry/web'); +const { WebTracerProvider } = require('@opentelemetry/sdk-trace-web'); const { UserInteractionPlugin } = require('@opentelemetry/plugin-user-interaction'); const { XMLHttpRequestInstrumentation } = require('@opentelemetry/instrumentation-xml-http-request'); const { B3Propagator } = require('@opentelemetry/propagator-b3'); @@ -209,7 +209,7 @@ All plugins will be bound to TracerProvider as well as instrumentations const { B3Propagator } = require('@opentelemetry/propagator-b3'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const tracerProvider = new NodeTracerProvider(); @@ -233,7 +233,7 @@ registerInstrumentations({ const { B3Propagator } = require('@opentelemetry/propagator-b3'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { XMLHttpRequestInstrumentation } = require('@opentelemetry/instrumentation-xml-http-request'); -const { WebTracerProvider } = require('@opentelemetry/web'); +const { WebTracerProvider } = require('@opentelemetry/sdk-trace-web'); const tracerProvider = new WebTracerProvider(); diff --git a/packages/opentelemetry-instrumentation/package.json b/packages/opentelemetry-instrumentation/package.json index d3e0e59273..89afe5efcc 100644 --- a/packages/opentelemetry-instrumentation/package.json +++ b/packages/opentelemetry-instrumentation/package.json @@ -68,10 +68,10 @@ "@opentelemetry/api": "^1.0.2" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "@types/shimmer": "1.0.2", "@types/sinon": "10.0.2", diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index db27feb5f3..8a1ffdb3a5 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -51,7 +51,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "codecov": "3.8.3", "istanbul-instrumenter-loader": "3.0.1", "mocha": "7.2.0", diff --git a/packages/opentelemetry-propagator-jaeger/README.md b/packages/opentelemetry-propagator-jaeger/README.md index f324221271..bea4bc618d 100644 --- a/packages/opentelemetry-propagator-jaeger/README.md +++ b/packages/opentelemetry-propagator-jaeger/README.md @@ -26,7 +26,7 @@ Format: Example of usage: ```javascript -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { JaegerPropagator } = require('@opentelemetry/propagator-jaeger'); const provider = new NodeTracerProvider(); diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index acec3ee71e..375e202b6c 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", diff --git a/packages/opentelemetry-resource-detector-aws/package.json b/packages/opentelemetry-resource-detector-aws/package.json index b9f83a7d85..d4b10bfc86 100644 --- a/packages/opentelemetry-resource-detector-aws/package.json +++ b/packages/opentelemetry-resource-detector-aws/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-resource-detector-gcp/package.json b/packages/opentelemetry-resource-detector-gcp/package.json index 6c17f64131..d105677006 100644 --- a/packages/opentelemetry-resource-detector-gcp/package.json +++ b/packages/opentelemetry-resource-detector-gcp/package.json @@ -42,7 +42,7 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/core": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index d08c44f8b7..70c91e080e 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-metrics/.eslintignore b/packages/opentelemetry-sdk-metrics-base/.eslintignore similarity index 100% rename from packages/opentelemetry-metrics/.eslintignore rename to packages/opentelemetry-sdk-metrics-base/.eslintignore diff --git a/packages/opentelemetry-metrics/.eslintrc.js b/packages/opentelemetry-sdk-metrics-base/.eslintrc.js similarity index 100% rename from packages/opentelemetry-metrics/.eslintrc.js rename to packages/opentelemetry-sdk-metrics-base/.eslintrc.js diff --git a/packages/opentelemetry-metrics/.npmignore b/packages/opentelemetry-sdk-metrics-base/.npmignore similarity index 100% rename from packages/opentelemetry-metrics/.npmignore rename to packages/opentelemetry-sdk-metrics-base/.npmignore diff --git a/packages/opentelemetry-metrics/LICENSE b/packages/opentelemetry-sdk-metrics-base/LICENSE similarity index 100% rename from packages/opentelemetry-metrics/LICENSE rename to packages/opentelemetry-sdk-metrics-base/LICENSE diff --git a/packages/opentelemetry-metrics/README.md b/packages/opentelemetry-sdk-metrics-base/README.md similarity index 91% rename from packages/opentelemetry-metrics/README.md rename to packages/opentelemetry-sdk-metrics-base/README.md index 595fbbbf6e..1761164b0f 100644 --- a/packages/opentelemetry-metrics/README.md +++ b/packages/opentelemetry-sdk-metrics-base/README.md @@ -10,7 +10,7 @@ OpenTelemetry metrics allow a user to collect data and export it to a metrics ba ## Installation ```bash -npm install --save @opentelemetry/metrics +npm install --save @opentelemetry/sdk-metrics-base ``` ## Usage @@ -27,7 +27,7 @@ Example uses for Counter: - count the number of 5xx errors. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); // Initialize the Meter to capture measurements in various ways. const meter = new MeterProvider().getMeter('your-meter-name'); @@ -56,7 +56,7 @@ Example uses for UpDownCounter: - count semaphore up and down operations ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); // Initialize the Meter to capture measurements in various ways. const meter = new MeterProvider().getMeter('your-meter-name'); @@ -79,7 +79,7 @@ Choose this kind of metric when only last value is important without worry about The callback can be sync or async. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const meter = new MeterProvider().getMeter('your-meter-name'); @@ -119,7 +119,7 @@ Choose this kind of metric when sum is important and you want to capture any val The callback can be sync or async. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const meter = new MeterProvider().getMeter('your-meter-name'); @@ -158,7 +158,7 @@ Choose this kind of metric when collecting a sum that never decreases. The callback can be sync or async. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const meter = new MeterProvider().getMeter('your-meter-name'); @@ -196,7 +196,7 @@ function getRandomValue() { Choose this kind of metric when you need to update multiple observers with the results of a single async calculation. ```js -const { MeterProvider } = require('@opentelemetry/metrics'); +const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); const exporter = new PrometheusExporter( @@ -264,9 +264,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-metrics +[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base [dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrsics -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-metrics&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-metrics&type=dev -[npm-url]: https://www.npmjs.com/package/@opentelemetry/metrics +[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-metrics-base&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics-base [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fmetrics.svg diff --git a/packages/opentelemetry-metrics/package.json b/packages/opentelemetry-sdk-metrics-base/package.json similarity index 96% rename from packages/opentelemetry-metrics/package.json rename to packages/opentelemetry-sdk-metrics-base/package.json index 0a3161e6ca..9a36562fb3 100644 --- a/packages/opentelemetry-metrics/package.json +++ b/packages/opentelemetry-sdk-metrics-base/package.json @@ -1,5 +1,5 @@ { - "name": "@opentelemetry/metrics", + "name": "@opentelemetry/sdk-metrics-base", "version": "0.24.0", "description": "OpenTelemetry metrics SDK", "main": "build/src/index.js", @@ -47,7 +47,7 @@ "@opentelemetry/api": "^1.0.2", "@types/lodash.merge": "4.6.6", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-metrics/src/BaseObserverMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/BaseObserverMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/BaseObserverMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/BaseObserverMetric.ts diff --git a/packages/opentelemetry-metrics/src/BatchObserver.ts b/packages/opentelemetry-sdk-metrics-base/src/BatchObserver.ts similarity index 100% rename from packages/opentelemetry-metrics/src/BatchObserver.ts rename to packages/opentelemetry-sdk-metrics-base/src/BatchObserver.ts diff --git a/packages/opentelemetry-metrics/src/BatchObserverResult.ts b/packages/opentelemetry-sdk-metrics-base/src/BatchObserverResult.ts similarity index 100% rename from packages/opentelemetry-metrics/src/BatchObserverResult.ts rename to packages/opentelemetry-sdk-metrics-base/src/BatchObserverResult.ts diff --git a/packages/opentelemetry-metrics/src/BoundInstrument.ts b/packages/opentelemetry-sdk-metrics-base/src/BoundInstrument.ts similarity index 100% rename from packages/opentelemetry-metrics/src/BoundInstrument.ts rename to packages/opentelemetry-sdk-metrics-base/src/BoundInstrument.ts diff --git a/packages/opentelemetry-metrics/src/CounterMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/CounterMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/CounterMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/CounterMetric.ts diff --git a/packages/opentelemetry-metrics/src/Meter.ts b/packages/opentelemetry-sdk-metrics-base/src/Meter.ts similarity index 100% rename from packages/opentelemetry-metrics/src/Meter.ts rename to packages/opentelemetry-sdk-metrics-base/src/Meter.ts diff --git a/packages/opentelemetry-metrics/src/MeterProvider.ts b/packages/opentelemetry-sdk-metrics-base/src/MeterProvider.ts similarity index 100% rename from packages/opentelemetry-metrics/src/MeterProvider.ts rename to packages/opentelemetry-sdk-metrics-base/src/MeterProvider.ts diff --git a/packages/opentelemetry-metrics/src/Metric.ts b/packages/opentelemetry-sdk-metrics-base/src/Metric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/Metric.ts rename to packages/opentelemetry-sdk-metrics-base/src/Metric.ts diff --git a/packages/opentelemetry-metrics/src/ObserverResult.ts b/packages/opentelemetry-sdk-metrics-base/src/ObserverResult.ts similarity index 100% rename from packages/opentelemetry-metrics/src/ObserverResult.ts rename to packages/opentelemetry-sdk-metrics-base/src/ObserverResult.ts diff --git a/packages/opentelemetry-metrics/src/SumObserverMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/SumObserverMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/SumObserverMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/SumObserverMetric.ts diff --git a/packages/opentelemetry-metrics/src/UpDownCounterMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/UpDownCounterMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/UpDownCounterMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/UpDownCounterMetric.ts diff --git a/packages/opentelemetry-metrics/src/UpDownSumObserverMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/UpDownSumObserverMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/UpDownSumObserverMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/UpDownSumObserverMetric.ts diff --git a/packages/opentelemetry-metrics/src/Utils.ts b/packages/opentelemetry-sdk-metrics-base/src/Utils.ts similarity index 100% rename from packages/opentelemetry-metrics/src/Utils.ts rename to packages/opentelemetry-sdk-metrics-base/src/Utils.ts diff --git a/packages/opentelemetry-metrics/src/ValueObserverMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/ValueObserverMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/ValueObserverMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/ValueObserverMetric.ts diff --git a/packages/opentelemetry-metrics/src/ValueRecorderMetric.ts b/packages/opentelemetry-sdk-metrics-base/src/ValueRecorderMetric.ts similarity index 100% rename from packages/opentelemetry-metrics/src/ValueRecorderMetric.ts rename to packages/opentelemetry-sdk-metrics-base/src/ValueRecorderMetric.ts diff --git a/packages/opentelemetry-metrics/src/export/ConsoleMetricExporter.ts b/packages/opentelemetry-sdk-metrics-base/src/export/ConsoleMetricExporter.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/ConsoleMetricExporter.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/ConsoleMetricExporter.ts diff --git a/packages/opentelemetry-metrics/src/export/Controller.ts b/packages/opentelemetry-sdk-metrics-base/src/export/Controller.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/Controller.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/Controller.ts diff --git a/packages/opentelemetry-metrics/src/export/NoopExporter.ts b/packages/opentelemetry-sdk-metrics-base/src/export/NoopExporter.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/NoopExporter.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/NoopExporter.ts diff --git a/packages/opentelemetry-metrics/src/export/Processor.ts b/packages/opentelemetry-sdk-metrics-base/src/export/Processor.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/Processor.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/Processor.ts diff --git a/packages/opentelemetry-metrics/src/export/aggregators/Histogram.ts b/packages/opentelemetry-sdk-metrics-base/src/export/aggregators/Histogram.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/aggregators/Histogram.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/aggregators/Histogram.ts diff --git a/packages/opentelemetry-metrics/src/export/aggregators/LastValue.ts b/packages/opentelemetry-sdk-metrics-base/src/export/aggregators/LastValue.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/aggregators/LastValue.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/aggregators/LastValue.ts diff --git a/packages/opentelemetry-metrics/src/export/aggregators/Sum.ts b/packages/opentelemetry-sdk-metrics-base/src/export/aggregators/Sum.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/aggregators/Sum.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/aggregators/Sum.ts diff --git a/packages/opentelemetry-metrics/src/export/aggregators/index.ts b/packages/opentelemetry-sdk-metrics-base/src/export/aggregators/index.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/aggregators/index.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/aggregators/index.ts diff --git a/packages/opentelemetry-metrics/src/export/types.ts b/packages/opentelemetry-sdk-metrics-base/src/export/types.ts similarity index 100% rename from packages/opentelemetry-metrics/src/export/types.ts rename to packages/opentelemetry-sdk-metrics-base/src/export/types.ts diff --git a/packages/opentelemetry-metrics/src/index.ts b/packages/opentelemetry-sdk-metrics-base/src/index.ts similarity index 100% rename from packages/opentelemetry-metrics/src/index.ts rename to packages/opentelemetry-sdk-metrics-base/src/index.ts diff --git a/packages/opentelemetry-metrics/src/types.ts b/packages/opentelemetry-sdk-metrics-base/src/types.ts similarity index 100% rename from packages/opentelemetry-metrics/src/types.ts rename to packages/opentelemetry-sdk-metrics-base/src/types.ts diff --git a/packages/opentelemetry-metrics/src/version.ts b/packages/opentelemetry-sdk-metrics-base/src/version.ts similarity index 100% rename from packages/opentelemetry-metrics/src/version.ts rename to packages/opentelemetry-sdk-metrics-base/src/version.ts diff --git a/packages/opentelemetry-metrics/test/Meter.test.ts b/packages/opentelemetry-sdk-metrics-base/test/Meter.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/Meter.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/Meter.test.ts diff --git a/packages/opentelemetry-metrics/test/MeterProvider.test.ts b/packages/opentelemetry-sdk-metrics-base/test/MeterProvider.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/MeterProvider.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/MeterProvider.test.ts diff --git a/packages/opentelemetry-metrics/test/Processor.test.ts b/packages/opentelemetry-sdk-metrics-base/test/Processor.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/Processor.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/Processor.test.ts diff --git a/packages/opentelemetry-metrics/test/export/ConsoleMetricExporter.test.ts b/packages/opentelemetry-sdk-metrics-base/test/export/ConsoleMetricExporter.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/export/ConsoleMetricExporter.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/export/ConsoleMetricExporter.test.ts diff --git a/packages/opentelemetry-metrics/test/export/Controller.test.ts b/packages/opentelemetry-sdk-metrics-base/test/export/Controller.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/export/Controller.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/export/Controller.test.ts diff --git a/packages/opentelemetry-metrics/test/export/aggregators/Histogram.test.ts b/packages/opentelemetry-sdk-metrics-base/test/export/aggregators/Histogram.test.ts similarity index 100% rename from packages/opentelemetry-metrics/test/export/aggregators/Histogram.test.ts rename to packages/opentelemetry-sdk-metrics-base/test/export/aggregators/Histogram.test.ts diff --git a/packages/opentelemetry-metrics/tsconfig.esm.json b/packages/opentelemetry-sdk-metrics-base/tsconfig.esm.json similarity index 100% rename from packages/opentelemetry-metrics/tsconfig.esm.json rename to packages/opentelemetry-sdk-metrics-base/tsconfig.esm.json diff --git a/packages/opentelemetry-metrics/tsconfig.json b/packages/opentelemetry-sdk-metrics-base/tsconfig.json similarity index 100% rename from packages/opentelemetry-metrics/tsconfig.json rename to packages/opentelemetry-sdk-metrics-base/tsconfig.json diff --git a/packages/opentelemetry-sdk-node/README.md b/packages/opentelemetry-sdk-node/README.md index 312181551c..49fe0fa8db 100644 --- a/packages/opentelemetry-sdk-node/README.md +++ b/packages/opentelemetry-sdk-node/README.md @@ -96,7 +96,7 @@ Use a custom propagator. Default: [CompositePropagator](../opentelemetry-core/sr ### metricProcessor -Use a custom processor for metrics. Default: [UngroupedProcessor](../opentelemetry-metrics/src/export/Processor.ts#L50) +Use a custom processor for metrics. Default: [UngroupedProcessor](../opentelemetry-sdk-metrics-base/src/export/Processor.ts#L50) ### metricExporter @@ -124,11 +124,11 @@ Configure a custom sampler. By default all traces will be sampled. ### traceExporter -Configure a trace exporter. If an exporter OR span processor is not configured, the tracing SDK will not be initialized and registered. If an exporter is configured, it will be used with a [BatchSpanProcessor](../opentelemetry-tracing/src/platform/node/export/BatchSpanProcessor.ts). +Configure a trace exporter. If an exporter OR span processor is not configured, the tracing SDK will not be initialized and registered. If an exporter is configured, it will be used with a [BatchSpanProcessor](../opentelemetry-sdk-trace-base/src/platform/node/export/BatchSpanProcessor.ts). ### spanLimits -Configure tracing parameters. These are the same trace parameters used to [configure a tracer](../opentelemetry-tracing/src/types.ts#L71). +Configure tracing parameters. These are the same trace parameters used to [configure a tracer](../opentelemetry-sdk-trace-base/src/types.ts#L71). ## Useful links diff --git a/packages/opentelemetry-sdk-node/package.json b/packages/opentelemetry-sdk-node/package.json index 0088cbfbb2..d9f3e48d68 100644 --- a/packages/opentelemetry-sdk-node/package.json +++ b/packages/opentelemetry-sdk-node/package.json @@ -43,12 +43,12 @@ "@opentelemetry/api-metrics": "0.24.0", "@opentelemetry/core": "0.24.0", "@opentelemetry/instrumentation": "0.24.0", - "@opentelemetry/metrics": "0.24.0", - "@opentelemetry/node": "0.24.0", + "@opentelemetry/sdk-metrics-base": "0.24.0", + "@opentelemetry/sdk-trace-node": "0.24.0", "@opentelemetry/resource-detector-aws": "0.24.0", "@opentelemetry/resource-detector-gcp": "0.24.0", "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.2" @@ -57,7 +57,7 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-async-hooks": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "@types/sinon": "10.0.2", "codecov": "3.8.3", diff --git a/packages/opentelemetry-sdk-node/src/index.ts b/packages/opentelemetry-sdk-node/src/index.ts index 500eb03dd5..4d1783c45e 100644 --- a/packages/opentelemetry-sdk-node/src/index.ts +++ b/packages/opentelemetry-sdk-node/src/index.ts @@ -17,9 +17,9 @@ export * as api from '@opentelemetry/api'; export * as contextBase from '@opentelemetry/api'; export * as core from '@opentelemetry/core'; -export * as metrics from '@opentelemetry/metrics'; -export * as node from '@opentelemetry/node'; +export * as metrics from '@opentelemetry/sdk-metrics-base'; +export * as node from '@opentelemetry/sdk-trace-node'; export * as resources from '@opentelemetry/resources'; -export * as tracing from '@opentelemetry/tracing'; +export * as tracing from '@opentelemetry/sdk-trace-base'; export * from './sdk'; export * from './types'; diff --git a/packages/opentelemetry-sdk-node/src/sdk.ts b/packages/opentelemetry-sdk-node/src/sdk.ts index 4f8741d672..46f00ce512 100644 --- a/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/packages/opentelemetry-sdk-node/src/sdk.ts @@ -17,12 +17,12 @@ import { TextMapPropagator } from '@opentelemetry/api'; import { metrics } from '@opentelemetry/api-metrics'; import { ContextManager } from '@opentelemetry/api'; -import { MeterConfig, MeterProvider } from '@opentelemetry/metrics'; +import { MeterConfig, MeterProvider } from '@opentelemetry/sdk-metrics-base'; import { InstrumentationOption, registerInstrumentations, } from '@opentelemetry/instrumentation'; -import { NodeTracerConfig, NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerConfig, NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { awsEc2Detector } from '@opentelemetry/resource-detector-aws'; import { gcpDetector } from '@opentelemetry/resource-detector-gcp'; import { @@ -32,7 +32,7 @@ import { Resource, ResourceDetectionConfig, } from '@opentelemetry/resources'; -import { BatchSpanProcessor, SpanProcessor } from '@opentelemetry/tracing'; +import { BatchSpanProcessor, SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { NodeSDKConfiguration } from './types'; /** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */ diff --git a/packages/opentelemetry-sdk-node/src/types.ts b/packages/opentelemetry-sdk-node/src/types.ts index 27d12b8825..7ecc3f0c7e 100644 --- a/packages/opentelemetry-sdk-node/src/types.ts +++ b/packages/opentelemetry-sdk-node/src/types.ts @@ -17,13 +17,13 @@ import { SpanAttributes, TextMapPropagator, Sampler } from '@opentelemetry/api'; import type { ContextManager } from '@opentelemetry/api'; import { InstrumentationOption } from '@opentelemetry/instrumentation'; -import { MetricExporter, Processor } from '@opentelemetry/metrics'; +import { MetricExporter, Processor } from '@opentelemetry/sdk-metrics-base'; import { Resource } from '@opentelemetry/resources'; import { SpanExporter, SpanProcessor, SpanLimits, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; export interface NodeSDKConfiguration { autoDetectResources: boolean; diff --git a/packages/opentelemetry-sdk-node/test/sdk.test.ts b/packages/opentelemetry-sdk-node/test/sdk.test.ts index 931a6845d5..6584f5f870 100644 --- a/packages/opentelemetry-sdk-node/test/sdk.test.ts +++ b/packages/opentelemetry-sdk-node/test/sdk.test.ts @@ -28,8 +28,8 @@ import { AsyncLocalStorageContextManager, } from '@opentelemetry/context-async-hooks'; import { CompositePropagator } from '@opentelemetry/core'; -import { ConsoleMetricExporter, MeterProvider } from '@opentelemetry/metrics'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { ConsoleMetricExporter, MeterProvider } from '@opentelemetry/sdk-metrics-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { awsEc2Detector } from '@opentelemetry/resource-detector-aws'; import { resetIsAvailableCache } from '@opentelemetry/resource-detector-gcp'; import { Resource } from '@opentelemetry/resources'; @@ -41,7 +41,7 @@ import { import { ConsoleSpanExporter, SimpleSpanProcessor, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { BASE_PATH, diff --git a/packages/opentelemetry-sdk-node/tsconfig.json b/packages/opentelemetry-sdk-node/tsconfig.json index 6f2f2796df..098bf1678a 100644 --- a/packages/opentelemetry-sdk-node/tsconfig.json +++ b/packages/opentelemetry-sdk-node/tsconfig.json @@ -22,10 +22,10 @@ "path": "../opentelemetry-instrumentation" }, { - "path": "../opentelemetry-metrics" + "path": "../opentelemetry-sdk-metrics-base" }, { - "path": "../opentelemetry-node" + "path": "../opentelemetry-sdk-trace-node" }, { "path": "../opentelemetry-resource-detector-aws" @@ -37,7 +37,7 @@ "path": "../opentelemetry-resources" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-tracing/.eslintignore b/packages/opentelemetry-sdk-trace-base/.eslintignore similarity index 100% rename from packages/opentelemetry-tracing/.eslintignore rename to packages/opentelemetry-sdk-trace-base/.eslintignore diff --git a/packages/opentelemetry-tracing/.eslintrc.js b/packages/opentelemetry-sdk-trace-base/.eslintrc.js similarity index 100% rename from packages/opentelemetry-tracing/.eslintrc.js rename to packages/opentelemetry-sdk-trace-base/.eslintrc.js diff --git a/packages/opentelemetry-node/.npmignore b/packages/opentelemetry-sdk-trace-base/.npmignore similarity index 100% rename from packages/opentelemetry-node/.npmignore rename to packages/opentelemetry-sdk-trace-base/.npmignore diff --git a/packages/opentelemetry-node/LICENSE b/packages/opentelemetry-sdk-trace-base/LICENSE similarity index 100% rename from packages/opentelemetry-node/LICENSE rename to packages/opentelemetry-sdk-trace-base/LICENSE diff --git a/packages/opentelemetry-tracing/README.md b/packages/opentelemetry-sdk-trace-base/README.md similarity index 82% rename from packages/opentelemetry-tracing/README.md rename to packages/opentelemetry-sdk-trace-base/README.md index 476ece8e7c..8e744ed13e 100644 --- a/packages/opentelemetry-tracing/README.md +++ b/packages/opentelemetry-sdk-trace-base/README.md @@ -12,20 +12,20 @@ Used standalone, this module provides methods for manual instrumentation of code It does **not** provide automated instrumentation of known libraries, context propagation for asynchronous invocations or distributed-context out-of-the-box. For automated instrumentation for Node.js, please see -[@opentelemetry/node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node). +[@opentelemetry/sdk-trace-node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node). ## Installation ```bash npm install --save @opentelemetry/api -npm install --save @opentelemetry/tracing +npm install --save @opentelemetry/sdk-trace-base ``` ## Usage ```js const opentelemetry = require('@opentelemetry/api'); -const { BasicTracerProvider } = require('@opentelemetry/tracing'); +const { BasicTracerProvider } = require('@opentelemetry/sdk-trace-base'); // To start a trace, you first need to initialize the Tracer provider. // NOTE: The default OpenTelemetry tracer provider does not record any tracing information. @@ -65,9 +65,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-tracing -[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-tracing -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-tracing&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-tracing&type=dev -[npm-url]: https://www.npmjs.com/package/@opentelemetry/tracing +[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-base +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-base +[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-base&type=dev +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-base&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-trace-base [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Ftracing.svg diff --git a/packages/opentelemetry-tracing/karma.conf.js b/packages/opentelemetry-sdk-trace-base/karma.conf.js similarity index 100% rename from packages/opentelemetry-tracing/karma.conf.js rename to packages/opentelemetry-sdk-trace-base/karma.conf.js diff --git a/packages/opentelemetry-tracing/package.json b/packages/opentelemetry-sdk-trace-base/package.json similarity index 97% rename from packages/opentelemetry-tracing/package.json rename to packages/opentelemetry-sdk-trace-base/package.json index 47c88c66b0..e327cffe66 100644 --- a/packages/opentelemetry-tracing/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -1,5 +1,5 @@ { - "name": "@opentelemetry/tracing", + "name": "@opentelemetry/sdk-trace-base", "version": "0.24.0", "description": "OpenTelemetry Tracing", "main": "build/src/index.js", @@ -56,7 +56,7 @@ "@opentelemetry/api": "^1.0.2", "@types/lodash.merge": "4.6.6", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", diff --git a/packages/opentelemetry-tracing/src/BasicTracerProvider.ts b/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts similarity index 100% rename from packages/opentelemetry-tracing/src/BasicTracerProvider.ts rename to packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts diff --git a/packages/opentelemetry-tracing/src/MultiSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/MultiSpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/MultiSpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/MultiSpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/Span.ts b/packages/opentelemetry-sdk-trace-base/src/Span.ts similarity index 100% rename from packages/opentelemetry-tracing/src/Span.ts rename to packages/opentelemetry-sdk-trace-base/src/Span.ts diff --git a/packages/opentelemetry-tracing/src/SpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/SpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/SpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/SpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/TimedEvent.ts b/packages/opentelemetry-sdk-trace-base/src/TimedEvent.ts similarity index 100% rename from packages/opentelemetry-tracing/src/TimedEvent.ts rename to packages/opentelemetry-sdk-trace-base/src/TimedEvent.ts diff --git a/packages/opentelemetry-tracing/src/Tracer.ts b/packages/opentelemetry-sdk-trace-base/src/Tracer.ts similarity index 100% rename from packages/opentelemetry-tracing/src/Tracer.ts rename to packages/opentelemetry-sdk-trace-base/src/Tracer.ts diff --git a/packages/opentelemetry-tracing/src/config.ts b/packages/opentelemetry-sdk-trace-base/src/config.ts similarity index 100% rename from packages/opentelemetry-tracing/src/config.ts rename to packages/opentelemetry-sdk-trace-base/src/config.ts diff --git a/packages/opentelemetry-tracing/src/enums.ts b/packages/opentelemetry-sdk-trace-base/src/enums.ts similarity index 100% rename from packages/opentelemetry-tracing/src/enums.ts rename to packages/opentelemetry-sdk-trace-base/src/enums.ts diff --git a/packages/opentelemetry-tracing/src/export/BatchSpanProcessorBase.ts b/packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/BatchSpanProcessorBase.ts rename to packages/opentelemetry-sdk-trace-base/src/export/BatchSpanProcessorBase.ts diff --git a/packages/opentelemetry-tracing/src/export/ConsoleSpanExporter.ts b/packages/opentelemetry-sdk-trace-base/src/export/ConsoleSpanExporter.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/ConsoleSpanExporter.ts rename to packages/opentelemetry-sdk-trace-base/src/export/ConsoleSpanExporter.ts diff --git a/packages/opentelemetry-tracing/src/export/InMemorySpanExporter.ts b/packages/opentelemetry-sdk-trace-base/src/export/InMemorySpanExporter.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/InMemorySpanExporter.ts rename to packages/opentelemetry-sdk-trace-base/src/export/InMemorySpanExporter.ts diff --git a/packages/opentelemetry-tracing/src/export/NoopSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/export/NoopSpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/NoopSpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/export/NoopSpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/export/ReadableSpan.ts b/packages/opentelemetry-sdk-trace-base/src/export/ReadableSpan.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/ReadableSpan.ts rename to packages/opentelemetry-sdk-trace-base/src/export/ReadableSpan.ts diff --git a/packages/opentelemetry-tracing/src/export/SimpleSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/SimpleSpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/export/SpanExporter.ts b/packages/opentelemetry-sdk-trace-base/src/export/SpanExporter.ts similarity index 100% rename from packages/opentelemetry-tracing/src/export/SpanExporter.ts rename to packages/opentelemetry-sdk-trace-base/src/export/SpanExporter.ts diff --git a/packages/opentelemetry-tracing/src/index.ts b/packages/opentelemetry-sdk-trace-base/src/index.ts similarity index 100% rename from packages/opentelemetry-tracing/src/index.ts rename to packages/opentelemetry-sdk-trace-base/src/index.ts diff --git a/packages/opentelemetry-tracing/src/platform/browser/export/BatchSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/platform/browser/export/BatchSpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/platform/browser/export/BatchSpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/platform/browser/export/BatchSpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/platform/browser/index.ts b/packages/opentelemetry-sdk-trace-base/src/platform/browser/index.ts similarity index 100% rename from packages/opentelemetry-tracing/src/platform/browser/index.ts rename to packages/opentelemetry-sdk-trace-base/src/platform/browser/index.ts diff --git a/packages/opentelemetry-tracing/src/platform/index.ts b/packages/opentelemetry-sdk-trace-base/src/platform/index.ts similarity index 100% rename from packages/opentelemetry-tracing/src/platform/index.ts rename to packages/opentelemetry-sdk-trace-base/src/platform/index.ts diff --git a/packages/opentelemetry-tracing/src/platform/node/export/BatchSpanProcessor.ts b/packages/opentelemetry-sdk-trace-base/src/platform/node/export/BatchSpanProcessor.ts similarity index 100% rename from packages/opentelemetry-tracing/src/platform/node/export/BatchSpanProcessor.ts rename to packages/opentelemetry-sdk-trace-base/src/platform/node/export/BatchSpanProcessor.ts diff --git a/packages/opentelemetry-tracing/src/platform/node/index.ts b/packages/opentelemetry-sdk-trace-base/src/platform/node/index.ts similarity index 100% rename from packages/opentelemetry-tracing/src/platform/node/index.ts rename to packages/opentelemetry-sdk-trace-base/src/platform/node/index.ts diff --git a/packages/opentelemetry-tracing/src/types.ts b/packages/opentelemetry-sdk-trace-base/src/types.ts similarity index 100% rename from packages/opentelemetry-tracing/src/types.ts rename to packages/opentelemetry-sdk-trace-base/src/types.ts diff --git a/packages/opentelemetry-tracing/src/utility.ts b/packages/opentelemetry-sdk-trace-base/src/utility.ts similarity index 100% rename from packages/opentelemetry-tracing/src/utility.ts rename to packages/opentelemetry-sdk-trace-base/src/utility.ts diff --git a/packages/opentelemetry-node/src/version.ts b/packages/opentelemetry-sdk-trace-base/src/version.ts similarity index 100% rename from packages/opentelemetry-node/src/version.ts rename to packages/opentelemetry-sdk-trace-base/src/version.ts diff --git a/packages/opentelemetry-tracing/test/browser/export/BatchSpanProcessor.test.ts b/packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/browser/export/BatchSpanProcessor.test.ts rename to packages/opentelemetry-sdk-trace-base/test/browser/export/BatchSpanProcessor.test.ts diff --git a/packages/opentelemetry-tracing/test/browser/index-webpack.ts b/packages/opentelemetry-sdk-trace-base/test/browser/index-webpack.ts similarity index 100% rename from packages/opentelemetry-tracing/test/browser/index-webpack.ts rename to packages/opentelemetry-sdk-trace-base/test/browser/index-webpack.ts diff --git a/packages/opentelemetry-tracing/test/common/BasicTracerProvider.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/BasicTracerProvider.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts diff --git a/packages/opentelemetry-tracing/test/common/MultiSpanProcessor.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/MultiSpanProcessor.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/MultiSpanProcessor.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/MultiSpanProcessor.test.ts diff --git a/packages/opentelemetry-tracing/test/common/Span.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/Span.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/Span.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/Span.test.ts diff --git a/packages/opentelemetry-tracing/test/common/Tracer.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/Tracer.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/Tracer.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/Tracer.test.ts diff --git a/packages/opentelemetry-tracing/test/common/config.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/config.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/config.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/config.test.ts diff --git a/packages/opentelemetry-tracing/test/common/export/BatchSpanProcessorBase.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/BatchSpanProcessorBase.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/BatchSpanProcessorBase.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/BatchSpanProcessorBase.test.ts diff --git a/packages/opentelemetry-tracing/test/common/export/ConsoleSpanExporter.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/ConsoleSpanExporter.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/ConsoleSpanExporter.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/ConsoleSpanExporter.test.ts diff --git a/packages/opentelemetry-tracing/test/common/export/InMemorySpanExporter.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/InMemorySpanExporter.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts diff --git a/packages/opentelemetry-tracing/test/common/export/SimpleSpanProcessor.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/SimpleSpanProcessor.test.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/SimpleSpanProcessor.test.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/SimpleSpanProcessor.test.ts diff --git a/packages/opentelemetry-tracing/test/common/export/TestStackContextManager.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/TestStackContextManager.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/TestStackContextManager.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/TestStackContextManager.ts diff --git a/packages/opentelemetry-tracing/test/common/export/TestTracingSpanExporter.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/TestTracingSpanExporter.ts similarity index 100% rename from packages/opentelemetry-tracing/test/common/export/TestTracingSpanExporter.ts rename to packages/opentelemetry-sdk-trace-base/test/common/export/TestTracingSpanExporter.ts diff --git a/packages/opentelemetry-tracing/tsconfig.esm.json b/packages/opentelemetry-sdk-trace-base/tsconfig.esm.json similarity index 100% rename from packages/opentelemetry-tracing/tsconfig.esm.json rename to packages/opentelemetry-sdk-trace-base/tsconfig.esm.json diff --git a/packages/opentelemetry-tracing/tsconfig.json b/packages/opentelemetry-sdk-trace-base/tsconfig.json similarity index 100% rename from packages/opentelemetry-tracing/tsconfig.json rename to packages/opentelemetry-sdk-trace-base/tsconfig.json diff --git a/packages/opentelemetry-node/.eslintignore b/packages/opentelemetry-sdk-trace-node/.eslintignore similarity index 100% rename from packages/opentelemetry-node/.eslintignore rename to packages/opentelemetry-sdk-trace-node/.eslintignore diff --git a/packages/opentelemetry-node/.eslintrc.js b/packages/opentelemetry-sdk-trace-node/.eslintrc.js similarity index 100% rename from packages/opentelemetry-node/.eslintrc.js rename to packages/opentelemetry-sdk-trace-node/.eslintrc.js diff --git a/packages/opentelemetry-node/.gitignore b/packages/opentelemetry-sdk-trace-node/.gitignore similarity index 100% rename from packages/opentelemetry-node/.gitignore rename to packages/opentelemetry-sdk-trace-node/.gitignore diff --git a/packages/opentelemetry-tracing/.npmignore b/packages/opentelemetry-sdk-trace-node/.npmignore similarity index 100% rename from packages/opentelemetry-tracing/.npmignore rename to packages/opentelemetry-sdk-trace-node/.npmignore diff --git a/packages/opentelemetry-tracing/LICENSE b/packages/opentelemetry-sdk-trace-node/LICENSE similarity index 100% rename from packages/opentelemetry-tracing/LICENSE rename to packages/opentelemetry-sdk-trace-node/LICENSE diff --git a/packages/opentelemetry-node/README.md b/packages/opentelemetry-sdk-trace-node/README.md similarity index 86% rename from packages/opentelemetry-node/README.md rename to packages/opentelemetry-sdk-trace-node/README.md index 7cc7a333a8..e882cb48d4 100644 --- a/packages/opentelemetry-node/README.md +++ b/packages/opentelemetry-sdk-trace-node/README.md @@ -8,7 +8,7 @@ This module provides *automated instrumentation and tracing* for Node.js applications. For manual instrumentation see the -[@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing) package. +[@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base) package. ## How auto instrumentation works @@ -30,13 +30,13 @@ This instrumentation code will automatically ## Creating custom spans on top of auto-instrumentation -Additionally to automated instrumentation, `NodeTracerProvider` exposes the same API as [@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing), allowing creating custom spans if needed. +Additionally to automated instrumentation, `NodeTracerProvider` exposes the same API as [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base), allowing creating custom spans if needed. ## Installation ```bash npm install --save @opentelemetry/api -npm install --save @opentelemetry/node +npm install --save @opentelemetry/sdk-trace-node # Install instrumentation plugins npm install --save @opentelemetry/instrumentation-http @@ -53,7 +53,7 @@ using `@opentelemetry/plugin-http`. ```javascript const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); // Create and configure NodeTracerProvider const provider = new NodeTracerProvider(); @@ -119,9 +119,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-node -[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-node -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-node&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-node&type=dev -[npm-url]: https://www.npmjs.com/package/@opentelemetry/node +[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-node +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-node +[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-node&type=dev +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-node&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-trace-node [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fnode.svg diff --git a/packages/opentelemetry-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json similarity index 94% rename from packages/opentelemetry-node/package.json rename to packages/opentelemetry-sdk-trace-node/package.json index a67f4ddc8b..67ebd637c5 100644 --- a/packages/opentelemetry-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -1,5 +1,5 @@ { - "name": "@opentelemetry/node", + "name": "@opentelemetry/sdk-trace-node", "version": "0.24.0", "description": "OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications", "main": "build/src/index.js", @@ -45,7 +45,7 @@ "@opentelemetry/resources": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/semver": "7.3.8", "@types/shimmer": "1.0.2", "@types/sinon": "10.0.2", @@ -66,7 +66,7 @@ "@opentelemetry/core": "0.24.0", "@opentelemetry/propagator-b3": "0.24.0", "@opentelemetry/propagator-jaeger": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "semver": "^7.1.3" } } diff --git a/packages/opentelemetry-node/src/NodeTracerProvider.ts b/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts similarity index 98% rename from packages/opentelemetry-node/src/NodeTracerProvider.ts rename to packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts index 326200a296..4465acc030 100644 --- a/packages/opentelemetry-node/src/NodeTracerProvider.ts +++ b/packages/opentelemetry-sdk-trace-node/src/NodeTracerProvider.ts @@ -23,7 +23,7 @@ import { BasicTracerProvider, PROPAGATOR_FACTORY, SDKRegistrationConfig, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as semver from 'semver'; import { NodeTracerConfig } from './config'; import { JaegerPropagator } from '@opentelemetry/propagator-jaeger'; diff --git a/packages/opentelemetry-node/src/config.ts b/packages/opentelemetry-sdk-trace-node/src/config.ts similarity index 92% rename from packages/opentelemetry-node/src/config.ts rename to packages/opentelemetry-sdk-trace-node/src/config.ts index caac5764c6..52eec57bfd 100644 --- a/packages/opentelemetry-node/src/config.ts +++ b/packages/opentelemetry-sdk-trace-node/src/config.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { TracerConfig } from '@opentelemetry/tracing'; +import { TracerConfig } from '@opentelemetry/sdk-trace-base'; /** * NodeTracerConfig provides an interface for configuring a Node Tracer. diff --git a/packages/opentelemetry-node/src/index.ts b/packages/opentelemetry-sdk-trace-node/src/index.ts similarity index 100% rename from packages/opentelemetry-node/src/index.ts rename to packages/opentelemetry-sdk-trace-node/src/index.ts diff --git a/packages/opentelemetry-tracing/src/version.ts b/packages/opentelemetry-sdk-trace-node/src/version.ts similarity index 100% rename from packages/opentelemetry-tracing/src/version.ts rename to packages/opentelemetry-sdk-trace-node/src/version.ts diff --git a/packages/opentelemetry-node/test/NodeTracerProvider.test.ts b/packages/opentelemetry-sdk-trace-node/test/NodeTracerProvider.test.ts similarity index 99% rename from packages/opentelemetry-node/test/NodeTracerProvider.test.ts rename to packages/opentelemetry-sdk-trace-node/test/NodeTracerProvider.test.ts index f3c37d5632..0d53e25eb6 100644 --- a/packages/opentelemetry-node/test/NodeTracerProvider.test.ts +++ b/packages/opentelemetry-sdk-trace-node/test/NodeTracerProvider.test.ts @@ -21,7 +21,7 @@ import { } from '@opentelemetry/api'; import { AlwaysOnSampler, AlwaysOffSampler } from '@opentelemetry/core'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; -import { Span } from '@opentelemetry/tracing'; +import { Span } from '@opentelemetry/sdk-trace-base'; import { Resource } from '@opentelemetry/resources'; import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; diff --git a/packages/opentelemetry-node/test/registration.test.ts b/packages/opentelemetry-sdk-trace-node/test/registration.test.ts similarity index 100% rename from packages/opentelemetry-node/test/registration.test.ts rename to packages/opentelemetry-sdk-trace-node/test/registration.test.ts diff --git a/packages/opentelemetry-node/tsconfig.json b/packages/opentelemetry-sdk-trace-node/tsconfig.json similarity index 92% rename from packages/opentelemetry-node/tsconfig.json rename to packages/opentelemetry-sdk-trace-node/tsconfig.json index 60a27cc6eb..7260da8804 100644 --- a/packages/opentelemetry-node/tsconfig.json +++ b/packages/opentelemetry-sdk-trace-node/tsconfig.json @@ -28,7 +28,7 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-web/.eslintignore b/packages/opentelemetry-sdk-trace-web/.eslintignore similarity index 100% rename from packages/opentelemetry-web/.eslintignore rename to packages/opentelemetry-sdk-trace-web/.eslintignore diff --git a/packages/opentelemetry-web/.eslintrc.js b/packages/opentelemetry-sdk-trace-web/.eslintrc.js similarity index 100% rename from packages/opentelemetry-web/.eslintrc.js rename to packages/opentelemetry-sdk-trace-web/.eslintrc.js diff --git a/packages/opentelemetry-web/.npmignore b/packages/opentelemetry-sdk-trace-web/.npmignore similarity index 100% rename from packages/opentelemetry-web/.npmignore rename to packages/opentelemetry-sdk-trace-web/.npmignore diff --git a/packages/opentelemetry-web/LICENSE b/packages/opentelemetry-sdk-trace-web/LICENSE similarity index 100% rename from packages/opentelemetry-web/LICENSE rename to packages/opentelemetry-sdk-trace-web/LICENSE diff --git a/packages/opentelemetry-web/README.md b/packages/opentelemetry-sdk-trace-web/README.md similarity index 83% rename from packages/opentelemetry-web/README.md rename to packages/opentelemetry-sdk-trace-web/README.md index 9c925f5ed2..cdced55ab3 100644 --- a/packages/opentelemetry-web/README.md +++ b/packages/opentelemetry-sdk-trace-web/README.md @@ -8,7 +8,7 @@ This module provides *automated instrumentation and tracing* for Web applications. For manual instrumentation see the -[@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing) package. +[@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base) package. ## How does automatic tracing work @@ -27,14 +27,14 @@ You can choose to use the `ZoneContextManager` if you want to trace asynchronous ## Installation ```bash -npm install --save @opentelemetry/web +npm install --save @opentelemetry/sdk-trace-web ``` ## Usage ```js -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { DocumentLoad } from '@opentelemetry/plugin-document-load'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; @@ -69,9 +69,9 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-web -[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-web -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-web&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-web&type=dev -[npm-url]: https://www.npmjs.com/package/@opentelemetry/web +[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-web +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-web +[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-trace-web&type=dev +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-trace-web&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-trace-web [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fweb.svg diff --git a/packages/opentelemetry-web/karma.conf.js b/packages/opentelemetry-sdk-trace-web/karma.conf.js similarity index 100% rename from packages/opentelemetry-web/karma.conf.js rename to packages/opentelemetry-sdk-trace-web/karma.conf.js diff --git a/packages/opentelemetry-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json similarity index 94% rename from packages/opentelemetry-web/package.json rename to packages/opentelemetry-sdk-trace-web/package.json index ae3f6dac54..d3d8cbdd5d 100644 --- a/packages/opentelemetry-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -1,5 +1,5 @@ { - "name": "@opentelemetry/web", + "name": "@opentelemetry/sdk-trace-web", "version": "0.24.0", "description": "OpenTelemetry Web Tracer", "main": "build/src/index.js", @@ -45,14 +45,14 @@ "access": "public" }, "devDependencies": { - "@babel/core": "7.14.8", + "@babel/core": "7.15.0", "@opentelemetry/api": "^1.0.2", "@opentelemetry/context-zone": "0.24.0", "@opentelemetry/propagator-b3": "0.24.0", "@opentelemetry/resources": "0.24.0", "@types/jquery": "3.5.6", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.2", @@ -82,6 +82,6 @@ "dependencies": { "@opentelemetry/core": "0.24.0", "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "@opentelemetry/sdk-trace-base": "0.24.0" } } diff --git a/packages/opentelemetry-web/src/StackContextManager.ts b/packages/opentelemetry-sdk-trace-web/src/StackContextManager.ts similarity index 100% rename from packages/opentelemetry-web/src/StackContextManager.ts rename to packages/opentelemetry-sdk-trace-web/src/StackContextManager.ts diff --git a/packages/opentelemetry-web/src/WebTracerProvider.ts b/packages/opentelemetry-sdk-trace-web/src/WebTracerProvider.ts similarity index 98% rename from packages/opentelemetry-web/src/WebTracerProvider.ts rename to packages/opentelemetry-sdk-trace-web/src/WebTracerProvider.ts index 15065502cb..c97f4a4e6f 100644 --- a/packages/opentelemetry-web/src/WebTracerProvider.ts +++ b/packages/opentelemetry-sdk-trace-web/src/WebTracerProvider.ts @@ -18,7 +18,7 @@ import { BasicTracerProvider, SDKRegistrationConfig, TracerConfig, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import { StackContextManager } from './StackContextManager'; /** diff --git a/packages/opentelemetry-web/src/enums/PerformanceTimingNames.ts b/packages/opentelemetry-sdk-trace-web/src/enums/PerformanceTimingNames.ts similarity index 100% rename from packages/opentelemetry-web/src/enums/PerformanceTimingNames.ts rename to packages/opentelemetry-sdk-trace-web/src/enums/PerformanceTimingNames.ts diff --git a/packages/opentelemetry-web/src/index.ts b/packages/opentelemetry-sdk-trace-web/src/index.ts similarity index 100% rename from packages/opentelemetry-web/src/index.ts rename to packages/opentelemetry-sdk-trace-web/src/index.ts diff --git a/packages/opentelemetry-web/src/types.ts b/packages/opentelemetry-sdk-trace-web/src/types.ts similarity index 100% rename from packages/opentelemetry-web/src/types.ts rename to packages/opentelemetry-sdk-trace-web/src/types.ts diff --git a/packages/opentelemetry-web/src/utils.ts b/packages/opentelemetry-sdk-trace-web/src/utils.ts similarity index 100% rename from packages/opentelemetry-web/src/utils.ts rename to packages/opentelemetry-sdk-trace-web/src/utils.ts diff --git a/packages/opentelemetry-web/src/version.ts b/packages/opentelemetry-sdk-trace-web/src/version.ts similarity index 100% rename from packages/opentelemetry-web/src/version.ts rename to packages/opentelemetry-sdk-trace-web/src/version.ts diff --git a/packages/opentelemetry-web/test/StackContextManager.test.ts b/packages/opentelemetry-sdk-trace-web/test/StackContextManager.test.ts similarity index 100% rename from packages/opentelemetry-web/test/StackContextManager.test.ts rename to packages/opentelemetry-sdk-trace-web/test/StackContextManager.test.ts diff --git a/packages/opentelemetry-web/test/WebTracerProvider.test.ts b/packages/opentelemetry-sdk-trace-web/test/WebTracerProvider.test.ts similarity index 98% rename from packages/opentelemetry-web/test/WebTracerProvider.test.ts rename to packages/opentelemetry-sdk-trace-web/test/WebTracerProvider.test.ts index 2c54097b3a..e9e83fc654 100644 --- a/packages/opentelemetry-web/test/WebTracerProvider.test.ts +++ b/packages/opentelemetry-sdk-trace-web/test/WebTracerProvider.test.ts @@ -19,7 +19,7 @@ import { ZoneContextManager } from '@opentelemetry/context-zone'; import { B3Propagator } from '@opentelemetry/propagator-b3'; import { Resource } from '@opentelemetry/resources'; import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; -import { Span, Tracer } from '@opentelemetry/tracing'; +import { Span, Tracer } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { WebTracerConfig } from '../src'; import { WebTracerProvider } from '../src/WebTracerProvider'; diff --git a/packages/opentelemetry-web/test/index-webpack.ts b/packages/opentelemetry-sdk-trace-web/test/index-webpack.ts similarity index 100% rename from packages/opentelemetry-web/test/index-webpack.ts rename to packages/opentelemetry-sdk-trace-web/test/index-webpack.ts diff --git a/packages/opentelemetry-web/test/registration.test.ts b/packages/opentelemetry-sdk-trace-web/test/registration.test.ts similarity index 100% rename from packages/opentelemetry-web/test/registration.test.ts rename to packages/opentelemetry-sdk-trace-web/test/registration.test.ts diff --git a/packages/opentelemetry-web/test/utils.test.ts b/packages/opentelemetry-sdk-trace-web/test/utils.test.ts similarity index 99% rename from packages/opentelemetry-web/test/utils.test.ts rename to packages/opentelemetry-sdk-trace-web/test/utils.test.ts index d90aca76a3..085c621352 100644 --- a/packages/opentelemetry-web/test/utils.test.ts +++ b/packages/opentelemetry-sdk-trace-web/test/utils.test.ts @@ -19,7 +19,7 @@ import { otperformance as performance, } from '@opentelemetry/core'; import * as core from '@opentelemetry/core'; -import * as tracing from '@opentelemetry/tracing'; +import * as tracing from '@opentelemetry/sdk-trace-base'; import { HrTime } from '@opentelemetry/api'; import * as assert from 'assert'; diff --git a/packages/opentelemetry-web/tsconfig.esm.json b/packages/opentelemetry-sdk-trace-web/tsconfig.esm.json similarity index 100% rename from packages/opentelemetry-web/tsconfig.esm.json rename to packages/opentelemetry-sdk-trace-web/tsconfig.esm.json diff --git a/packages/opentelemetry-web/tsconfig.json b/packages/opentelemetry-sdk-trace-web/tsconfig.json similarity index 91% rename from packages/opentelemetry-web/tsconfig.json rename to packages/opentelemetry-sdk-trace-web/tsconfig.json index 7d15edb853..2ef5276d19 100644 --- a/packages/opentelemetry-web/tsconfig.json +++ b/packages/opentelemetry-sdk-trace-web/tsconfig.json @@ -26,7 +26,7 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index aa14298aa4..dbb77c97dc 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -44,7 +44,7 @@ }, "devDependencies": { "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "@types/sinon": "10.0.2", "codecov": "3.8.3", "mocha": "7.2.0", diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index 0b6bfd84f3..6e287503c5 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -41,9 +41,9 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/propagator-b3": "0.24.0", "@opentelemetry/propagator-jaeger": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/sdk-trace-base": "0.24.0", "@types/mocha": "8.2.3", - "@types/node": "14.17.6", + "@types/node": "14.17.9", "codecov": "3.8.3", "mocha": "7.2.0", "nyc": "15.1.0", diff --git a/packages/opentelemetry-shim-opentracing/test/Shim.test.ts b/packages/opentelemetry-shim-opentracing/test/Shim.test.ts index 321f25359c..41035a3e91 100644 --- a/packages/opentelemetry-shim-opentracing/test/Shim.test.ts +++ b/packages/opentelemetry-shim-opentracing/test/Shim.test.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import * as opentracing from 'opentracing'; -import { BasicTracerProvider, Span } from '@opentelemetry/tracing'; +import { BasicTracerProvider, Span } from '@opentelemetry/sdk-trace-base'; import { SpanContextShim, SpanShim, TracerShim } from '../src/shim'; import { CompositePropagator, diff --git a/packages/opentelemetry-shim-opentracing/tsconfig.json b/packages/opentelemetry-shim-opentracing/tsconfig.json index 8fbd0e4307..002d5c04e7 100644 --- a/packages/opentelemetry-shim-opentracing/tsconfig.json +++ b/packages/opentelemetry-shim-opentracing/tsconfig.json @@ -22,7 +22,7 @@ "path": "../opentelemetry-semantic-conventions" }, { - "path": "../opentelemetry-tracing" + "path": "../opentelemetry-sdk-trace-base" } ] } diff --git a/packages/template/package.json b/packages/template/package.json index 46021db811..024bd44c2d 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -65,7 +65,7 @@ "build/esm/**/*.d.ts" ], "devDependencies": { - "@types/node": "14.17.6", + "@types/node": "14.17.9", "typescript": "4.3.5" }, "Add these to devDependencies for testing": { diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 6b6b6fe8be..f356253eaf 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -30,7 +30,7 @@ "path": "packages/opentelemetry-instrumentation/tsconfig.esm.json" }, { - "path": "packages/opentelemetry-metrics/tsconfig.esm.json" + "path": "packages/opentelemetry-sdk-metrics-base/tsconfig.esm.json" }, { "path": "packages/opentelemetry-propagator-b3/tsconfig.esm.json" @@ -45,10 +45,10 @@ "path": "packages/opentelemetry-semantic-conventions/tsconfig.esm.json" }, { - "path": "packages/opentelemetry-tracing/tsconfig.esm.json" + "path": "packages/opentelemetry-sdk-trace-base/tsconfig.esm.json" }, { - "path": "packages/opentelemetry-web/tsconfig.esm.json" + "path": "packages/opentelemetry-sdk-trace-web/tsconfig.esm.json" } ] } diff --git a/tsconfig.json b/tsconfig.json index e3c5a0a624..256c709469 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -101,10 +101,10 @@ "path": "packages/opentelemetry-instrumentation" }, { - "path": "packages/opentelemetry-metrics" + "path": "packages/opentelemetry-sdk-metrics-base" }, { - "path": "packages/opentelemetry-node" + "path": "packages/opentelemetry-sdk-trace-node" }, { "path": "packages/opentelemetry-propagator-b3" @@ -131,10 +131,10 @@ "path": "packages/opentelemetry-shim-opentracing" }, { - "path": "packages/opentelemetry-tracing" + "path": "packages/opentelemetry-sdk-trace-base" }, { - "path": "packages/opentelemetry-web" + "path": "packages/opentelemetry-sdk-trace-web" }, { "path": "packages/template" diff --git a/website_docs/_index.md b/website_docs/_index.md index 1f8bed9e7d..b76096d41d 100644 --- a/website_docs/_index.md +++ b/website_docs/_index.md @@ -24,4 +24,4 @@ You can find release information [here](https://github.com/open-telemetry/opente - [OpenTelemetry for JavaScript on GitHub](https://github.com/open-telemetry/opentelemetry-js) - [Getting Started](https://github.com/open-telemetry/opentelemetry-js/blob/main/getting-started/README.md) - [API Documentation](https://open-telemetry.github.io/opentelemetry-js) -- [Getting In Touch (Gitter)](https://gitter.im/open-telemetry/opentelemetry-node) +- [Getting In Touch (Gitter)](https://gitter.im/open-telemetry/opentelemetry-sdk-trace-node) diff --git a/website_docs/getting_started/browser.md b/website_docs/getting_started/browser.md index 2136368c84..65429d4713 100644 --- a/website_docs/getting_started/browser.md +++ b/website_docs/getting_started/browser.md @@ -47,11 +47,11 @@ Copy the following file into an empty directory and call it `index.html`. ### Installation -To create traces in the browser, you will need `@opentelemetry/web`, and the instrumentation `@opentelemetry/instrumentation-document-load`: +To create traces in the browser, you will need `@opentelemetry/sdk-trace-web`, and the instrumentation `@opentelemetry/instrumentation-document-load`: ```shell npm init -y -npm install --save @opentelemetry/api @opentelemetry/web @opentelemetry/instrumentation-document-load @opentelemetry/context-zone +npm install --save @opentelemetry/api @opentelemetry/sdk-trace-web @opentelemetry/instrumentation-document-load @opentelemetry/context-zone ``` ### Initialization and Configuration @@ -69,7 +69,7 @@ We will add some code that will trace the document load timings and output those Add the following code to the `document-load.js` to create a tracer provider, which brings the instrumentaion to trace document load: ```javascript -import { WebTracerProvider } from '@opentelemetry/web'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-document-load'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; @@ -113,8 +113,8 @@ You may also want to use the `BatchSpanProcessor` to export spans in batches in To export traces to the console, modify `document-load.js` so that it matches the following code snippet: ```javascript -import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; -import { WebTracerProvider } from '@opentelemetry/web'; +import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-document-load'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; diff --git a/website_docs/getting_started/nodejs.md b/website_docs/getting_started/nodejs.md index 92ef2c1be9..e2555b9a1e 100644 --- a/website_docs/getting_started/nodejs.md +++ b/website_docs/getting_started/nodejs.md @@ -67,8 +67,8 @@ The following dependencies are required to trace a Node.js application. These dependencies are required to configure the tracing SDK and create spans. - `@opentelemetry/api` -- `@opentelemetry/node` -- `@opentelemetry/tracing` +- `@opentelemetry/sdk-trace-node` +- `@opentelemetry/sdk-trace-base` #### Exporter @@ -95,8 +95,8 @@ Create a file with a name like `tracing.js` which will contain your tracing setu /* tracing.js */ // Require dependencies -const { NodeTracerProvider } = require("@opentelemetry/node"); -const { SimpleSpanProcessor, ConsoleSpanExporter } = require("@opentelemetry/tracing"); +const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node"); +const { SimpleSpanProcessor, ConsoleSpanExporter } = require("@opentelemetry/sdk-trace-base"); const { getNodeAutoInstrumentations } = require("@opentelemetry/auto-instrumentations-node'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); @@ -125,7 +125,7 @@ registerInstrumentations({ First, install the dependencies as described above. Here you need to add the following: ```shell -npm install --save @opentelemetry/node @opentelemetry/auto-instrumentations-node +npm install --save @opentelemetry/sdk-trace-node @opentelemetry/auto-instrumentations-node ``` Now you can run your application as you normally would, but you can use the `--require` flag to load the tracing code before the application code. diff --git a/website_docs/instrumentation.md b/website_docs/instrumentation.md index 93a7f76924..9ac4e7cacd 100644 --- a/website_docs/instrumentation.md +++ b/website_docs/instrumentation.md @@ -27,11 +27,11 @@ function doWork() { As you have learned in the previous [Getting Started](../getting_started/) guide you need a TracerProvider and an Exporter. Install the dependencies and add them to head of your application code to get started: ```shell -npm installĀ @opentelemetry/tracing +npm installĀ @opentelemetry/sdk-trace-base ``` ```javascript -const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/tracing'); +const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const provider = new BasicTracerProvider();