Skip to content

Commit

Permalink
Fixes missing namespace in Jaeger exporter config doc (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jul 14, 2021
1 parent af34ccf commit 79c4c71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/jaeger/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cc_library(
],
deps = [
"//api",
"//sdk:headers",
],
)

Expand Down
3 changes: 2 additions & 1 deletion examples/jaeger/foo_library/foo_library.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#include "opentelemetry/sdk/version/version.h"
#include "opentelemetry/trace/provider.h"

namespace trace = opentelemetry::trace;
Expand All @@ -11,7 +12,7 @@ namespace
nostd::shared_ptr<trace::Tracer> get_tracer()
{
auto provider = trace::Provider::GetTracerProvider();
return provider->GetTracer("foo_library");
return provider->GetTracer("foo_library", OPENTELEMETRY_SDK_VERSION);
}

void f1()
Expand Down
6 changes: 3 additions & 3 deletions exporters/jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Installation

## CMake Installation Instructions
### CMake Installation Instructions

Refer to install instructions
[INSTALL.md](../../INSTALL.md#building-as-standalone-cmake-project). Modify step
Expand All @@ -31,13 +31,13 @@ TODO

## Usage

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

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

auto exporter = std::unique_ptr<opentelemetry::sdk::trace::SpanExporter>(
new opentelemetry::exporter::jaeger::JaegerExporter(options));
Expand Down

0 comments on commit 79c4c71

Please sign in to comment.