From cf041fb0f07a345b4311c2d0c0e3ad8c5058fc3a Mon Sep 17 00:00:00 2001 From: Nadia Ciobanu Date: Tue, 25 Aug 2020 23:16:38 +0000 Subject: [PATCH 1/5] Add exporter readme --- exporters/otlp/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 exporters/otlp/README.md diff --git a/exporters/otlp/README.md b/exporters/otlp/README.md new file mode 100644 index 0000000000..28f1bf99f7 --- /dev/null +++ b/exporters/otlp/README.md @@ -0,0 +1,28 @@ +# OTLP Exporter + +The [OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/README.md) (OTLP) is a vendor-agnostic protocol designed as part of the +OpenTelemetry project. The OTLP exporter can be used to export to any backend that supports OTLP. + +Currently, the only backend that supports OTLP is the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector). The Collector can be configured to export to many other backends, such as Zipkin and Jaegar. + +For a full list of backends supported by the Collector, see the [main Collector repo](https://github.com/open-telemetry/opentelemetry-collector/tree/master/exporter) and [Collector contributions](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/master/exporter). + +## Configuration +The OTLP exporter offers some configuration options. To configure the exporter, create an +`OtlpExporterOptions` struct (defined in [exporter.h](include/exporter.h)), set the options inside, +and pass the struct to the `OtlpExporter` constructor, like so: + +``` +OtlpExporterOptions options; +options.endpoint = "localhost:12345"; +auto exporter = std::unique_ptr(new otlp::OtlpExporter(options)); +``` + +### Configuration options + +| Option | Default | +| ------------ |------------------ | +| `endpoint` | `localhost:55680` | + +## Example +For a complete example demonstrating how to use the OTLP exporter, see [examples/otlp](../../examples/otlp). From 19aa0d070152e2217bc00250441b56861b2ac49c Mon Sep 17 00:00:00 2001 From: Nadia Ciobanu Date: Tue, 25 Aug 2020 23:22:35 +0000 Subject: [PATCH 2/5] Fix newlines --- exporters/otlp/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/exporters/otlp/README.md b/exporters/otlp/README.md index 28f1bf99f7..44538f872a 100644 --- a/exporters/otlp/README.md +++ b/exporters/otlp/README.md @@ -1,16 +1,13 @@ # OTLP Exporter -The [OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/README.md) (OTLP) is a vendor-agnostic protocol designed as part of the -OpenTelemetry project. The OTLP exporter can be used to export to any backend that supports OTLP. +The [OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/README.md) (OTLP) is a vendor-agnostic protocol designed as part of the OpenTelemetry project. The OTLP exporter can be used to export to any backend that supports OTLP. Currently, the only backend that supports OTLP is the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector). The Collector can be configured to export to many other backends, such as Zipkin and Jaegar. For a full list of backends supported by the Collector, see the [main Collector repo](https://github.com/open-telemetry/opentelemetry-collector/tree/master/exporter) and [Collector contributions](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/master/exporter). ## Configuration -The OTLP exporter offers some configuration options. To configure the exporter, create an -`OtlpExporterOptions` struct (defined in [exporter.h](include/exporter.h)), set the options inside, -and pass the struct to the `OtlpExporter` constructor, like so: +The OTLP exporter offers some configuration options. To configure the exporter, create an `OtlpExporterOptions` struct (defined in [exporter.h](include/exporter.h)), set the options inside, and pass the struct to the `OtlpExporter` constructor, like so: ``` OtlpExporterOptions options; From 7cb8dd8916eff583a0ae42e31aa6c343e5c89947 Mon Sep 17 00:00:00 2001 From: Nadia Ciobanu Date: Wed, 26 Aug 2020 17:53:27 +0000 Subject: [PATCH 3/5] Address review comments --- exporters/otlp/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exporters/otlp/README.md b/exporters/otlp/README.md index 44538f872a..ba9c3fcfa6 100644 --- a/exporters/otlp/README.md +++ b/exporters/otlp/README.md @@ -2,11 +2,12 @@ The [OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/README.md) (OTLP) is a vendor-agnostic protocol designed as part of the OpenTelemetry project. The OTLP exporter can be used to export to any backend that supports OTLP. -Currently, the only backend that supports OTLP is the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector). The Collector can be configured to export to many other backends, such as Zipkin and Jaegar. +The [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) is a reference implementation of an OTLP backend. The Collector can be configured to export to many other backends, such as Zipkin and Jaegar. For a full list of backends supported by the Collector, see the [main Collector repo](https://github.com/open-telemetry/opentelemetry-collector/tree/master/exporter) and [Collector contributions](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/master/exporter). ## Configuration + The OTLP exporter offers some configuration options. To configure the exporter, create an `OtlpExporterOptions` struct (defined in [exporter.h](include/exporter.h)), set the options inside, and pass the struct to the `OtlpExporter` constructor, like so: ``` @@ -22,4 +23,5 @@ auto exporter = std::unique_ptr(new otlp::OtlpExporter(o | `endpoint` | `localhost:55680` | ## Example + For a complete example demonstrating how to use the OTLP exporter, see [examples/otlp](../../examples/otlp). From 3a79b2015ad85364b2dfbbd6cdff751320c6b1aa Mon Sep 17 00:00:00 2001 From: Nadia Ciobanu Date: Wed, 26 Aug 2020 17:57:00 +0000 Subject: [PATCH 4/5] Example formatting change --- examples/otlp/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/otlp/main.cc b/examples/otlp/main.cc index 233b21438f..06a43c6bbd 100644 --- a/examples/otlp/main.cc +++ b/examples/otlp/main.cc @@ -12,7 +12,7 @@ namespace otlp = opentelemetry::exporter::otlp; namespace { -void initTracer() +void InitTracer() { // Create OTLP exporter instance auto exporter = std::unique_ptr(new otlp::OtlpExporter); From 23832bfa8c2231090570a2570b7cfde18f5f1950 Mon Sep 17 00:00:00 2001 From: Nadia Ciobanu Date: Wed, 26 Aug 2020 19:18:30 +0000 Subject: [PATCH 5/5] Update example --- examples/otlp/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/otlp/main.cc b/examples/otlp/main.cc index 06a43c6bbd..a268704021 100644 --- a/examples/otlp/main.cc +++ b/examples/otlp/main.cc @@ -28,7 +28,7 @@ void InitTracer() int main() { // Removing this line will leave the default noop TracerProvider in place. - initTracer(); + InitTracer(); foo_library(); }