The Jaeger Exporter is deprecated, and will be removed in a future release.
See DEPRECATED for details.
- Get Jaeger and run Jaeger agent.
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
$
Refer to install instructions INSTALL.md.
bazel build //exporters/jaeger:opentelemetry_exporter_jaeger_trace
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);
Please visit the Jaeger UI endpoint http://localhost:16686.