Skip to content
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

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

Merged
merged 11 commits into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all 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.

6 changes: 3 additions & 3 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 @@ -289,7 +289,7 @@ Install the OpenTelemetry Collector exporter:

.. code-block:: sh

pip install opentelemetry-ext-otcollector
pip install opentelemetry-instrumentation-otcollector

And execute the following script:

Expand Down
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:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpenTelemetry System Metrics Instrumentation
============================================

.. automodule:: opentelemetry.ext.system_metrics
.. automodule:: opentelemetry.instrumentation.system_metrics
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sortfirst=
instrumentation/opentelemetry-instrumentation-wsgi
instrumentation/opentelemetry-instrumentation-dbapi
instrumentation/opentelemetry-instrumentation-asgi
ext/opentelemetry-ext-botocore
instrumentation/opentelemetry-instrumentation-botocore
instrumentation/*
exporter/*
ext/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

::

pip install opentelemetry-ext-datadog
pip install opentelemetry-exporter-datadog


Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"opentelemetry.instrumentation.dbapi": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.django": DatadogSpanTypes.WEB,
"opentelemetry.instrumentation.flask": DatadogSpanTypes.WEB,
"opentelemetry.ext.grpc": DatadogSpanTypes.GRPC,
"opentelemetry.ext.jinja2": DatadogSpanTypes.TEMPLATE,
"opentelemetry.instrumentation.grpc": DatadogSpanTypes.GRPC,
"opentelemetry.instrumentation.jinja2": DatadogSpanTypes.TEMPLATE,
"opentelemetry.instrumentation.mysql": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.psycopg2": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.pymemcache": DatadogSpanTypes.CACHE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ def test_span_types(self):
"opentelemetry.instrumentation.dbapi",
"opentelemetry.instrumentation.django",
"opentelemetry.instrumentation.flask",
"opentelemetry.ext.grpc",
"opentelemetry.ext.jinja2",
"opentelemetry.instrumentation.grpc",
"opentelemetry.instrumentation.jinja2",
"opentelemetry.instrumentation.mysql",
"opentelemetry.instrumentation.psycopg2",
"opentelemetry.instrumentation.pymongo",
Expand Down
21 changes: 0 additions & 21 deletions ext/opentelemetry-ext-jinja2/README.rst

This file was deleted.

Loading