Skip to content

Commit

Permalink
Merge branch 'main' into in-memory-metric-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Sep 6, 2024
2 parents 48aa31a + d623bc5 commit 10f697d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
20 changes: 10 additions & 10 deletions examples/logs_simple/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ void InitTracer()
auto exporter = trace_exporter::OStreamSpanExporterFactory::Create();
auto processor = trace_sdk::SimpleSpanProcessorFactory::Create(std::move(exporter));

std::shared_ptr<opentelemetry::sdk::trace::TracerProvider> provider =
opentelemetry::sdk::trace::TracerProviderFactory::Create(std::move(processor));
std::shared_ptr<opentelemetry::sdk::trace::TracerProvider> sdk_provider =
trace_sdk::TracerProviderFactory::Create(std::move(processor));

// Set the global trace provider
const std::shared_ptr<trace_api::TracerProvider> &api_provider = provider;
const std::shared_ptr<trace_api::TracerProvider> &api_provider = sdk_provider;
trace_api::Provider::SetTracerProvider(api_provider);
}

void CleanupTracer()
{
std::shared_ptr<trace_api::TracerProvider> none;
trace_api::Provider::SetTracerProvider(none);
std::shared_ptr<trace_api::TracerProvider> noop;
trace_api::Provider::SetTracerProvider(noop);
}

void InitLogger()
Expand All @@ -65,18 +65,18 @@ void InitLogger()
std::unique_ptr<logs_sdk::LogRecordExporter>(new logs_exporter::OStreamLogRecordExporter);
auto processor = logs_sdk::SimpleLogRecordProcessorFactory::Create(std::move(exporter));

std::shared_ptr<opentelemetry::sdk::logs::LoggerProvider> provider(
opentelemetry::sdk::logs::LoggerProviderFactory::Create(std::move(processor)));
std::shared_ptr<opentelemetry::sdk::logs::LoggerProvider> sdk_provider(
logs_sdk::LoggerProviderFactory::Create(std::move(processor)));

// Set the global logger provider
const std::shared_ptr<logs_api::LoggerProvider> &api_provider = provider;
const std::shared_ptr<logs_api::LoggerProvider> &api_provider = sdk_provider;
logs_api::Provider::SetLoggerProvider(api_provider);
}

void CleanupLogger()
{
std::shared_ptr<logs_api::LoggerProvider> none;
logs_api::Provider::SetLoggerProvider(none);
std::shared_ptr<logs_api::LoggerProvider> noop;
logs_api::Provider::SetLoggerProvider(noop);
}

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

exporters:
debug:
verbosity: debug
verbosity: detailed
receivers:
otlp:
protocols:
Expand Down
10 changes: 5 additions & 5 deletions examples/simple/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ void InitTracer()
auto exporter = trace_exporter::OStreamSpanExporterFactory::Create();
auto processor = trace_sdk::SimpleSpanProcessorFactory::Create(std::move(exporter));

std::shared_ptr<opentelemetry::sdk::trace::TracerProvider> provider =
opentelemetry::sdk::trace::TracerProviderFactory::Create(std::move(processor));
std::shared_ptr<opentelemetry::sdk::trace::TracerProvider> sdk_provider =
trace_sdk::TracerProviderFactory::Create(std::move(processor));

// Set the global trace provider
const std::shared_ptr<opentelemetry::trace::TracerProvider> &api_provider = provider;
const std::shared_ptr<opentelemetry::trace::TracerProvider> &api_provider = sdk_provider;
trace_api::Provider::SetTracerProvider(api_provider);
}

void CleanupTracer()
{
std::shared_ptr<opentelemetry::trace::TracerProvider> none;
trace_api::Provider::SetTracerProvider(none);
std::shared_ptr<opentelemetry::trace::TracerProvider> noop;
trace_api::Provider::SetTracerProvider(noop);
}
} // namespace

Expand Down
2 changes: 1 addition & 1 deletion functional/otlp/otel-config-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ processors:

exporters:
debug:
verbosity: debug
verbosity: detailed

service:
pipelines:
Expand Down
6 changes: 3 additions & 3 deletions functional/otlp/otel-config-https.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ processors:
check_interval: 5s

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]
6 changes: 3 additions & 3 deletions functional/otlp/otel-docker-config-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ processors:
check_interval: 5s

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]
6 changes: 3 additions & 3 deletions functional/otlp/otel-docker-config-https.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ processors:
check_interval: 5s

exporters:
logging:
loglevel: debug
debug:
verbosity: detailed

service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
exporters: [debug]

0 comments on commit 10f697d

Please sign in to comment.