From cb0c6bb68c61d71afba5dddce650f82ef5b954c5 Mon Sep 17 00:00:00 2001 From: Bartlomiej Obecny Date: Tue, 28 Jul 2020 20:16:34 +0200 Subject: [PATCH 1/2] chore: adding info about collector compatible version, removing duplicated doc after merge --- .../README.md | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/packages/opentelemetry-exporter-collector/README.md b/packages/opentelemetry-exporter-collector/README.md index 8233384dd1..d835d45bca 100644 --- a/packages/opentelemetry-exporter-collector/README.md +++ b/packages/opentelemetry-exporter-collector/README.md @@ -6,7 +6,7 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url]. +This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] ver. **0.6.0** ## Installation @@ -155,29 +155,6 @@ provider.register(); ``` -## Usage in Node - PROTO over http - -```js -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); -const { CollectorExporter, CollectorTransportNode } = require('@opentelemetry/exporter-collector'); - -const collectorOptions = { - protocolNode: CollectorTransportNode.HTTP_PROTO, - serviceName: 'basic-service', - url: '', // url is optional and can be omitted - default is http://localhost:55680/v1/trace - headers: { - foo: 'bar' - }, //an optional object containing custom headers to be sent with each request will only work with json over http -}; - -const provider = new BasicTracerProvider(); -const exporter = new CollectorExporter(collectorOptions); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); - -provider.register(); - -``` - ## Running opentelemetry-collector locally to see the traces 1. Go to examples/collector-exporter-node From b856d78072106d21992d0c3f3276c5724fa5b574 Mon Sep 17 00:00:00 2001 From: Bartlomiej Obecny Date: Fri, 31 Jul 2020 15:35:36 +0200 Subject: [PATCH 2/2] chore: reviews --- packages/opentelemetry-exporter-collector/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opentelemetry-exporter-collector/README.md b/packages/opentelemetry-exporter-collector/README.md index d835d45bca..42ff9ec292 100644 --- a/packages/opentelemetry-exporter-collector/README.md +++ b/packages/opentelemetry-exporter-collector/README.md @@ -6,7 +6,7 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] ver. **0.6.0** +This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.6.0**. ## Installation