From 6094eda3f70f4660bceee3b7b49e51f224319083 Mon Sep 17 00:00:00 2001 From: Santosh Cheler Date: Mon, 7 Aug 2023 02:14:51 -0700 Subject: [PATCH] WebTracer now supports http/protobuf exporter (#3133) Co-authored-by: Patrice Chalin --- .../en/docs/instrumentation/js/exporters.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/content/en/docs/instrumentation/js/exporters.md b/content/en/docs/instrumentation/js/exporters.md index 2bbb0821c..ad5f4ade5 100644 --- a/content/en/docs/instrumentation/js/exporters.md +++ b/content/en/docs/instrumentation/js/exporters.md @@ -130,7 +130,7 @@ docker run -d --name jaeger \ When you use the OTLP exporter in a browser-based application, you need to note that: -1. Using gRPC & http/proto for exporting is not supported +1. Using gRPC for exporting is not supported 2. [Content Security Policies][] (CSPs) of your website might block your exports 3. [Cross-Origin Resource Sharing][] (CORS) headers might not allow your exports to be sent @@ -140,15 +140,16 @@ Below you will find instructions to use the right exporter, to configure your CSPs and CORS headers and what precautions you have to take when exposing your collector. -#### Use OTLP exporter with HTTP/JSON +#### Use OTLP exporter with HTTP/JSON or HTTP/protobuf -[OpenTelemetry Collector Exporter with gRPC][] and [OpenTelemetry Collector -Exporter with protobuf][] do only work with Node.js, therefore you are limited -to use the [OpenTelemetry Collector Exporter with HTTP][]. +[OpenTelemetry Collector Exporter with gRPC][] works only with Node.js, +therefore you are limited to use the [OpenTelemetry Collector Exporter with +HTTP/JSON][] or [OpenTelemetry Collector Exporter with HTTP/protobuf][]. Make sure that the receiving end of your exporter (collector or observability -backend) does support `http/json`, and that you are exporting your data to the -right endpoint, i.e., make sure that your port is set to `4318`. +backend) accepts `http/json` if you are using [OpenTelemetry Collector Exporter +with HTTP/JSON][], and that you are exporting your data to the right endpoint +with your port set to 4318. #### Configure CSPs @@ -274,9 +275,9 @@ provider.addSpanProcessor(new BatchSpanProcessor(new ZipkinExporter())); https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS [opentelemetry collector exporter with grpc]: https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-grpc -[opentelemetry collector exporter with protobuf]: +[opentelemetry collector exporter with http/protobuf]: https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-proto -[opentelemetry collector exporter with http]: +[opentelemetry collector exporter with http/json]: https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http [a feature]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/confighttp/README.md