|
| 1 | +--- |
| 2 | +title: Using instrumentation libraries |
| 3 | +linkTitle: Libraries |
| 4 | +weight: 40 |
| 5 | +--- |
| 6 | + |
| 7 | +{{% docs/languages/libraries-intro "C++" %}} |
| 8 | + |
| 9 | +## Using instrumentation libraries |
| 10 | + |
| 11 | +When you develop an app, you might use third-party libraries and frameworks to |
| 12 | +accelerate your work. If you then instrument your app using OpenTelemetry, you |
| 13 | +might want to avoid spending additional time to manually add traces, logs, and |
| 14 | +metrics to the third-party libraries and frameworks you use. |
| 15 | + |
| 16 | +Many libraries and frameworks already support OpenTelemetry or are supported |
| 17 | +through OpenTelemetry |
| 18 | +[instrumentation](/docs/concepts/instrumentation/libraries/), so that they can |
| 19 | +generate telemetry you can export to an observability backend. |
| 20 | + |
| 21 | +If you are instrumenting an app or service that use third-party libraries or |
| 22 | +frameworks, follow these instructions to learn how to use natively instrumented |
| 23 | +libraries and instrumentation libraries for your dependencies. |
| 24 | + |
| 25 | +## Use natively instrumented libraries |
| 26 | + |
| 27 | +If a library comes with OpenTelemetry support by default, you can get traces, |
| 28 | +metrics, and logs emitted from that library by adding and setting up the |
| 29 | +OpenTelemetry SDK with your app. |
| 30 | + |
| 31 | +The library might require some additional configuration for the instrumentation. |
| 32 | +See the documentation for that library to learn more. |
| 33 | + |
| 34 | +If a library doesn't include OpenTelemetry support, you can use |
| 35 | +[instrumentation libraries](/docs/specs/otel/glossary/#instrumentation-library) |
| 36 | +to generate telemetry data for a library or framework. |
| 37 | + |
| 38 | +## Setup |
| 39 | + |
| 40 | +To set up an instrumentation library see |
| 41 | +[otel-cpp-contrib](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation) |
| 42 | + |
| 43 | +## Available packages |
| 44 | + |
| 45 | +A full list of instrumentation libraries available can be found in the |
| 46 | +[OpenTelemetry registry](/ecosystem/registry/?language=cpp&component=instrumentation) |
| 47 | + |
| 48 | +## Next steps |
| 49 | + |
| 50 | +After you've set up instrumentation libraries, you might want to add |
| 51 | +[additional instrumentation](/docs/languages/cpp/instrumentation/) to collect |
| 52 | +custom telemetry data. |
| 53 | + |
| 54 | +You might also want to configure an appropriate exporter to |
| 55 | +[export your telemetry data](/docs/languages/cpp/exporters/) to one or more |
| 56 | +telemetry backends. |
0 commit comments