Skip to content

Commit eb8b1ea

Browse files
authored
Rename remaining framework packages from "ext" to "instrumentation" (#969)
1 parent 57ca703 commit eb8b1ea

File tree

197 files changed

+374
-314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+374
-314
lines changed

README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,19 @@ pip install opentelemetry-sdk
6363
```
6464

6565
The
66-
[`ext/`](https://github.com/open-telemetry/opentelemetry-python/tree/master/ext)
67-
directory includes OpenTelemetry integration packages, which can be installed
68-
separately as:
66+
[`instrumentation/`](https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation)
67+
directory includes OpenTelemetry instrumentation packages, which can be installed separately as:
6968

7069
```sh
71-
pip install opentelemetry-ext-{integration}
70+
pip install opentelemetry-instrumentation-{instrumentation}
71+
```
72+
73+
The
74+
[`exporter/`](https://github.com/open-telemetry/opentelemetry-python/tree/master/exporter)
75+
directory includes OpenTelemetry exporter packages, which can be installed separately as:
76+
77+
```sh
78+
pip install opentelemetry-exporter-{exporter}
7279
```
7380

7481
To install the development versions of these packages instead, clone or fork
@@ -78,7 +85,7 @@ install](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs)
7885
```sh
7986
pip install -e ./opentelemetry-api
8087
pip install -e ./opentelemetry-sdk
81-
pip install -e ./ext/opentelemetry-ext-{integration}
88+
pip install -e ./ext/opentelemetry-instrumentation-{instrumentation}
8289
```
8390

8491
## Documentation

docs/conf.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,14 @@
3737
if isdir(join(exp, f))
3838
]
3939

40-
ext = "../ext"
41-
ext_dirs = [
42-
os.path.abspath("/".join(["../ext", f, "src"]))
43-
for f in listdir(ext)
44-
if isdir(join(ext, f))
45-
]
46-
4740
instr = "../instrumentation"
4841
instr_dirs = [
4942
os.path.abspath("/".join(["../instrumentation", f, "src"]))
5043
for f in listdir(instr)
5144
if isdir(join(instr, f))
5245
]
5346

54-
sys.path[:0] = source_dirs + exp_dirs + ext_dirs + instr_dirs
47+
sys.path[:0] = source_dirs + exp_dirs + instr_dirs
5548

5649
# -- Project information -----------------------------------------------------
5750

docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/hello_world_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
"""The Python implementation of the GRPC helloworld.Greeter client.
1919
20-
Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
20+
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
2121
to run these examples. To run this script in the context of the example app,
2222
install ``opentelemetry-example-app``::
2323
24-
pip install -e ext/opentelemetry-ext-grpc/
24+
pip install -e ext/opentelemetry-instrumentation-grpc/
2525
pip install -e docs/examples/opentelemetry-example-app
2626
2727
Then run the server in one shell::
@@ -42,8 +42,8 @@
4242
import grpc
4343

4444
from opentelemetry import trace
45-
from opentelemetry.ext.grpc import client_interceptor
46-
from opentelemetry.ext.grpc.grpcext import intercept_channel
45+
from opentelemetry.instrumentation.grpc import client_interceptor
46+
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
4747
from opentelemetry.sdk.trace import TracerProvider
4848
from opentelemetry.sdk.trace.export import (
4949
ConsoleSpanExporter,

docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/hello_world_server.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
"""The Python implementation of the GRPC helloworld.Greeter server.
1919
20-
Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
20+
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
2121
to run these examples. To run this script in the context of the example app,
2222
install ``opentelemetry-example-app``::
2323
24-
pip install -e ext/opentelemetry-ext-grpc/
24+
pip install -e ext/opentelemetry-instrumentation-grpc/
2525
pip install -e docs/examples/opentelemetry-example-app
2626
2727
Then run the server in one shell::
@@ -42,8 +42,8 @@
4242
import grpc
4343

4444
from opentelemetry import trace
45-
from opentelemetry.ext.grpc import server_interceptor
46-
from opentelemetry.ext.grpc.grpcext import intercept_server
45+
from opentelemetry.instrumentation.grpc import server_interceptor
46+
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
4747
from opentelemetry.sdk.trace import TracerProvider
4848
from opentelemetry.sdk.trace.export import (
4949
ConsoleSpanExporter,

docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/route_guide_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
"""The Python implementation of the gRPC route guide client.
1919
20-
Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
20+
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
2121
to run these examples. To run this script in the context of the example app,
2222
install ``opentelemetry-example-app``::
2323
24-
pip install -e ext/opentelemetry-ext-grpc/
24+
pip install -e ext/opentelemetry-instrumentation-grpc/
2525
pip install -e docs/examples/opentelemetry-example-app
2626
2727
Then run the server in one shell::
@@ -43,8 +43,8 @@
4343
import grpc
4444

4545
from opentelemetry import trace
46-
from opentelemetry.ext.grpc import client_interceptor
47-
from opentelemetry.ext.grpc.grpcext import intercept_channel
46+
from opentelemetry.instrumentation.grpc import client_interceptor
47+
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
4848
from opentelemetry.sdk.trace import TracerProvider
4949
from opentelemetry.sdk.trace.export import (
5050
ConsoleSpanExporter,

docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/route_guide_server.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
"""The Python implementation of the gRPC route guide server.
2020
21-
Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
21+
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
2222
to run these examples. To run this script in the context of the example app,
2323
install ``opentelemetry-example-app``::
2424
25-
pip install -e ext/opentelemetry-ext-grpc/
25+
pip install -e ext/opentelemetry-instrumentation-grpc/
2626
pip install -e docs/examples/opentelemetry-example-app
2727
2828
Then run the server in one shell::
@@ -45,8 +45,8 @@
4545
import grpc
4646

4747
from opentelemetry import trace
48-
from opentelemetry.ext.grpc import server_interceptor
49-
from opentelemetry.ext.grpc.grpcext import intercept_server
48+
from opentelemetry.instrumentation.grpc import server_interceptor
49+
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
5050
from opentelemetry.sdk.trace import TracerProvider
5151
from opentelemetry.sdk.trace.export import (
5252
ConsoleSpanExporter,

docs/examples/opentracing/README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
OpenTracing Shim Example
22
==========================
33

4-
This example shows how to use the :doc:`opentelemetry-ext-opentracing-shim
5-
package <../../ext/opentracing_shim/opentracing_shim>`
4+
This example shows how to use the :doc:`opentelemetry-instrumentation-opentracing-shim
5+
package <../../instrumentation/opentracing_shim/opentracing_shim>`
66
to interact with libraries instrumented with
77
`opentracing-python <https://github.com/opentracing/opentracing-python>`_.
88

@@ -61,7 +61,7 @@ Alternatively, you can install the Python dependencies separately:
6161
pip install \
6262
opentelemetry-api \
6363
opentelemetry-sdk \
64-
opentelemetry-ext-jaeger \
64+
opentelemetry-exporter-jaeger \
6565
opentelemetry-opentracing-shim \
6666
redis \
6767
redis_opentracing
@@ -100,6 +100,6 @@ Useful links
100100
------------
101101

102102
- OpenTelemetry_
103-
- :doc:`../../ext/opentracing_shim/opentracing_shim`
103+
- :doc:`../../instrumentation/opentracing_shim/opentracing_shim`
104104

105105
.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/

docs/examples/opentracing/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from opentelemetry import trace
44
from opentelemetry.exporter.jaeger import JaegerSpanExporter
5-
from opentelemetry.ext import opentracing_shim
5+
from opentelemetry.instrumentation import opentracing_shim
66
from opentelemetry.sdk.trace import TracerProvider
77
from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
88
from rediscache import RedisCache

docs/ext/boto/boto.rst

-7
This file was deleted.

docs/getting-started.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ for Jaeger, but you can install that as a separate package:
122122

123123
.. code-block:: sh
124124
125-
pip install opentelemetry-ext-jaeger
125+
pip install opentelemetry-exporter-jaeger
126126
127127
Once installed, update your code to import the Jaeger exporter, and use that instead:
128128

@@ -228,7 +228,7 @@ For our Python application, we will need to install an exporter specific to Prom
228228

229229
.. code-block:: sh
230230
231-
pip install opentelemetry-ext-prometheus
231+
pip install opentelemetry-exporter-prometheus
232232
233233
234234
And use that instead of the `ConsoleMetricsExporter`:
@@ -289,7 +289,7 @@ Install the OpenTelemetry Collector exporter:
289289

290290
.. code-block:: sh
291291
292-
pip install opentelemetry-ext-otcollector
292+
pip install opentelemetry-instrumentation-otcollector
293293
294294
And execute the following script:
295295

docs/index.rst

+5-11
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ The API and SDK packages are available on PyPI, and can installed via pip:
2626
2727
In addition, there are several extension packages which can be installed separately as::
2828

29-
pip install opentelemetry-ext-{integration}
29+
pip install opentelemetry-exporter-{exporter}
30+
pip install opentelemetry-instrumentation-{instrumentation}
3031

31-
The extension packages can be found in :scm_web:`ext/ directory of the repository <ext/>`.
32+
These are for exporter and instrumentation packages respectively.
33+
The packages can be found in :scm_web:`instrumentation/ directory of the repository <ext/>`.
3234

3335
Extensions
3436
----------
@@ -51,7 +53,7 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
5153
cd opentelemetry-python
5254
pip install -e ./opentelemetry-api
5355
pip install -e ./opentelemetry-sdk
54-
pip install -e ./ext/opentelemetry-ext-{integration}
56+
pip install -e ./instrumentation/opentelemetry-instrumentation-{instrumentation}
5557
5658
5759
.. toctree::
@@ -86,14 +88,6 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
8688

8789
instrumentation/**
8890

89-
.. toctree::
90-
:maxdepth: 2
91-
:caption: OpenTelemetry Integrations
92-
:name: integrations
93-
:glob:
94-
95-
ext/**
96-
9791
.. toctree::
9892
:maxdepth: 1
9993
:caption: Examples
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
OpenTelemetry Botocore Integration
1+
OpenTelemetry Boto Instrumentation
22
==================================
33

4-
.. automodule:: opentelemetry.ext.botocore
4+
.. automodule:: opentelemetry.instrumentation.boto
55
:members:
66
:undoc-members:
77
:show-inheritance:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OpenTelemetry Botocore Instrumentation
2+
======================================
3+
4+
.. automodule:: opentelemetry.instrumentation.botocore
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OpenTelemetry Celery Instrumentation
22
====================================
33

4-
.. automodule:: opentelemetry.ext.celery
4+
.. automodule:: opentelemetry.instrumentation.celery
55
:members:
66
:undoc-members:
77
:show-inheritance:

docs/ext/grpc/grpc.rst docs/instrumentation/grpc/grpc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OpenTelemetry gRPC Instrumentation
44
Module contents
55
---------------
66

7-
.. automodule:: opentelemetry.ext.grpc
7+
.. automodule:: opentelemetry.instrumentation.grpc
88
:members:
99
:undoc-members:
1010
:show-inheritance:
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OpenTelemetry Jinja2 Instrumentation
22
====================================
33

4-
.. automodule:: opentelemetry.ext.jinja2
4+
.. automodule:: opentelemetry.instrumentation.jinja2
55
:members:
66
:undoc-members:
77
:show-inheritance:
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
OpenTracing Shim for OpenTelemetry
22
==================================
33

4-
.. automodule:: opentelemetry.ext.opentracing_shim
4+
.. automodule:: opentelemetry.instrumentation.opentracing_shim
55
:no-show-inheritance:
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OpenTelemetry System Metrics Instrumentation
22
============================================
33

4-
.. automodule:: opentelemetry.ext.system_metrics
4+
.. automodule:: opentelemetry.instrumentation.system_metrics
55
:members:
66
:undoc-members:
77
:show-inheritance:

eachdist.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sortfirst=
1010
instrumentation/opentelemetry-instrumentation-wsgi
1111
instrumentation/opentelemetry-instrumentation-dbapi
1212
instrumentation/opentelemetry-instrumentation-asgi
13-
ext/opentelemetry-ext-botocore
13+
instrumentation/opentelemetry-instrumentation-botocore
1414
instrumentation/*
1515
exporter/*
1616
ext/*

exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
::
2323
24-
pip install opentelemetry-ext-datadog
24+
pip install opentelemetry-exporter-datadog
2525
2626
2727
Usage

exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"opentelemetry.instrumentation.dbapi": DatadogSpanTypes.SQL,
3838
"opentelemetry.instrumentation.django": DatadogSpanTypes.WEB,
3939
"opentelemetry.instrumentation.flask": DatadogSpanTypes.WEB,
40-
"opentelemetry.ext.grpc": DatadogSpanTypes.GRPC,
41-
"opentelemetry.ext.jinja2": DatadogSpanTypes.TEMPLATE,
40+
"opentelemetry.instrumentation.grpc": DatadogSpanTypes.GRPC,
41+
"opentelemetry.instrumentation.jinja2": DatadogSpanTypes.TEMPLATE,
4242
"opentelemetry.instrumentation.mysql": DatadogSpanTypes.SQL,
4343
"opentelemetry.instrumentation.psycopg2": DatadogSpanTypes.SQL,
4444
"opentelemetry.instrumentation.pymemcache": DatadogSpanTypes.CACHE,

exporter/opentelemetry-exporter-datadog/tests/test_datadog_exporter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ def test_span_types(self):
294294
"opentelemetry.instrumentation.dbapi",
295295
"opentelemetry.instrumentation.django",
296296
"opentelemetry.instrumentation.flask",
297-
"opentelemetry.ext.grpc",
298-
"opentelemetry.ext.jinja2",
297+
"opentelemetry.instrumentation.grpc",
298+
"opentelemetry.instrumentation.jinja2",
299299
"opentelemetry.instrumentation.mysql",
300300
"opentelemetry.instrumentation.psycopg2",
301301
"opentelemetry.instrumentation.pymongo",

ext/opentelemetry-ext-jinja2/README.rst

-21
This file was deleted.

0 commit comments

Comments
 (0)