diff --git a/examples/ioredis/README.md b/examples/ioredis/README.md index 8818ad850d9..0f486e7faa0 100644 --- a/examples/ioredis/README.md +++ b/examples/ioredis/README.md @@ -1,29 +1,13 @@ # Overview -OpenTelemetry IORedis Instrumentation allows the user to automatically collect trace data and export them to the backend of choice (we can use Zipkin or Jaeger for this example), to give observability to distributed systems. +OpenTelemetry IORedis Instrumentation allows the user to automatically collect trace data and export them to the backend(s) of choice (Jaeger in this example). ## Tracing backend setup -### Zipkin - -- Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html) - -- Set EXPORTER variable - - ```sh - export EXPORTER=zipkin - ``` - ### Jaeger - Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/#all-in-one) -- Set EXPORTER variable - - ```sh - export EXPORTER=jaeger - ``` - ## Installation ```sh @@ -41,7 +25,7 @@ npm install - Run the main program ```sh - npm start + npm run start ``` - Cleanup docker diff --git a/examples/ioredis/package.json b/examples/ioredis/package.json index 97f1248a812..a277f4e7cd7 100644 --- a/examples/ioredis/package.json +++ b/examples/ioredis/package.json @@ -37,7 +37,5 @@ "ioredis": "^4.14.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", - "devDependencies": { - "cross-env": "^6.0.0" - } + "devDependencies": {} } diff --git a/examples/ioredis/tracer.js b/examples/ioredis/tracer.js index 5a01c8c3dd1..a1fedeecb92 100644 --- a/examples/ioredis/tracer.js +++ b/examples/ioredis/tracer.js @@ -6,20 +6,9 @@ const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); -const EXPORTER = process.env.EXPORTER || ''; - const tracerRegistry = new NodeTracerRegistry(); -let exporter; -if (EXPORTER.toLowerCase().startsWith('z')) { - exporter = new ZipkinExporter({ - serviceName: 'ioredis-example', - }); -} else { - exporter = new JaegerExporter({ - serviceName: 'ioredis-example', - }); -} +const exporter = new JaegerExporter({ serviceName: 'ioredis-example' }); tracerRegistry.addSpanProcessor(new SimpleSpanProcessor(exporter));