You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: opentelemetry-instrumentation/README.rst
+28-22
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,15 @@ Installation
14
14
pip install opentelemetry-instrumentation
15
15
16
16
17
-
This package provides a couple of commands that help automatically instruments a program:
17
+
This package provides commands that help automatically instrument a program:
18
18
19
19
.. note::
20
20
You need to install a distro package to get auto instrumentation working. The ``opentelemetry-distro``
21
21
package contains the default distro and configurator and automatically configures some of the common options for users.
22
22
For more info about ``opentelemetry-distro`` check `here <https://opentelemetry-python.readthedocs.io/en/latest/examples/distro/README.html>`__
23
23
::
24
24
25
-
pip install opentelemetry-distro[otlp]
25
+
pip install "opentelemetry-distro[otlp]"
26
26
27
27
When creating a custom distro and/or configurator, be sure to add entry points for each under `opentelemetry_distro` and `opentelemetry_configurator` respectfully.
28
28
If you have entry points for multiple distros or configurators present in your environment, you should specify the entry point name of the distro and configurator you want to be used via the `OTEL_PYTHON_DISTRO` and `OTEL_PYTHON_CONFIGURATOR` environment variables.
This commands inspects the active Python site-packages and figures out which
39
-
instrumentation packages the user might want to install. By default it prints out
40
-
a list of the suggested instrumentation packages which can be added to a requirements.txt
41
-
file. It also supports installing the suggested packages when run with :code:`--action=install`
42
-
flag.
38
+
This command install default instrumentation packages and detects active Python site-packages
39
+
to figure out which instrumentation packages the user might want to install. By default, it
40
+
prints out a list of the default and detected instrumentation packages that can be added to a
41
+
requirements.txt file. It also supports installing the packages when run with
42
+
:code:`--action=install` or :code:`-a install` flag. All default and detectable
43
+
instrumentation packages are defined `here <https://github.com/flands/opentelemetry-python-contrib/blob/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py>`.
43
44
44
45
45
46
opentelemetry-instrument
@@ -51,40 +52,45 @@ opentelemetry-instrument
51
52
52
53
The instrument command will try to automatically detect packages used by your python program
53
54
and when possible, apply automatic tracing instrumentation on them. This means your program
54
-
will get automatic distributed tracing for free without having to make any code changes
55
-
at all. This will also configure a global tracer and tracing exporter without you having to
56
-
make any code changes. By default, the instrument command will use the OTLP exporter but
57
-
this can be overridden when needed.
55
+
will get automatic distributed tracing without having to make any code changes. This will
56
+
also configure a global tracer and tracing exporter as well as a meter and meter exporter.
57
+
By default, the instrument command will use the OTLP exporter but this can be overridden.
58
58
59
-
The command supports the following configuration options as CLI arguments and environment vars:
59
+
The command supports the following configuration options as CLI arguments and environment
60
+
variables:
60
61
61
62
62
63
* ``--traces_exporter`` or ``OTEL_TRACES_EXPORTER``
63
64
* ``--metrics_exporter`` or ``OTEL_METRICS_EXPORTER``
64
65
* ``--distro`` or ``OTEL_PYTHON_DISTRO``
65
66
* ``--configurator`` or ``OTEL_PYTHON_CONFIGURATOR``
66
67
67
-
Used to specify which trace exporter to use. Can be set to one or more of the well-known exporter
68
-
names (see below).
68
+
The exporter options define what exporter destination to use and can be set to one or more
69
+
exporter names (see below). You can pass multiple values to configure multiple exporters
70
+
(e.g., ``zipkin_json,otlp``).
69
71
70
72
- Defaults to `otlp`.
71
73
- Can be set to `none` to disable automatic tracer initialization.
74
+
- Can be set to 'console` to display JSON results locally.
72
75
73
-
You can pass multiple values to configure multiple exporters e.g, ``zipkin,prometheus``
74
-
75
-
Well known trace exporter names:
76
+
Trace exporter names:
76
77
77
78
- jaeger_proto
78
79
- jaeger_thrift
79
80
- opencensus
81
+
- otlp
82
+
- otlp_proto_grpc (`deprecated`)
83
+
- otlp_proto_http (`deprecated`)
80
84
- zipkin_json
81
85
- zipkin_proto
86
+
87
+
Metric exporter names:
88
+
82
89
- otlp
83
90
- otlp_proto_grpc (`deprecated`)
84
-
- otlp_proto_http (`deprecated`)
91
+
- prometheus
85
92
86
93
Note: The default transport protocol for ``otlp`` is gRPC.
87
-
HTTP is currently supported for traces only, and should be set using ``OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf``
88
94
89
95
* ``--id-generator`` or ``OTEL_PYTHON_ID_GENERATOR``
90
96
@@ -106,9 +112,9 @@ Examples
106
112
107
113
::
108
114
109
-
opentelemetry-instrument --traces_exporter otlp flask run --port=3000
115
+
opentelemetry-instrument --traces_exporter console flask run --port=3000
110
116
111
-
The above command will pass ``--traces_exporter otlp`` to the instrument command and ``--port=3000`` to ``flask run``.
117
+
The above command will pass ``--traces_exporter console`` to the instrument command and ``--port=3000`` to ``flask run``.
0 commit comments