Skip to content

Commit bcc03dc

Browse files
flandslperdereau
authored andcommitted
Update opentelemetry-instrument README (open-telemetry#2108)
* Update opentelemetry-instrument README - Clarify trace versus metric documentation - Add console exporter documentation - Add quotes to command to support zsh - Fix grammatical errors * fix typo * fix typo * Remove note on HTTP for trace only ---------
1 parent fea40e2 commit bcc03dc

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

opentelemetry-instrumentation/README.rst

+28-22
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Installation
1414
pip install opentelemetry-instrumentation
1515

1616

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:
1818

1919
.. note::
2020
You need to install a distro package to get auto instrumentation working. The ``opentelemetry-distro``
2121
package contains the default distro and configurator and automatically configures some of the common options for users.
2222
For more info about ``opentelemetry-distro`` check `here <https://opentelemetry-python.readthedocs.io/en/latest/examples/distro/README.html>`__
2323
::
2424

25-
pip install opentelemetry-distro[otlp]
25+
pip install "opentelemetry-distro[otlp]"
2626

2727
When creating a custom distro and/or configurator, be sure to add entry points for each under `opentelemetry_distro` and `opentelemetry_configurator` respectfully.
2828
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.
@@ -33,13 +33,14 @@ opentelemetry-bootstrap
3333

3434
::
3535

36-
opentelemetry-bootstrap --action=install|requirements
36+
opentelemetry-bootstrap [-a |--action=][install|requirements]
3737

38-
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>`.
4344

4445

4546
opentelemetry-instrument
@@ -51,40 +52,45 @@ opentelemetry-instrument
5152

5253
The instrument command will try to automatically detect packages used by your python program
5354
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.
5858

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:
6061

6162

6263
* ``--traces_exporter`` or ``OTEL_TRACES_EXPORTER``
6364
* ``--metrics_exporter`` or ``OTEL_METRICS_EXPORTER``
6465
* ``--distro`` or ``OTEL_PYTHON_DISTRO``
6566
* ``--configurator`` or ``OTEL_PYTHON_CONFIGURATOR``
6667

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``).
6971

7072
- Defaults to `otlp`.
7173
- Can be set to `none` to disable automatic tracer initialization.
74+
- Can be set to 'console` to display JSON results locally.
7275

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:
7677

7778
- jaeger_proto
7879
- jaeger_thrift
7980
- opencensus
81+
- otlp
82+
- otlp_proto_grpc (`deprecated`)
83+
- otlp_proto_http (`deprecated`)
8084
- zipkin_json
8185
- zipkin_proto
86+
87+
Metric exporter names:
88+
8289
- otlp
8390
- otlp_proto_grpc (`deprecated`)
84-
- otlp_proto_http (`deprecated`)
91+
- prometheus
8592

8693
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``
8894

8995
* ``--id-generator`` or ``OTEL_PYTHON_ID_GENERATOR``
9096

@@ -106,9 +112,9 @@ Examples
106112

107113
::
108114

109-
opentelemetry-instrument --traces_exporter otlp flask run --port=3000
115+
opentelemetry-instrument --traces_exporter console flask run --port=3000
110116

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``.
112118

113119
::
114120

0 commit comments

Comments
 (0)