Skip to content

Rename remaining framework packages from "ext" to "instrumentation" #969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,19 @@ pip install opentelemetry-sdk
```

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

```sh
pip install opentelemetry-ext-{integration}
pip install opentelemetry-instrumentation-{instrumentation}
```

The
[`exporter/`](https://github.com/open-telemetry/opentelemetry-python/tree/master/exporter)
directory includes OpenTelemetry exporter packages, which can be installed separately as:

```sh
pip install opentelemetry-exporter-{exporter}
```

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

## Documentation
Expand Down
9 changes: 1 addition & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@
if isdir(join(exp, f))
]

ext = "../ext"
ext_dirs = [
os.path.abspath("/".join(["../ext", f, "src"]))
for f in listdir(ext)
if isdir(join(ext, f))
]

instr = "../instrumentation"
instr_dirs = [
os.path.abspath("/".join(["../instrumentation", f, "src"]))
for f in listdir(instr)
if isdir(join(instr, f))
]

sys.path[:0] = source_dirs + exp_dirs + ext_dirs + instr_dirs
sys.path[:0] = source_dirs + exp_dirs + instr_dirs

# -- Project information -----------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

"""The Python implementation of the GRPC helloworld.Greeter client.

Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
to run these examples. To run this script in the context of the example app,
install ``opentelemetry-example-app``::

pip install -e ext/opentelemetry-ext-grpc/
pip install -e ext/opentelemetry-instrumentation-grpc/
pip install -e docs/examples/opentelemetry-example-app

Then run the server in one shell::
Expand All @@ -42,8 +42,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.ext.grpc import client_interceptor
from opentelemetry.ext.grpc.grpcext import intercept_channel
from opentelemetry.instrumentation.grpc import client_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

"""The Python implementation of the GRPC helloworld.Greeter server.

Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
to run these examples. To run this script in the context of the example app,
install ``opentelemetry-example-app``::

pip install -e ext/opentelemetry-ext-grpc/
pip install -e ext/opentelemetry-instrumentation-grpc/
pip install -e docs/examples/opentelemetry-example-app

Then run the server in one shell::
Expand All @@ -42,8 +42,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.ext.grpc import server_interceptor
from opentelemetry.ext.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpc import server_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

"""The Python implementation of the gRPC route guide client.

Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
to run these examples. To run this script in the context of the example app,
install ``opentelemetry-example-app``::

pip install -e ext/opentelemetry-ext-grpc/
pip install -e ext/opentelemetry-instrumentation-grpc/
pip install -e docs/examples/opentelemetry-example-app

Then run the server in one shell::
Expand All @@ -43,8 +43,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.ext.grpc import client_interceptor
from opentelemetry.ext.grpc.grpcext import intercept_channel
from opentelemetry.instrumentation.grpc import client_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

"""The Python implementation of the gRPC route guide server.

Note that you need ``opentelemetry-ext-grpc`` and ``protobuf`` to be installed
Note that you need ``opentelemetry-instrumentation-grpc`` and ``protobuf`` to be installed
to run these examples. To run this script in the context of the example app,
install ``opentelemetry-example-app``::

pip install -e ext/opentelemetry-ext-grpc/
pip install -e ext/opentelemetry-instrumentation-grpc/
pip install -e docs/examples/opentelemetry-example-app

Then run the server in one shell::
Expand All @@ -45,8 +45,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.ext.grpc import server_interceptor
from opentelemetry.ext.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpc import server_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/opentracing/README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
OpenTracing Shim Example
==========================

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

Expand Down Expand Up @@ -61,7 +61,7 @@ Alternatively, you can install the Python dependencies separately:
pip install \
opentelemetry-api \
opentelemetry-sdk \
opentelemetry-ext-jaeger \
opentelemetry-exporter-jaeger \
opentelemetry-opentracing-shim \
redis \
redis_opentracing
Expand Down Expand Up @@ -100,6 +100,6 @@ Useful links
------------

- OpenTelemetry_
- :doc:`../../ext/opentracing_shim/opentracing_shim`
- :doc:`../../instrumentation/opentracing_shim/opentracing_shim`

.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/
2 changes: 1 addition & 1 deletion docs/examples/opentracing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from opentelemetry import trace
from opentelemetry.exporter.jaeger import JaegerSpanExporter
from opentelemetry.ext import opentracing_shim
from opentelemetry.instrumentation import opentracing_shim
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
from rediscache import RedisCache
Expand Down
7 changes: 0 additions & 7 deletions docs/ext/boto/boto.rst

This file was deleted.

16 changes: 2 additions & 14 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ for Jaeger, but you can install that as a separate package:

.. code-block:: sh

pip install opentelemetry-ext-jaeger
pip install opentelemetry-exporter-jaeger

Once installed, update your code to import the Jaeger exporter, and use that instead:

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

.. code-block:: sh

pip install opentelemetry-ext-prometheus
pip install opentelemetry-exporter-prometheus


And use that instead of the `ConsoleMetricsExporter`:
Expand Down Expand Up @@ -284,15 +284,3 @@ Start the docker container:
-v /tmp/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
omnition/opentelemetry-collector-contrib:latest \
--config=/etc/otel-collector-config.yaml

Install the OpenTelemetry Collector exporter:

.. code-block:: sh

pip install opentelemetry-ext-otcollector

And execute the following script:

.. literalinclude:: getting_started/otcollector_example.py
:language: python
:lines: 15-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed?

Copy link
Contributor Author

@lzchen lzchen Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah otcollector is now opencensus exporter or opentelemetry exporter, i think we need new getting started for either one of those (probably OT). Probably will be good once the metrics exporter is done for otlp.

Copy link
Contributor Author

@lzchen lzchen Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh looks like @ocelotl has already fixed this in his other PR. I'll add this back.

74 changes: 0 additions & 74 deletions docs/getting_started/otcollector_example.py

This file was deleted.

16 changes: 5 additions & 11 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ The API and SDK packages are available on PyPI, and can installed via pip:

In addition, there are several extension packages which can be installed separately as::

pip install opentelemetry-ext-{integration}
pip install opentelemetry-exporter-{exporter}
pip install opentelemetry-instrumentation-{instrumentation}

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

Extensions
----------
Expand All @@ -51,7 +53,7 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
cd opentelemetry-python
pip install -e ./opentelemetry-api
pip install -e ./opentelemetry-sdk
pip install -e ./ext/opentelemetry-ext-{integration}
pip install -e ./instrumentation/opentelemetry-instrumentation-{instrumentation}


.. toctree::
Expand Down Expand Up @@ -86,14 +88,6 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>

instrumentation/**

.. toctree::
:maxdepth: 2
:caption: OpenTelemetry Integrations
:name: integrations
:glob:

ext/**

.. toctree::
:maxdepth: 1
:caption: Examples
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpenTelemetry Botocore Integration
OpenTelemetry Boto Instrumentation
==================================

.. automodule:: opentelemetry.ext.botocore
.. automodule:: opentelemetry.instrumentation.boto
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/instrumentation/botocore/botocore.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OpenTelemetry Botocore Instrumentation
======================================

.. automodule:: opentelemetry.instrumentation.botocore
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpenTelemetry Celery Instrumentation
====================================

.. automodule:: opentelemetry.ext.celery
.. automodule:: opentelemetry.instrumentation.celery
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenTelemetry gRPC Instrumentation
Module contents
---------------

.. automodule:: opentelemetry.ext.grpc
.. automodule:: opentelemetry.instrumentation.grpc
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpenTelemetry Jinja2 Instrumentation
====================================

.. automodule:: opentelemetry.ext.jinja2
.. automodule:: opentelemetry.instrumentation.jinja2
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTracing Shim for OpenTelemetry
==================================

.. automodule:: opentelemetry.ext.opentracing_shim
.. automodule:: opentelemetry.instrumentation.opentracing_shim
:no-show-inheritance:
Loading