File: README.md

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (16 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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 C++
SDK](https://github.com/open-telemetry/opentelemetry-cpp).

The application then calls into
[`logs_foo_library`](https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/common/logs_foo_library/foo_library.cc)
which has been instrumented using the [OpenTelemetry Logs
API](../../api/include/opentelemetry/logs/logger.h). Resulting logs and traces
are directed to stdout.

See [CONTRIBUTING.md](../../CONTRIBUTING.md) for instructions on building and
running the example.