Skip to content

Commit 924b2be

Browse files
authored
Add "using instrumentation libraries" for cpp (#4388)
1 parent 601ce6c commit 924b2be

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.

static/refcache.json

+20
Original file line numberDiff line numberDiff line change
@@ -6043,6 +6043,22 @@
60436043
"StatusCode": 206,
60446044
"LastSeen": "2024-02-23T22:55:04.014798-05:00"
60456045
},
6046+
"https://opentelemetry.io/docs/concepts/instrumentation/libraries/": {
6047+
"StatusCode": 206,
6048+
"LastSeen": "2024-04-30T09:31:37.735092936Z"
6049+
},
6050+
"https://opentelemetry.io/docs/languages/cpp/exporters/": {
6051+
"StatusCode": 206,
6052+
"LastSeen": "2024-04-30T09:31:38.598060401Z"
6053+
},
6054+
"https://opentelemetry.io/docs/languages/cpp/instrumentation/": {
6055+
"StatusCode": 206,
6056+
"LastSeen": "2024-04-30T09:31:38.379400427Z"
6057+
},
6058+
"https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-library": {
6059+
"StatusCode": 206,
6060+
"LastSeen": "2024-04-30T09:31:37.929550219Z"
6061+
},
60466062
"https://opentelemetry.io/docs/specs/otel/protocol": {
60476063
"StatusCode": 206,
60486064
"LastSeen": "2024-02-24T14:33:05.630341-08:00"
@@ -6055,6 +6071,10 @@
60556071
"StatusCode": 206,
60566072
"LastSeen": "2024-03-19T10:16:49.992495889Z"
60576073
},
6074+
"https://opentelemetry.io/ecosystem/registry/": {
6075+
"StatusCode": 206,
6076+
"LastSeen": "2024-04-30T09:31:38.297519267Z"
6077+
},
60586078
"https://opentracing.io": {
60596079
"StatusCode": 206,
60606080
"LastSeen": "2024-01-18T19:07:33.813401-05:00"

0 commit comments

Comments
 (0)