Skip to content

Commit

Permalink
fix format and markdown-lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSparc committed Feb 19, 2023
1 parent 9e2703f commit f5a0da1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/logs_simple/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cc_binary(
deps = [
"//api",
"//examples/common/logs_foo_library:common_logs_foo_library",
"//exporters/ostream:ostream_span_exporter",
"//exporters/ostream:ostream_log_record_exporter",
"//exporters/ostream:ostream_span_exporter",
],
)
7 changes: 3 additions & 4 deletions examples/logs_simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ if(WITH_LOGS_PREVIEW)
if(DEFINED OPENTELEMETRY_BUILD_DLL)
target_link_libraries(example_logs_simple opentelemetry_cpp)
else()
target_link_libraries(example_logs_simple opentelemetry_trace
opentelemetry_logs
opentelemetry_exporter_ostream_span
opentelemetry_exporter_ostream_logs)
target_link_libraries(
example_logs_simple opentelemetry_trace opentelemetry_logs
opentelemetry_exporter_ostream_span opentelemetry_exporter_ostream_logs)
endif()
endif()
11 changes: 7 additions & 4 deletions examples/logs_simple/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

# Simple Logs Example

In this example, the application in `main.cc` initializes an `OStreamLogRecordExporter` instance and registers a logger
provider, as well as initializes a `StdoutSpanExporter` instance and registers a tracer provider from the [OpenTelemetry
SDK](https://github.com/open-telemetry/opentelemetry-cpp).
In this example, the application in `main.cc` initializes an
`OStreamLogRecordExporter` instance and registers a logger
provider, as well as initializes a `StdoutSpanExporter` instance and registers a
tracer provider from the [OpenTelemetry
SDK](https://github.com/open-telemetry/opentelemetry-cpp).

The application then calls a `logs_foo_library` which has been instrumented using the [OpenTelemetry
The application then calls a `logs_foo_library` which has been instrumented
using the [OpenTelemetry
API](https://github.com/open-telemetry/opentelemetry-cpp/tree/main/api).
Resulting logs and traces are directed to stdout.

Expand Down
3 changes: 2 additions & 1 deletion examples/logs_simple/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ void CleanupTracer()
void InitLogger()
{
// Create ostream log exporter instance
auto exporter = std::unique_ptr<logs_sdk::LogRecordExporter>(new logs_exporter::OStreamLogRecordExporter);
auto exporter =
std::unique_ptr<logs_sdk::LogRecordExporter>(new logs_exporter::OStreamLogRecordExporter);
auto processor = logs_sdk::SimpleLogRecordProcessorFactory::Create(std::move(exporter));
std::shared_ptr<logs_api::LoggerProvider> provider(
logs_sdk::LoggerProviderFactory::Create(std::move(processor)));
Expand Down

0 comments on commit f5a0da1

Please sign in to comment.