Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 1.9 KB

README.md

File metadata and controls

67 lines (47 loc) · 1.9 KB

Jaeger Exporter for OpenTelemetry C++

DEPRECATED

The Jaeger Exporter is deprecated, and will be removed in a future release.

See DEPRECATED for details.

Prerequisite

Installation

CMake Installation Instructions

Refer to install instructions INSTALL.md. Modify step 2 to create cmake build configuration for compiling with Jaeger exporter as below:

   $ cmake -DWITH_JAEGER=ON ..
   -- The C compiler identification is GNU 9.3.0
   -- The CXX compiler identification is GNU 9.3.0
   ...
   -- Configuring done
   -- Generating done
   -- Build files have been written to: /home/<user>/source/opentelemetry-cpp/build
   $

Bazel install Instructions

Refer to install instructions INSTALL.md.

bazel build //exporters/jaeger:opentelemetry_exporter_jaeger_trace

Usage

Install the exporter in your application, initialize and pass the options to it.

opentelemetry::exporter::jaeger::JaegerExporterOptions options;
options.server_addr      = "localhost";
options.server_port      = 6831;
options.transport_format = opentelemetry::exporter::jaeger::TransportFormat::kThriftUdpCompact;

auto exporter = std::unique_ptr<opentelemetry::sdk::trace::SpanExporter>(
    new opentelemetry::exporter::jaeger::JaegerExporter(options));
auto processor = std::shared_ptr<sdktrace::SpanProcessor>(
    new sdktrace::SimpleSpanProcessor(std::move(exporter)));
auto provider = nostd::shared_ptr<opentelemetry::trace::TracerProvider>(
    new sdktrace::TracerProvider(processor));

// Set the global trace provider
opentelemetry::trace::Provider::SetTracerProvider(provider);

Viewing your traces

Please visit the Jaeger UI endpoint http://localhost:16686.