diff --git a/README.md b/README.md
index ae4eb6f483..45e83be795 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
---
- Getting Started
+ Getting Started
•
API Reference
•
@@ -131,7 +131,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](https://github.com/open-telemetry/opentelemetry-js/blob/main/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]
+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](https://opentelemetry.io/docs/js/getting_started/). 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
diff --git a/getting-started/.eslintrc.js b/getting-started/.eslintrc.js
deleted file mode 100644
index 8580fbfb04..0000000000
--- a/getting-started/.eslintrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable global-require */
-/* eslint-disable strict */
-
-module.exports = {
- ...require('../examples/.eslintrc.json'),
-};
diff --git a/getting-started/README.md b/getting-started/README.md
deleted file mode 100644
index 132bd340ae..0000000000
--- a/getting-started/README.md
+++ /dev/null
@@ -1,398 +0,0 @@
-# Getting started with OpenTelemetry JS
-
-This guide walks you through the setup and configuration process for a tracing backend (in this case [Zipkin](https://zipkin.io), but [Jaeger](https://www.jaegertracing.io) is simple to use as well), a metrics backend like [Prometheus](https://prometheus.io), and auto-instrumentation of NodeJS. [You can find the guide for TypeScript here](ts-example/README.md#getting-started-with-opentelemetry-js-typescript).
-
-- [Getting started with OpenTelemetry JS](#getting-started-with-opentelemetry-js)
- - [Trace your application with OpenTelemetry](#trace-your-application-with-opentelemetry)
- - [Set up a tracing backend](#set-up-a-tracing-backend)
- - [Trace your NodeJS application](#trace-your-nodejs-application)
- - [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
- - [Initialize a global tracer](#initialize-a-global-tracer)
- - [Initialize and register a trace exporter](#initialize-and-register-a-trace-exporter)
- - [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)
- - [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics)
- - [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter)
-
-## Trace your application with OpenTelemetry
-
-([link to TypeScript version](ts-example/README.md#trace-your-application-with-opentelemetry))
-
-This guide assumes you're using Zipkin as your tracing backend, but modifying it for Jaeger should be straightforward.
-
-You can find an example application to use with this guide in the [example directory](example). See what it looks like with tracing enabled in the [traced-example directory](traced-example).
-
-### Set up a tracing backend
-
-([link to TypeScript version](ts-example/README.md#set-up-a-tracing-backend))
-
-The first thing you need before you can start collecting traces is a tracing backend like Zipkin that you can export traces to. If you already have a supported tracing backend (Zipkin or Jaeger), you can skip this step. If not, you need to run one.
-
-To set up Zipkin as quickly as possible, run the latest [Docker Zipkin](https://github.com/openzipkin/docker-zipkin) container, exposing port `9411`. If you can’t run Docker containers, you need to download and run Zipkin by following the Zipkin [quickstart guide](https://zipkin.io/pages/quickstart.html).
-
-```sh
-docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
-```
-
-Browse to to make sure you can see the Zipkin UI.
-
-
-
-### Trace your NodeJS application
-
-([link to TypeScript version](ts-example/README.md#trace-your-nodejs-application))
-
-This guide uses the example application provided in the [example directory](example), but the steps to instrument your own application should be broadly the same. Here's an overview of what you'll be doing:
-
-1. Install the required OpenTelemetry libraries
-2. Initialize a global tracer
-3. Initialize and register a trace exporter
-
-#### Install the required OpenTelemetry libraries
-
-([link to TypeScript version](ts-example/README.md#install-the-required-opentelemetry-libraries))
-
-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/sdk-trace-node \
- @opentelemetry/instrumentation-http \
- @opentelemetry/instrumentation-express \
- @opentelemetry/instrumentation-grpc
-```
-
-#### Initialize a global tracer
-
-([link to TypeScript version](ts-example/README.md#initialize-a-global-tracer))
-
-All tracing initialization should happen before your application code runs. The easiest way to do this is to initialize tracing in a separate file that is required using the `node` `-r` option before your application code runs.
-
-Create a file named `tracing.js` and add the following code:
-
-```javascript
-'use strict';
-
-const { diag, DiagConsoleLogger, DiagLogLevel } = require("@opentelemetry/api");
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { registerInstrumentations } = require("@opentelemetry/instrumentation");
-const { HttpInstrumentation } = require("@opentelemetry/instrumentation-http");
-const { GrpcInstrumentation } = require("@opentelemetry/instrumentation-grpc");
-
-const provider = new NodeTracerProvider();
-
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
-
-provider.register();
-
-registerInstrumentations({
- instrumentations: [
- new HttpInstrumentation(),
- new GrpcInstrumentation(),
- ],
-});
-
-```
-
-Now, if you run your application with `node -r ./tracing.js app.js`, your application will create and propagate traces over HTTP. If an already instrumented service that supports [Trace Context](https://www.w3.org/TR/trace-context/) headers calls your application using HTTP, and you call another application using HTTP, the Trace Context headers will be correctly propagated.
-
-However, if you want to see a completed trace, you need to register an exporter to send traces to a tracing backend.
-
-#### Initialize and register a trace exporter
-
-([link to TypeScript version](ts-example/README.md#initialize-and-register-a-trace-exporter))
-
-This guide uses the Zipkin tracing backend. However, if you're using another backend like [Jaeger](https://www.jaegertracing.io), make your change there.
-
-To export traces, you need a few more dependencies. Install them with the following command:
-
-```sh
-$ npm install \
- @opentelemetry/sdk-trace-base \
- @opentelemetry/exporter-zipkin
-
-$ # for jaeger you would run this command:
-$ # npm install @opentelemetry/exporter-jaeger
-```
-
-After you install these dependencies, initialize and register them. Modify `tracing.js` so it matches the following code snippet. Optionally replace the service name `"getting-started"` with your own service name:
-
-```javascript
-'use strict';
-
-const { diag, DiagConsoleLogger, DiagLogLevel } = require("@opentelemetry/api");
-const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
-const { Resource } = require('@opentelemetry/resources');
-const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
-const { SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base");
-const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin");
-const { registerInstrumentations } = require("@opentelemetry/instrumentation");
-const { HttpInstrumentation } = require("@opentelemetry/instrumentation-http");
-const { GrpcInstrumentation } = require("@opentelemetry/instrumentation-grpc");
-
-const provider = new NodeTracerProvider({
- resource: new Resource({
- [SemanticResourceAttributes.SERVICE_NAME]: "getting-started",
- })
-});
-
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
-
-provider.addSpanProcessor(
- new SimpleSpanProcessor(
- new ZipkinExporter({
- // If you are running your tracing backend on another host,
- // you can point to it using the `url` parameter of the
- // exporter config.
- })
- )
-);
-
-provider.register();
-
-registerInstrumentations({
- instrumentations: [
- new HttpInstrumentation(),
- new GrpcInstrumentation(),
- ],
-});
-
-console.log("tracing initialized");
-```
-
-Now if you run your application with the `tracing.js` file loaded, and you send requests to your application over HTTP (in the sample application just browse to ), you'll see traces exported to your tracing backend that look like this:
-
-```sh
-node -r ./tracing.js app.js
-```
-
-
-
-**Note:** Some spans appear to be duplicated, but they're not. This is because the sample application is both the client and the server for these requests. You see one span which is the client-side request timing, and one span which is the server side request timing. Anywhere they don’t overlap is network time.
-
-## Collect metrics using OpenTelemetry
-
-([link to TypeScript version](ts-example/README.md#collect-metrics-using-opentelemetry))
-
-This guide assumes you're using Prometheus as your metrics backend. It's currently the only metrics backend supported by OpenTelemetry JS.
-
-**Note**: This section is a work in progress.
-
-### Set up a metrics backend
-
-([link to TypeScript version](ts-example/README.md#set-up-a-metrics-backend))
-
-Now that you have end-to-end traces, you can collect and export some basic metrics.
-
-Currently, the only supported metrics backend is [Prometheus](https://prometheus.io). Go to the [Prometheus download page](https://prometheus.io/download/) and download the latest release of Prometheus for your operating system.
-
-Open a command line and `cd` into the directory where you downloaded the Prometheus tarball. Untar it into the newly created directory.
-
-```sh
-$ cd Downloads
-
-$ # Replace the file name below with your downloaded tarball
-$ tar xvfz prometheus-2.20.1.darwin-amd64.tar
-
-$ # Replace the dir below with your created directory
-$ cd prometheus-2.20.1.darwin-amd64
-
-$ ls
-LICENSE console_libraries data prometheus.yml tsdb
-NOTICE consoles prometheus promtool
-```
-
-The created directory should have a file named `prometheus.yml`. This is the file used to configure Prometheus. For now, just make sure Prometheus starts by running the `./prometheus` binary in the folder and browse to .
-
-```sh
-$ ./prometheus
-# some output elided for brevity
-msg="Starting Prometheus" version="(version=2.14.0, branch=HEAD, revision=edeb7a44cbf745f1d8be4ea6f215e79e651bfe19)"
-# some output elided for brevity
-level=info ts=2019-11-21T20:39:40.262Z caller=web.go:496 component=web msg="Start listening for connections" address=0.0.0.0:9090
-# some output elided for brevity
-level=info ts=2019-11-21T20:39:40.383Z caller=main.go:626 msg="Server is ready to receive web requests."
-```
-
-
-
-Once you confirm that Prometheus starts, replace the contents of `prometheus.yml` with the following:
-
-```yaml
-# my global config
-global:
- scrape_interval: 15s # Set the scrape interval to every 15 seconds.
-
-scrape_configs:
- - job_name: 'opentelemetry'
- # metrics_path defaults to '/metrics'
- # scheme defaults to 'http'.
- static_configs:
- - targets: ['localhost:9464']
-```
-
-### Monitor your NodeJS application
-
-([link to TypeScript version](ts-example/README.md#monitor-your-nodejs-application))
-
-You can find an example application to use with this guide in the [example directory](example). See what it looks like with metric monitoring enabled in the [monitored-example directory](monitored-example).
-
-Here's an overview of what you'll be doing:
-
-1. Install the required OpenTelemetry metrics libraries
-2. Initialize a meter and collect metrics
-3. Initialize and register a metrics exporter
-
-#### 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/sdk-metrics-base`.
-
-```sh
-$ npm install \
- @opentelemetry/sdk-metrics-base
-```
-
-#### Initialize a meter and collect metrics
-
-([link to TypeScript version](ts-example/README.md#initialize-a-meter-and-collect-metrics))
-
-You need a `Meter` to create and monitor metrics. A `Meter` in OpenTelemetry is the mechanism used to create and manage metrics, labels, and metric exporters.
-
-Create a file named `monitoring.js` and add the following code:
-
-```javascript
-'use strict';
-
-const { MeterProvider } = require('@opentelemetry/sdk-metrics-base');
-
-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. Create and export from your `monitoring.js` file a middleware function that express can use to count all requests by route. Modify the `monitoring.js` file so it looks like this:
-
-```javascript
-'use strict';
-
-const { MeterProvider } = require('@opentelemetry/sdk-metrics-base');
-
-const meter = new MeterProvider().getMeter('your-meter-name');
-
-const requestCount = meter.createCounter("requests", {
- description: "Count all incoming requests"
-});
-
-const boundInstruments = new Map();
-
-module.exports.countAllRequests = () => {
- return (req, res, next) => {
- if (!boundInstruments.has(req.path)) {
- const labels = { route: req.path };
- const boundCounter = requestCount.bind(labels);
- boundInstruments.set(req.path, boundCounter);
- }
-
- boundInstruments.get(req.path).add(1);
- next();
- };
-};
-```
-
-Now import and use this middleware in your application code:
-
-```javascript
-const { countAllRequests } = require("./monitoring");
-const app = express();
-app.use(countAllRequests());
-```
-
-Now when you make requests to your service, your meter will count all requests.
-
-**Note**: Creating a new `labelSet` and `binding` on every request is not ideal because creating the `labelSet` can often be an expensive operation. Therefore, the instruments are created and stored in a `Map` according to the route key.
-
-#### Initialize and register a metrics exporter
-
-([link to TypeScript version](ts-example/README.md#initialize-and-register-a-metrics-exporter))
-
-Counting metrics is only useful if you can export them somewhere where you can see them. For this, w'ere going to use Prometheus. Creating and registering a metrics exporter is much like the tracing exporter above. First you need to install the Prometheus exporter by running the following command:
-
-```sh
-npm install @opentelemetry/exporter-prometheus
-```
-
-Next, modify your `monitoring.js` file to look like this:
-
-```javascript
-"use strict";
-
-const { MeterProvider } = require('@opentelemetry/sdk-metrics-base');
-const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
-
-const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port
-const prometheusEndpoint = PrometheusExporter.DEFAULT_OPTIONS.endpoint
-
-const exporter = new PrometheusExporter(
- {
- startServer: true,
- },
- () => {
- console.log(
- `prometheus scrape endpoint: http://localhost:${prometheusPort}${prometheusEndpoint}`,
- );
- },
-);
-
-const meter = new MeterProvider({
- exporter,
- interval: 1000,
-}).getMeter('your-meter-name');
-
-const requestCount = meter.createCounter("requests", {
- description: "Count all incoming requests"
-});
-
-const boundInstruments = new Map();
-
-module.exports.countAllRequests = () => {
- return (req, res, next) => {
- if (!boundInstruments.has(req.path)) {
- const labels = { route: req.path };
- const boundCounter = requestCount.bind(labels);
- boundInstruments.set(req.path, boundCounter);
- }
-
- boundInstruments.get(req.path).add(1);
- next();
- };
-};
-```
-
-Ensure Prometheus is running by running the `prometheus` binary from earlier and start your application.
-
-```sh
-$ npm start
-
-> @opentelemetry/getting-started@1.0.0 start /App/opentelemetry-js/getting-started/monitored-example
-> node app.js
-
-prometheus scrape endpoint: http://localhost:9464/metrics
-Listening for requests on http://localhost:8080
-```
-
-Now each time you browse to you should see "Hello from the backend" in your browser and your metrics in Prometheus should update. You can verify the current metrics by browsing to , which should look like this:
-
-```sh
-# HELP requests Count all incoming requests
-# TYPE requests counter
-requests{route="/"} 1
-requests{route="/middle-tier"} 2
-requests{route="/backend"} 4
-```
-
-You should also be able to see gathered metrics in your Prometheus web UI.
-
-
diff --git a/getting-started/example/app.js b/getting-started/example/app.js
deleted file mode 100644
index 287ab78cb3..0000000000
--- a/getting-started/example/app.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-const PORT = process.env.PORT || '8080';
-
-const express = require('express');
-const axios = require('axios');
-
-const app = express();
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/example/package.json b/getting-started/example/package.json
deleted file mode 100644
index 4c4e289434..0000000000
--- a/getting-started/example/package.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.js",
- "scripts": {
- "start": "node app.js"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "dependencies": {
- "axios": "^0.21.0",
- "express": "^4.17.1"
- }
-}
diff --git a/getting-started/images/prometheus-graph.png b/getting-started/images/prometheus-graph.png
deleted file mode 100644
index c4e174ffd3..0000000000
Binary files a/getting-started/images/prometheus-graph.png and /dev/null differ
diff --git a/getting-started/images/prometheus.png b/getting-started/images/prometheus.png
deleted file mode 100644
index ef94a1faf0..0000000000
Binary files a/getting-started/images/prometheus.png and /dev/null differ
diff --git a/getting-started/images/zipkin-trace.png b/getting-started/images/zipkin-trace.png
deleted file mode 100644
index c00c86865d..0000000000
Binary files a/getting-started/images/zipkin-trace.png and /dev/null differ
diff --git a/getting-started/images/zipkin.png b/getting-started/images/zipkin.png
deleted file mode 100644
index 77e23745b4..0000000000
Binary files a/getting-started/images/zipkin.png and /dev/null differ
diff --git a/getting-started/monitored-example/app.js b/getting-started/monitored-example/app.js
deleted file mode 100644
index af61cef67e..0000000000
--- a/getting-started/monitored-example/app.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-const PORT = process.env.PORT || '8080';
-
-const express = require('express');
-const axios = require('axios');
-
-const { countAllRequests } = require('./monitoring');
-
-const app = express();
-app.use(countAllRequests());
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/monitored-example/monitoring.js b/getting-started/monitored-example/monitoring.js
deleted file mode 100644
index ca20e8d2fd..0000000000
--- a/getting-started/monitored-example/monitoring.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-const { MeterProvider } = require('@opentelemetry/sdk-metrics-base');
-const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
-
-const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port;
-const prometheusEndpoint = PrometheusExporter.DEFAULT_OPTIONS.endpoint;
-
-const exporter = new PrometheusExporter(
- {
- startServer: true,
- },
- () => {
- console.log(
- `prometheus scrape endpoint: http://localhost:${prometheusPort}${prometheusEndpoint}`,
- );
- },
-);
-
-const meter = new MeterProvider({
- exporter,
- interval: 1000,
-}).getMeter('your-meter-name');
-
-const requestCount = meter.createCounter('requests', {
- description: 'Count all incoming requests',
-});
-
-const boundInstruments = new Map();
-
-module.exports.countAllRequests = () => (req, res, next) => {
- if (!boundInstruments.has(req.path)) {
- const labels = { route: req.path };
- const boundCounter = requestCount.bind(labels);
- boundInstruments.set(req.path, boundCounter);
- }
-
- boundInstruments.get(req.path).add(1);
- next();
-};
diff --git a/getting-started/monitored-example/package.json b/getting-started/monitored-example/package.json
deleted file mode 100644
index a8b6c3a66c..0000000000
--- a/getting-started/monitored-example/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-monitored-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.js",
- "scripts": {
- "start": "node app.js"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/exporter-prometheus": "0.25.0",
- "@opentelemetry/sdk-metrics-base": "0.25.0",
- "axios": "^0.21.0",
- "express": "^4.17.1"
- }
-}
diff --git a/getting-started/traced-example/app.js b/getting-started/traced-example/app.js
deleted file mode 100644
index 287ab78cb3..0000000000
--- a/getting-started/traced-example/app.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-const PORT = process.env.PORT || '8080';
-
-const express = require('express');
-const axios = require('axios');
-
-const app = express();
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/traced-example/package.json b/getting-started/traced-example/package.json
deleted file mode 100644
index 8268cd9ddc..0000000000
--- a/getting-started/traced-example/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-traced-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.js",
- "scripts": {
- "start": "node -r ./tracing.js app.js"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.0.0",
- "@opentelemetry/exporter-zipkin": "1.0.0",
- "@opentelemetry/instrumentation-express": "^0.24.0",
- "@opentelemetry/instrumentation-http": "0.25.0",
- "@opentelemetry/instrumentation": "0.25.0",
- "@opentelemetry/sdk-trace-node": "1.0.0",
- "@opentelemetry/sdk-trace-base": "1.0.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
deleted file mode 100644
index ae6b88b015..0000000000
--- a/getting-started/traced-example/tracing.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-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');
-const { registerInstrumentations } = require('@opentelemetry/instrumentation');
-const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express');
-const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
-
-const provider = new NodeTracerProvider({
- resource: new Resource({
- [SemanticResourceAttributes.SERVICE_NAME]: 'getting-started',
- }),
-});
-
-provider.addSpanProcessor(
- new SimpleSpanProcessor(
- new ZipkinExporter({
- // If you are running your tracing backend on another host,
- // you can point to it using the `url` parameter of the
- // exporter config.
- }),
- ),
-);
-
-provider.register();
-
-// load old default plugins
-registerInstrumentations({
- instrumentations: [
- new ExpressInstrumentation(),
- new HttpInstrumentation(),
- ],
-});
-
-console.log('tracing initialized');
diff --git a/getting-started/ts-example/.eslintrc b/getting-started/ts-example/.eslintrc
deleted file mode 100644
index 6564779085..0000000000
--- a/getting-started/ts-example/.eslintrc
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "plugins": ["@typescript-eslint", "node"],
- "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
- "parser": "@typescript-eslint/parser",
- "rules": {
- "@typescript-eslint/no-var-requires": 0,
- "import/prefer-default-export": "off",
- "import/extensions": [
- "error",
- "ignorePackages",
- {
- "": "never"
- }
- ]
- }
-}
diff --git a/getting-started/ts-example/README.md b/getting-started/ts-example/README.md
deleted file mode 100644
index a1ccd6a1cb..0000000000
--- a/getting-started/ts-example/README.md
+++ /dev/null
@@ -1,389 +0,0 @@
-# Getting Started with OpenTelemetry JS (TypeScript)
-
-This TypeScript guide will walk you through the setup and configuration process for a tracing backend (in this case [Zipkin](https://zipkin.io), but [Jaeger](https://www.jaegertracing.io) would be simple to use as well), a metrics backend like [Prometheus](https://prometheus.io), and auto-instrumentation of NodeJS. [You can find the guide for JavaScript here](../README.md#getting-started-with-opentelemetry-js).
-
-- [Getting Started with OpenTelemetry JS (TypeScript)](#getting-started-with-opentelemetry-js-typescript)
- - [Tracing Your Application with OpenTelemetry](#tracing-your-application-with-opentelemetry)
- - [Setting up a Tracing Backend](#setting-up-a-tracing-backend)
- - [Trace Your NodeJS Application](#trace-your-nodejs-application)
- - [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
- - [Initialize a global tracer](#initialize-a-global-tracer)
- - [Initialize and Register a Trace Exporter](#initialize-and-register-a-trace-exporter)
- - [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-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)
-
-## Tracing Your Application with OpenTelemetry
-
-([link to JavaScript version](../README.md#tracing-your-application-with-opentelemetry))
-
-This guide assumes you are going to be using Zipkin as your tracing backend, but modifying it for Jaeger should be straightforward.
-
-An example application which can be used with this guide can be found in the [example directory](example). You can see what it looks like with tracing enabled in the [traced-example directory](traced-example).
-
-### Setting up a Tracing Backend
-
-([link to JavaScript version](../README.md#setting-up-a-tracing-backend))
-
-The first thing we will need before we can start collecting traces is a tracing backend like Zipkin that we can export traces to. If you already have a supported tracing backend (Zipkin or Jaeger), you can skip this step. If not, you will need to run one.
-
-In order to set up Zipkin as quickly as possible, run the latest [Docker Zipkin](https://github.com/openzipkin/docker-zipkin) container, exposing port `9411`. If you can’t run Docker containers, you will need to download and run Zipkin by following the Zipkin [quickstart guide](https://zipkin.io/pages/quickstart.html).
-
-```sh
-docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
-```
-
-Browse to to ensure that you can see the Zipkin UI.
-
-
-
-### Trace Your NodeJS Application
-
-([link to JavaScript version](../README.md#trace-your-nodejs-application))
-
-This guide uses the example application provided in the [example directory](example) but the steps to instrument your own application should be broadly the same. Here is an overview of what we will be doing.
-
-1. Install the required OpenTelemetry libraries
-2. Initialize a global tracer
-3. Initialize and register a trace exporter
-
-#### Install the required OpenTelemetry libraries
-
-([link to JavaScript version](../README.md#install-the-required-opentelemetry-libraries))
-
-To create traces on NodeJS, you will need `@opentelemetry/sdk-trace-node`, `@opentelemetry/api`, 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/instrumentation-http` and `@opentelemetry/instrumentation-express`.
-
-```sh
-$ npm install \
- @opentelemetry/api \
- @opentelemetry/sdk-trace-node \
- @opentelemetry/instrumentation \
- @opentelemetry/instrumentation-http \
- @opentelemetry/instrumentation-express \
- @@opentelemetry/resources \
- @opentelemetry/semantic-conventions
-```
-
-#### Initialize a global tracer
-
-([link to JavaScript version](../README.md#initialize-a-global-tracer))
-
-All tracing initialization should happen before your application’s code runs. The easiest way to do this is to initialize tracing in a separate file that is required using node’s `-r` option before application code runs.
-
-Create a file named `tracing.ts` and add the following code:
-
-```typescript
-import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api';
-import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
-import { registerInstrumentations } from '@opentelemetry/instrumentation';
-import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
-import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
-
-
-const provider: NodeTracerProvider = new NodeTracerProvider();
-
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
-
-provider.register();
-
-registerInstrumentations({
- instrumentations: [
- new ExpressInstrumentation(),
- new HttpInstrumentation(),
- ],
-});
-
-```
-
-If you run your application now with `ts-node -r ./tracing.ts app.ts`, your application will create and propagate traces over HTTP. If an already instrumented service that supports [Trace Context](https://www.w3.org/TR/trace-context/) headers calls your application using HTTP, and you call another application using HTTP, the Trace Context headers will be correctly propagated.
-
-If you wish to see a completed trace, however, there is one more step. You must register an exporter to send traces to a tracing backend.
-
-#### Initialize and Register a Trace Exporter
-
-([link to JavaScript version](../README.md#initialize-and-register-a-trace-exporter))
-
-This guide uses the Zipkin tracing backend, but if you are using another backend like [Jaeger](https://www.jaegertracing.io), this is where you would make your change.
-
-To export traces, we will need a few more dependencies. Install them with the following command:
-
-```sh
-$ npm install \
- @opentelemetry/sdk-trace-base \
- @opentelemetry/exporter-zipkin
-
-$ # for jaeger you would run this command:
-$ # npm install @opentelemetry/exporter-jaeger
-```
-
-After these dependencies are installed, we will need to initialize and register them. Modify `tracing.ts` so that it matches the following code snippet, replacing the service name `"getting-started"` with your own service name if you wish.
-
-```typescript
-import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api';
-import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
-import { registerInstrumentations } from '@opentelemetry/instrumentation';
-import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
-import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
-import { Resource } from '@opentelemetry/resources'
-import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
-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';
-
-const provider: NodeTracerProvider = new NodeTracerProvider({
- resource: new Resource({
- [SemanticResourceAttributes.SERVICE_NAME]: 'getting-started',
- }),
-});
-
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
-
-provider.addSpanProcessor(
- new SimpleSpanProcessor(
- new ZipkinExporter({
- // For Jaeger, use the following line instead:
- // new JaegerExporter({
- // If you are running your tracing backend on another host,
- // you can point to it using the `url` parameter of the
- // exporter config.
- }),
- ),
-);
-provider.register();
-
-registerInstrumentations({
- instrumentations: [
- new ExpressInstrumentation(),
- new HttpInstrumentation(),
- ],
-});
-
-console.log('tracing initialized');
-```
-
-Now if you run your application with the `tracing.ts` file loaded, and you send requests to your application over HTTP (in the sample application just browse to you will see traces exported to your tracing backend that look like this:
-
-```sh
-ts-node -r ./tracing.ts app.ts
-```
-
-
-
-**Note:** Some spans appear to be duplicated, but they are not. This is because the sample application is both the client and the server for these requests. You see one span that is the client side request timing, and one span that is the server side request timing. Anywhere they don’t overlap is network time.
-
-## Collect Metrics Using OpenTelemetry
-
-([link to JavaScript version](../README.md#collect-metrics-using-opentelemetry))
-
-This guide assumes you are going to be using Prometheus as your metrics backend. It is currently the only metrics backend supported by OpenTelemetry JS.
-
-**Note**: This section is a work in progress
-
-### Set up a Metrics Backend
-
-([link to JavaScript version](../README.md#set-up-a-metrics-backend))
-
-Now that we have end-to-end traces, we will collect and export some basic metrics.
-
-Currently, the only supported metrics backend is [Prometheus](https://prometheus.io). Head to the [Prometheus download page](https://prometheus.io/download/) and download the latest release of Prometheus for your operating system.
-
-Open a command line and `cd` into the directory where you downloaded the Prometheus tarball. Untar it and change into the newly created directory.
-
-```sh
-$ cd Downloads
-
-$ # Replace the file name below with your downloaded tarball
-$ tar xvfz prometheus-2.20.1.darwin-amd64.tar
-
-$ # Replace the dir below with your created directory
-$ cd prometheus-2.20.1.darwin-amd64
-
-$ ls
-LICENSE console_libraries data prometheus.yml tsdb
-NOTICE consoles prometheus promtool
-```
-
-The created directory should have a file named `prometheus.yml`. This is the file used to configure Prometheus. For now, just make sure Prometheus starts by running the `./prometheus` binary in the folder and browse to .
-
-```sh
-$ ./prometheus
-# some output elided for brevity
-msg="Starting Prometheus" version="(version=2.14.0, branch=HEAD, revision=edeb7a44cbf745f1d8be4ea6f215e79e651bfe19)"
-# some output elided for brevity
-level=info ts=2019-11-21T20:39:40.262Z caller=web.go:496 component=web msg="Start listening for connections" address=0.0.0.0:9090
-# some output elided for brevity
-level=info ts=2019-11-21T20:39:40.383Z caller=main.go:626 msg="Server is ready to receive web requests."
-```
-
-
-
-Once we know prometheus starts, replace the contents of `prometheus.yml` with the following:
-
-```yaml
-# my global config
-global:
- scrape_interval: 15s # Set the scrape interval to every 15 seconds.
-
-scrape_configs:
- - job_name: 'opentelemetry'
- # metrics_path defaults to '/metrics'
- # scheme defaults to 'http'.
- static_configs:
- - targets: ['localhost:9464']
-```
-
-### Monitor Your NodeJS Application
-
-([link to JavaScript version](../README.md#monitor-your-nodejs-application))
-
-An example application which can be used with this guide can be found at in the [example directory](example). You can see what it looks like with metric monitoring enabled in the [monitored-example directory](monitored-example).
-
-1. Install the required OpenTelemetry metrics libraries
-2. Initialize a meter and collect metrics
-3. Initialize and register a metrics exporter
-
-#### 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/sdk-metrics-base`.
-
-```sh
-npm install @opentelemetry/sdk-metrics-base
-```
-
-#### Initialize a meter and collect metrics
-
-([link to JavaScript version](../README.md#initialize-a-meter-and-collect-metrics))
-
-In order to create and monitor metrics, we will need a `Meter`. In OpenTelemetry, a `Meter` is the mechanism used to create and manage metrics, labels, and metric exporters.
-
-Create a file named `monitoring.ts` and add the following code:
-
-```typescript
-import { MeterProvider } from '@opentelemetry/sdk-metrics-base';
-
-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/sdk-metrics-base';
-import { Request, Response, NextFunction } from 'express';
-
-const meter = new MeterProvider().getMeter('your-meter-name');
-
-const requestCount = meter.createCounter('requests', {
- description: 'Count all incoming requests',
-});
-
-const handles = new Map();
-
-export const countAllRequests = () => {
- return (req: Request, _res: Response, next: NextFunction) => {
- if (!handles.has(req.path)) {
- const labels = { route: req.path };
- const handle = requestCount.bind(labels);
- handles.set(req.path, handle);
- }
-
- handles.get(req.path).add(1);
- next();
- };
-};
-```
-
-Now let's import and use this middleware in our application code:
-
-```typescript
-import { countAllRequests } from './monitoring';
-const app = express();
-app.use(countAllRequests());
-```
-
-Now, when we make requests to our service our meter will count all requests.
-
-**Note**: Creating a new `labelSet` and `handle` on every request is not ideal as creating the `labelSet` can often be an expensive operation. This is why handles are created and stored in a `Map` according to the route key.
-
-#### Initialize and register a metrics exporter
-
-([link to JavaScript version](../README.md#initialize-and-register-a-metrics-exporter))
-
-Counting metrics is only useful if we can export them somewhere that we can see them. For this, we're going to use prometheus. Creating and registering a metrics exporter is much like the tracing exporter above. First we will need to install the prometheus exporter.
-
-```sh
-npm install @opentelemetry/exporter-prometheus
-```
-
-Next, modify your `monitoring.ts` file to look like this:
-
-```typescript
-import { Request, Response, NextFunction } from 'express';
-import { MeterProvider } from '@opentelemetry/sdk-metrics-base';
-import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
-
-const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port;
-const prometheusEndpoint = PrometheusExporter.DEFAULT_OPTIONS.endpoint;
-
-const exporter = new PrometheusExporter(
- {
- startServer: true,
- },
- () => {
- console.log(
- `prometheus scrape endpoint: http://localhost:${prometheusPort}${prometheusEndpoint}`,
- );
- },
-);
-
-const meter = new MeterProvider({
- exporter,
- interval: 1000,
-}).getMeter('your-meter-name');
-
-const requestCount = meter.createCounter('requests', {
- description: 'Count all incoming requests',
-});
-
-const handles = new Map();
-
-export const countAllRequests = () => {
- return (req: Request, _res: Response, next: NextFunction) => {
- if (!handles.has(req.path)) {
- const labels = { route: req.path };
- const handle = requestCount.bind(labels);
- handles.set(req.path, handle);
- }
-
- handles.get(req.path).add(1);
- next();
- };
-};
-```
-
-Ensure prometheus is running by running the `prometheus` binary from earlier and start your application.
-
-```sh
-$ ts-node app.ts
-prometheus scrape endpoint: http://localhost:9464/metrics
-Listening for requests on http://localhost:8080
-```
-
-Now, each time you browse to you should see "Hello from the backend" in your browser and your metrics in prometheus should update. You can verify the current metrics by browsing to , which should look like this:
-
-```sh
-# HELP requests Count all incoming requests
-# TYPE requests counter
-requests{route="/"} 1
-requests{route="/middle-tier"} 2
-requests{route="/backend"} 4
-```
-
-You should also be able to see gathered metrics in your prometheus web UI.
-
-
diff --git a/getting-started/ts-example/example/app.ts b/getting-started/ts-example/example/app.ts
deleted file mode 100644
index a252668ebe..0000000000
--- a/getting-started/ts-example/example/app.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as express from 'express';
-import axios from 'axios';
-
-const PORT: string = process.env.PORT || '8080';
-
-const app = express();
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((response) => {
- res.send(response.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((response) => {
- res.send(response.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/ts-example/example/package.json b/getting-started/ts-example/example/package.json
deleted file mode 100644
index 08ab0b4634..0000000000
--- a/getting-started/ts-example/example/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-ts-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.ts",
- "scripts": {
- "start": "ts-node app.ts"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "devDependencies": {
- "@types/express": "4.17.13",
- "@types/node": "14.17.11",
- "ts-node": "10.2.1"
- },
- "dependencies": {
- "axios": "^0.21.0",
- "express": "^4.17.1"
- }
-}
diff --git a/getting-started/ts-example/monitored-example/app.ts b/getting-started/ts-example/monitored-example/app.ts
deleted file mode 100644
index 9307eba1ac..0000000000
--- a/getting-started/ts-example/monitored-example/app.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import * as express from 'express';
-import axios from 'axios';
-
-import { countAllRequests } from './monitoring';
-
-const PORT: string = process.env.PORT || '8080';
-const app = express();
-app.use(countAllRequests());
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/ts-example/monitored-example/monitoring.ts b/getting-started/ts-example/monitored-example/monitoring.ts
deleted file mode 100644
index 5e933e4a93..0000000000
--- a/getting-started/ts-example/monitored-example/monitoring.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Request, Response, NextFunction } from 'express';
-import { MeterProvider } from '@opentelemetry/sdk-metrics-base';
-import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
-
-const prometheusPort = PrometheusExporter.DEFAULT_OPTIONS.port;
-const prometheusEndpoint = PrometheusExporter.DEFAULT_OPTIONS.endpoint;
-
-const exporter = new PrometheusExporter(
- {
- startServer: true,
- },
- () => {
- console.log(
- `prometheus scrape endpoint: http://localhost:${prometheusPort}${prometheusEndpoint}`,
- );
- },
-);
-
-const meter = new MeterProvider({
- exporter,
- interval: 1000,
-}).getMeter('your-meter-name');
-
-const requestCount = meter.createCounter('requests', {
- description: 'Count all incoming requests',
-});
-
-const handles = new Map();
-
-export const countAllRequests = () => (req: Request, _res: Response, next: NextFunction): void => {
- if (!handles.has(req.path)) {
- const labels = { route: req.path };
- const handle = requestCount.bind(labels);
- handles.set(req.path, handle);
- }
-
- handles.get(req.path).add(1);
- next();
-};
diff --git a/getting-started/ts-example/monitored-example/package.json b/getting-started/ts-example/monitored-example/package.json
deleted file mode 100644
index 3e4138059e..0000000000
--- a/getting-started/ts-example/monitored-example/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-monitored-ts-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.ts",
- "scripts": {
- "start": "ts-node app.ts"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "devDependencies": {
- "@types/express": "4.17.13",
- "@types/node": "14.17.11",
- "ts-node": "10.2.1"
- },
- "dependencies": {
- "@opentelemetry/exporter-prometheus": "0.25.0",
- "@opentelemetry/sdk-metrics-base": "0.25.0",
- "axios": "^0.21.0",
- "express": "^4.17.1"
- }
-}
diff --git a/getting-started/ts-example/traced-example/app.ts b/getting-started/ts-example/traced-example/app.ts
deleted file mode 100644
index 58fb8ab589..0000000000
--- a/getting-started/ts-example/traced-example/app.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as express from 'express';
-import axios from 'axios';
-
-const PORT: string = process.env.PORT || '8080';
-
-const app = express();
-
-app.get('/', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/middle-tier`)
- .then(() => axios.get(`http://localhost:${PORT}/middle-tier`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/middle-tier', (req, res) => {
- axios
- .get(`http://localhost:${PORT}/backend`)
- .then(() => axios.get(`http://localhost:${PORT}/backend`))
- .then((result) => {
- res.send(result.data);
- })
- .catch((err) => {
- console.error(err);
- res.status(500).send();
- });
-});
-
-app.get('/backend', (req, res) => {
- res.send('Hello from the backend');
-});
-
-app.listen(parseInt(PORT, 10), () => {
- console.log(`Listening for requests on http://localhost:${PORT}`);
-});
diff --git a/getting-started/ts-example/traced-example/package.json b/getting-started/ts-example/traced-example/package.json
deleted file mode 100644
index f157176404..0000000000
--- a/getting-started/ts-example/traced-example/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "@opentelemetry/getting-started-traced-ts-example",
- "version": "0.25.0",
- "description": "This repository provides everything required to follow the OpenTelemetry Getting Started Guide",
- "main": "app.ts",
- "scripts": {
- "start": "ts-node app.ts"
- },
- "author": "OpenTelemetry Authors",
- "license": "Apache-2.0",
- "devDependencies": {
- "@types/express": "4.17.13",
- "@types/node": "14.17.11",
- "ts-node": "10.2.1"
- },
- "dependencies": {
- "@opentelemetry/core": "1.0.0",
- "@opentelemetry/exporter-zipkin": "1.0.0",
- "@opentelemetry/instrumentation": "0.25.0",
- "@opentelemetry/instrumentation-express": "^0.24.0",
- "@opentelemetry/sdk-trace-node": "1.0.0",
- "@opentelemetry/instrumentation-http": "0.25.0",
- "@opentelemetry/sdk-trace-base": "1.0.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
deleted file mode 100644
index 8d4628a06e..0000000000
--- a/getting-started/ts-example/traced-example/tracing.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api';
-import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
-import { registerInstrumentations } from '@opentelemetry/instrumentation';
-import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
-import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
-import { Resource } from '@opentelemetry/resources'
-import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
-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';
-
-const provider: NodeTracerProvider = new NodeTracerProvider({
- resource: new Resource({
- [SemanticResourceAttributes.SERVICE_NAME]: 'getting-started',
- }),
-});
-
-diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
-
-provider.addSpanProcessor(
- new SimpleSpanProcessor(
- new ZipkinExporter({
- // For Jaeger, use the following line instead:
- // new JaegerExporter({
- // If you are running your tracing backend on another host,
- // you can point to it using the `url` parameter of the
- // exporter config.
- }),
- ),
-);
-provider.register();
-
-registerInstrumentations({
- instrumentations: [
- new ExpressInstrumentation(),
- new HttpInstrumentation(),
- ],
-});
-
-console.log('tracing initialized');
\ No newline at end of file
diff --git a/package.json b/package.json
index 03f45c704f..702e0cde24 100644
--- a/package.json
+++ b/package.json
@@ -32,8 +32,6 @@
"lint:fix:changed": "lerna run --concurrency 1 --stream lint:fix --since HEAD --exclude-dependents",
"lint:examples": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js",
"lint:examples:fix": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js --fix",
- "lint:getting-started": "eslint --no-error-on-unmatched-pattern ./getting-started/**/*.{js,ts}",
- "lint:getting-started:fix": "eslint --no-error-on-unmatched-pattern ./getting-started/**/*.{js,ts} --fix",
"lint:markdown": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md",
"lint:markdown:fix": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md --fix",
"reset": "lerna clean -y && rm -rf node_modules && npm i && npm run compile && npm run lint:fix",