Skip to content

Commit

Permalink
Merge branch 'main' into update-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored Aug 6, 2021
2 parents 1ac4b6f + 08828b4 commit f6fa488
Show file tree
Hide file tree
Showing 310 changed files with 453 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -471,17 +478,17 @@ 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
[otel-instrumentation-http]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http
[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
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node10/index.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node10/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
"path": "../../packages/opentelemetry-sdk-trace-base"
}
]
}
2 changes: 1 addition & 1 deletion backwards-compatability/node12/index.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node12/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
"path": "../../packages/opentelemetry-sdk-trace-base"
}
]
}
2 changes: 1 addition & 1 deletion backwards-compatability/node8/index.ts
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node8/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"path": "../../packages/opentelemetry-sdk-node"
},
{
"path": "../../packages/opentelemetry-tracing"
"path": "../../packages/opentelemetry-sdk-trace-base"
}
]
}
2 changes: 1 addition & 1 deletion benchmark/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions doc/processor-api.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 {
Expand Down Expand Up @@ -52,7 +52,7 @@ import {
CounterSumAggregator,
ObserverAggregator,
MeasureExactAggregator,
} from '@opentelemetry/metrics';
} from '@opentelemetry/sdk-metrics-base';

export class CustomProcessor extends UngroupedProcessor {
aggregatorFor (metricDescriptor: MetricDescriptor) {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-tracer-node/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -35,7 +35,7 @@ Click on the trace to view its details.
## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base>

## LICENSE

Expand Down
2 changes: 1 addition & 1 deletion examples/basic-tracer-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
6 changes: 3 additions & 3 deletions examples/basic-tracer-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
2 changes: 1 addition & 1 deletion examples/collector-exporter-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://opentelemetry.io/>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base>

## LICENSE

Expand Down
2 changes: 1 addition & 1 deletion examples/collector-exporter-node/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
6 changes: 3 additions & 3 deletions examples/collector-exporter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion examples/collector-exporter-node/tracing.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Go to Jaeger with your browser <http://localhost:50051/trace/(your-trace-id)> (e
## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node>

## LICENSE

Expand Down
6 changes: 3 additions & 3 deletions examples/grpc-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc-js/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Go to Jaeger with your browser <http://localhost:50051/trace/(your-trace-id)> (e
## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node>

## LICENSE

Expand Down
Loading

0 comments on commit f6fa488

Please sign in to comment.