diff --git a/docs-requirements.txt b/docs-requirements.txt
index 10ecacb2fd..e98a0d35df 100644
--- a/docs-requirements.txt
+++ b/docs-requirements.txt
@@ -8,6 +8,7 @@ asyncpg>=0.12.0
ddtrace>=0.34.0
aiohttp~= 3.0
aiopg>=0.13.0
+grpcio~=1.27
Deprecated>=1.2.6
django>=2.2
PyMySQL~=0.9.3
@@ -29,5 +30,3 @@ boto~=2.0
botocore~=1.0
starlette~=0.13
fastapi~=0.58.1
-opentelemetry-exporter-cloud-trace==0.10b0
-opentelemetry-exporter-cloud-monitoring==0.10b0
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index d3af10b7d6..db836ea27e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -43,7 +43,15 @@
for f in listdir(ext)
if isdir(join(ext, f))
]
-sys.path[:0] = source_dirs + exp_dirs + ext_dirs
+
+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
# -- Project information -----------------------------------------------------
diff --git a/docs/examples/auto-instrumentation/README.rst b/docs/examples/auto-instrumentation/README.rst
index b5a7649503..e4af3c6bd5 100644
--- a/docs/examples/auto-instrumentation/README.rst
+++ b/docs/examples/auto-instrumentation/README.rst
@@ -73,7 +73,7 @@ Installation
$ pip install opentelemetry-sdk
$ pip install opentelemetry-instrumentation
- $ pip install opentelemetry-ext-flask
+ $ pip install opentelemetry-instrumentation-flask
$ pip install requests
Execution
diff --git a/docs/examples/auto-instrumentation/server_instrumented.py b/docs/examples/auto-instrumentation/server_instrumented.py
index 528b107e03..c8562828be 100644
--- a/docs/examples/auto-instrumentation/server_instrumented.py
+++ b/docs/examples/auto-instrumentation/server_instrumented.py
@@ -15,7 +15,7 @@
from flask import Flask, request
from opentelemetry import propagators, trace
-from opentelemetry.ext.wsgi import collect_request_attributes
+from opentelemetry.instrumentation.wsgi import collect_request_attributes
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
diff --git a/docs/examples/datadog_exporter/README.rst b/docs/examples/datadog_exporter/README.rst
index 250eec2b84..03f485da15 100644
--- a/docs/examples/datadog_exporter/README.rst
+++ b/docs/examples/datadog_exporter/README.rst
@@ -50,7 +50,7 @@ Distributed Example
pip install opentelemetry-sdk
pip install opentelemetry-exporter-datadog
pip install opentelemetry-instrumentation
- pip install opentelemetry-ext-flask
+ pip install opentelemetry-instrumentation-flask
pip install flask
pip install requests
diff --git a/docs/examples/django/README.rst b/docs/examples/django/README.rst
index 6f441dd333..38ef365b32 100644
--- a/docs/examples/django/README.rst
+++ b/docs/examples/django/README.rst
@@ -1,7 +1,7 @@
OpenTelemetry Django Instrumentation Example
============================================
-This shows how to use ``opentelemetry-ext-django`` to automatically instrument a
+This shows how to use ``opentelemetry-instrumentation-django`` to automatically instrument a
Django app.
For more user convenience, a Django app is already provided in this directory.
@@ -24,7 +24,7 @@ Installation
.. code-block::
$ pip install opentelemetry-sdk
- $ pip install opentelemetry-ext-django
+ $ pip install opentelemetry-instrumentation-django
$ pip install requests
@@ -40,7 +40,7 @@ Set these environment variables first:
#. ``export DJANGO_SETTINGS_MODULE=instrumentation_example.settings``
The way to achieve OpenTelemetry instrumentation for your Django app is to use
-an ``opentelemetry.ext.django.DjangoInstrumentor`` to instrument the app.
+an ``opentelemetry.instrumentation.django.DjangoInstrumentor`` to instrument the app.
Clone the ``opentelemetry-python`` repository and go to ``opentelemetry-python/docs/examples/django``.
@@ -105,4 +105,4 @@ References
* `Django `_
* `OpenTelemetry Project `_
-* `OpenTelemetry Django extension `_
+* `OpenTelemetry Django extension `_
diff --git a/docs/examples/django/manage.py b/docs/examples/django/manage.py
index fdf32287c5..3a67dbf829 100755
--- a/docs/examples/django/manage.py
+++ b/docs/examples/django/manage.py
@@ -17,7 +17,7 @@
import os
import sys
-from opentelemetry.ext.django import DjangoInstrumentor
+from opentelemetry.instrumentation.django import DjangoInstrumentor
def main():
diff --git a/docs/examples/opentelemetry-example-app/setup.cfg b/docs/examples/opentelemetry-example-app/setup.cfg
index f7dd1eccdf..e77fbae376 100644
--- a/docs/examples/opentelemetry-example-app/setup.cfg
+++ b/docs/examples/opentelemetry-example-app/setup.cfg
@@ -45,8 +45,8 @@ install_requires =
typing; python_version<'3.5'
opentelemetry-api == 0.12.dev0
opentelemetry-sdk == 0.12.dev0
- opentelemetry-ext-requests == 0.12.dev0
- opentelemetry-ext-flask == 0.12.dev0
+ opentelemetry-instrumentation-requests == 0.12.dev0
+ opentelemetry-instrumentation-flask == 0.12.dev0
flask
requests
protobuf~=3.11
diff --git a/docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/flask_example.py b/docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/flask_example.py
index 8f44273b6e..9838336504 100644
--- a/docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/flask_example.py
+++ b/docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/flask_example.py
@@ -19,9 +19,9 @@
import flask
import requests
-import opentelemetry.ext.requests
+import opentelemetry.instrumentation.requests
from opentelemetry import trace
-from opentelemetry.ext.flask import FlaskInstrumentor
+from opentelemetry.instrumentation.flask import FlaskInstrumentor
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
@@ -33,7 +33,7 @@
# It must be done before instrumenting any library
trace.set_tracer_provider(TracerProvider())
-opentelemetry.ext.requests.RequestsInstrumentor().instrument()
+opentelemetry.instrumentation.requests.RequestsInstrumentor().instrument()
trace.get_tracer_provider().add_span_processor(
SimpleExportSpanProcessor(ConsoleSpanExporter())
diff --git a/docs/ext/aiohttp_client/aiohttp_client.rst b/docs/ext/aiohttp_client/aiohttp_client.rst
deleted file mode 100644
index e5ab26b0ea..0000000000
--- a/docs/ext/aiohttp_client/aiohttp_client.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-OpenTelemetry aiohttp client Integration
-========================================
-
-.. automodule:: opentelemetry.ext.aiohttp_client
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/docs/ext/asgi/asgi.rst b/docs/ext/asgi/asgi.rst
deleted file mode 100644
index 82c9833069..0000000000
--- a/docs/ext/asgi/asgi.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-opentelemetry.ext.asgi package
-==============================
-
-Module contents
----------------
-
-.. automodule:: opentelemetry.ext.asgi
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/docs/ext/flask/flask.rst b/docs/ext/flask/flask.rst
deleted file mode 100644
index 2fc19de3ec..0000000000
--- a/docs/ext/flask/flask.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-OpenTelemetry Flask Integration
-===============================
-
-.. automodule:: opentelemetry.ext.flask
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/docs/ext/grpc/grpc.rst b/docs/ext/grpc/grpc.rst
index 8a0775f28f..351d3bfb0d 100644
--- a/docs/ext/grpc/grpc.rst
+++ b/docs/ext/grpc/grpc.rst
@@ -1,5 +1,5 @@
-OpenTelemetry gRPC Integration
-==============================
+OpenTelemetry gRPC Instrumentation
+==================================
Module contents
---------------
diff --git a/docs/ext/pyramid/pyramid.rst b/docs/ext/pyramid/pyramid.rst
deleted file mode 100644
index b46718c387..0000000000
--- a/docs/ext/pyramid/pyramid.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-OpenTelemetry Pyramid Integration
-=================================
-
-.. automodule:: opentelemetry.ext.pyramid
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/docs/ext/wsgi/wsgi.rst b/docs/ext/wsgi/wsgi.rst
deleted file mode 100644
index af2bd4dd36..0000000000
--- a/docs/ext/wsgi/wsgi.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-OpenTelemetry WSGI Middleware
-=============================
-
-.. automodule:: opentelemetry.ext.wsgi
- :members:
- :undoc-members:
- :show-inheritance:
diff --git a/docs/getting-started.rst b/docs/getting-started.rst
index c4ed47ad33..11e3a08fec 100644
--- a/docs/getting-started.rst
+++ b/docs/getting-started.rst
@@ -156,8 +156,8 @@ We will now instrument a basic Flask application that uses the requests library
.. code-block:: sh
- pip install opentelemetry-ext-flask
- pip install opentelemetry-ext-requests
+ pip install opentelemetry-instrumentation-flask
+ pip install opentelemetry-instrumentation-requests
And let's write a small Flask application that sends an HTTP request, activating each instrumentation during the initialization:
diff --git a/docs/getting_started/flask_example.py b/docs/getting_started/flask_example.py
index 77a50a799b..c4a172389c 100644
--- a/docs/getting_started/flask_example.py
+++ b/docs/getting_started/flask_example.py
@@ -17,8 +17,8 @@
import requests
from opentelemetry import trace
-from opentelemetry.ext.flask import FlaskInstrumentor
-from opentelemetry.ext.requests import RequestsInstrumentor
+from opentelemetry.instrumentation.flask import FlaskInstrumentor
+from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
diff --git a/docs/index.rst b/docs/index.rst
index b59af3a003..3378daac07 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -84,6 +84,14 @@ install
:name: Instrumentations
:glob:
+ instrumentation/**
+
+.. toctree::
+ :maxdepth: 2
+ :caption: OpenTelemetry Integrations
+ :name: integrations
+ :glob:
+
ext/**
.. toctree::
diff --git a/docs/instrumentation/aiohttp_client/aiohttp_client.rst b/docs/instrumentation/aiohttp_client/aiohttp_client.rst
new file mode 100644
index 0000000000..f8549f07fa
--- /dev/null
+++ b/docs/instrumentation/aiohttp_client/aiohttp_client.rst
@@ -0,0 +1,7 @@
+OpenTelemetry aiohttp client Instrumentation
+============================================
+
+.. automodule:: opentelemetry.instrumentation.aiohttp_client
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/ext/aiopg/aiopg.rst b/docs/instrumentation/aiopg/aiopg.rst
similarity index 80%
rename from docs/ext/aiopg/aiopg.rst
rename to docs/instrumentation/aiopg/aiopg.rst
index ff8d91ed11..9da450c4e7 100644
--- a/docs/ext/aiopg/aiopg.rst
+++ b/docs/instrumentation/aiopg/aiopg.rst
@@ -1,4 +1,4 @@
-OpenTelemetry aiopg instrumentation
+OpenTelemetry aiopg Instrumentation
===================================
.. automodule:: opentelemetry.instrumentation.aiopg
diff --git a/docs/instrumentation/asgi/asgi.rst b/docs/instrumentation/asgi/asgi.rst
new file mode 100644
index 0000000000..abb1621973
--- /dev/null
+++ b/docs/instrumentation/asgi/asgi.rst
@@ -0,0 +1,10 @@
+OpenTelemetry asgi Instrumentation
+===================================
+
+Module contents
+---------------
+
+.. automodule:: opentelemetry.instrumentation.asgi
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/ext/django/django.rst b/docs/instrumentation/django/django.rst
similarity index 71%
rename from docs/ext/django/django.rst
rename to docs/instrumentation/django/django.rst
index 1a2c844e28..8076730843 100644
--- a/docs/ext/django/django.rst
+++ b/docs/instrumentation/django/django.rst
@@ -1,7 +1,7 @@
OpenTelemetry Django Instrumentation
====================================
-.. automodule:: opentelemetry.ext.django
+.. automodule:: opentelemetry.instrumentation.django
:members:
:undoc-members:
:show-inheritance:
diff --git a/docs/ext/fastapi/fastapi.rst b/docs/instrumentation/fastapi/fastapi.rst
similarity index 57%
rename from docs/ext/fastapi/fastapi.rst
rename to docs/instrumentation/fastapi/fastapi.rst
index 9295261584..09eb8a828b 100644
--- a/docs/ext/fastapi/fastapi.rst
+++ b/docs/instrumentation/fastapi/fastapi.rst
@@ -1,4 +1,4 @@
-.. include:: ../../../ext/opentelemetry-instrumentation-fastapi/README.rst
+.. include:: ../../../instrumentation/opentelemetry-instrumentation-fastapi/README.rst
API
---
diff --git a/docs/instrumentation/flask/flask.rst b/docs/instrumentation/flask/flask.rst
new file mode 100644
index 0000000000..ac8932acd4
--- /dev/null
+++ b/docs/instrumentation/flask/flask.rst
@@ -0,0 +1,7 @@
+OpenTelemetry Flask Instrumentation
+===================================
+
+.. automodule:: opentelemetry.instrumentation.flask
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/instrumentation/instrumentation.rst b/docs/instrumentation/instrumentation.rst
index bcb85043f4..9c01b6b6f4 100644
--- a/docs/instrumentation/instrumentation.rst
+++ b/docs/instrumentation/instrumentation.rst
@@ -1,5 +1,5 @@
-OpenTelemetry Python Instrumentation
-====================================
+OpenTelemetry Python Instrumentor
+=================================
.. automodule:: opentelemetry.instrumentation
:members:
diff --git a/docs/instrumentation/pyramid/pyramid.rst b/docs/instrumentation/pyramid/pyramid.rst
new file mode 100644
index 0000000000..56abd2800b
--- /dev/null
+++ b/docs/instrumentation/pyramid/pyramid.rst
@@ -0,0 +1,7 @@
+OpenTelemetry Pyramid Instrumentation
+=====================================
+
+.. automodule:: opentelemetry.instrumentation.pyramid
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/instrumentation/requests/requests.rst b/docs/instrumentation/requests/requests.rst
new file mode 100644
index 0000000000..7a0665cd99
--- /dev/null
+++ b/docs/instrumentation/requests/requests.rst
@@ -0,0 +1,7 @@
+OpenTelemetry requests Instrumentation
+======================================
+
+.. automodule:: opentelemetry.instrumentation.requests
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/ext/starlette/starlette.rst b/docs/instrumentation/starlette/starlette.rst
similarity index 57%
rename from docs/ext/starlette/starlette.rst
rename to docs/instrumentation/starlette/starlette.rst
index 8e2d1d7bc8..0efa8cce83 100644
--- a/docs/ext/starlette/starlette.rst
+++ b/docs/instrumentation/starlette/starlette.rst
@@ -1,4 +1,4 @@
-.. include:: ../../../ext/opentelemetry-instrumentation-starlette/README.rst
+.. include:: ../../../instrumentation/opentelemetry-instrumentation-starlette/README.rst
API
---
diff --git a/docs/ext/requests/requests.rst b/docs/instrumentation/wsgi/wsgi.rst
similarity index 51%
rename from docs/ext/requests/requests.rst
rename to docs/instrumentation/wsgi/wsgi.rst
index 5959d4c924..39ad5ffd58 100644
--- a/docs/ext/requests/requests.rst
+++ b/docs/instrumentation/wsgi/wsgi.rst
@@ -1,7 +1,7 @@
-OpenTelemetry requests Integration
+OpenTelemetry WSGI Instrumentation
==================================
-.. automodule:: opentelemetry.ext.requests
+.. automodule:: opentelemetry.instrumentation.wsgi
:members:
:undoc-members:
:show-inheritance:
diff --git a/eachdist.ini b/eachdist.ini
index 82fc0271ed..06d940378c 100644
--- a/eachdist.ini
+++ b/eachdist.ini
@@ -7,11 +7,12 @@ sortfirst=
opentelemetry-instrumentation
opentelemetry-proto
tests/util
- exporter/*
- ext/opentelemetry-ext-wsgi
+ instrumentation/opentelemetry-instrumentation-wsgi
ext/opentelemetry-ext-dbapi
- ext/opentelemetry-ext-asgi
+ instrumentation/opentelemetry-instrumentation-asgi
ext/opentelemetry-ext-botocore
+ instrumentation/*
+ exporter/*
ext/*
[lintroots]
diff --git a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py
index e11772d0d9..785bccccce 100644
--- a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py
+++ b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py
@@ -32,11 +32,11 @@
DEFAULT_AGENT_URL = "http://localhost:8126"
_INSTRUMENTATION_SPAN_TYPES = {
- "opentelemetry.ext.aiohttp-client": DatadogSpanTypes.HTTP,
- "opentelemetry.ext.asgi": DatadogSpanTypes.WEB,
+ "opentelemetry.instrumentation.aiohttp-client": DatadogSpanTypes.HTTP,
+ "opentelemetry.instrumentation.asgi": DatadogSpanTypes.WEB,
"opentelemetry.ext.dbapi": DatadogSpanTypes.SQL,
- "opentelemetry.ext.django": DatadogSpanTypes.WEB,
- "opentelemetry.ext.flask": DatadogSpanTypes.WEB,
+ "opentelemetry.instrumentation.django": DatadogSpanTypes.WEB,
+ "opentelemetry.instrumentation.flask": DatadogSpanTypes.WEB,
"opentelemetry.ext.grpc": DatadogSpanTypes.GRPC,
"opentelemetry.ext.jinja2": DatadogSpanTypes.TEMPLATE,
"opentelemetry.ext.mysql": DatadogSpanTypes.SQL,
@@ -45,9 +45,9 @@
"opentelemetry.ext.pymongo": DatadogSpanTypes.MONGODB,
"opentelemetry.ext.pymysql": DatadogSpanTypes.SQL,
"opentelemetry.ext.redis": DatadogSpanTypes.REDIS,
- "opentelemetry.ext.requests": DatadogSpanTypes.HTTP,
+ "opentelemetry.instrumentation.requests": DatadogSpanTypes.HTTP,
"opentelemetry.ext.sqlalchemy": DatadogSpanTypes.SQL,
- "opentelemetry.ext.wsgi": DatadogSpanTypes.WEB,
+ "opentelemetry.instrumentation.wsgi": DatadogSpanTypes.WEB,
}
diff --git a/exporter/opentelemetry-exporter-datadog/tests/test_datadog_exporter.py b/exporter/opentelemetry-exporter-datadog/tests/test_datadog_exporter.py
index a3e67790d9..cf3c3c7256 100644
--- a/exporter/opentelemetry-exporter-datadog/tests/test_datadog_exporter.py
+++ b/exporter/opentelemetry-exporter-datadog/tests/test_datadog_exporter.py
@@ -290,10 +290,10 @@ def test_resources(self):
def test_span_types(self):
test_instrumentations = [
- "opentelemetry.ext.aiohttp-client",
+ "opentelemetry.instrumentation.aiohttp-client",
"opentelemetry.ext.dbapi",
- "opentelemetry.ext.django",
- "opentelemetry.ext.flask",
+ "opentelemetry.instrumentation.django",
+ "opentelemetry.instrumentation.flask",
"opentelemetry.ext.grpc",
"opentelemetry.ext.jinja2",
"opentelemetry.ext.mysql",
@@ -301,9 +301,9 @@ def test_span_types(self):
"opentelemetry.ext.pymongo",
"opentelemetry.ext.pymysql",
"opentelemetry.ext.redis",
- "opentelemetry.ext.requests",
+ "opentelemetry.instrumentation.requests",
"opentelemetry.ext.sqlalchemy",
- "opentelemetry.ext.wsgi",
+ "opentelemetry.instrumentation.wsgi",
]
for index, instrumentation in enumerate(test_instrumentations):
diff --git a/ext/opentelemetry-ext-aiohttp-client/CHANGELOG.md b/ext/opentelemetry-ext-aiohttp-client/CHANGELOG.md
deleted file mode 100644
index 43990fab16..0000000000
--- a/ext/opentelemetry-ext-aiohttp-client/CHANGELOG.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Changelog
-
-## Unreleased
-
-## 0.7b1
-
-Released 2020-05-12
-
-- Initial release
diff --git a/ext/opentelemetry-ext-grpc/setup.cfg b/ext/opentelemetry-ext-grpc/setup.cfg
index c7dac4c356..a3533bdf59 100644
--- a/ext/opentelemetry-ext-grpc/setup.cfg
+++ b/ext/opentelemetry-ext-grpc/setup.cfg
@@ -14,7 +14,7 @@
[metadata]
name = opentelemetry-ext-grpc
-description = OpenTelemetry gRPC Integration
+description = OpenTelemetry gRPC instrumentation
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
diff --git a/ext/opentelemetry-ext-requests/README.rst b/ext/opentelemetry-ext-requests/README.rst
deleted file mode 100644
index 95d80d4997..0000000000
--- a/ext/opentelemetry-ext-requests/README.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-OpenTelemetry requests Integration
-==================================
-
-|pypi|
-
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-requests.svg
- :target: https://pypi.org/project/opentelemetry-ext-requests/
-
-This library allows tracing HTTP requests made by the
-`requests `_ library.
-
-Installation
-------------
-
-::
-
- pip install opentelemetry-ext-requests
-
-References
-----------
-
-* `OpenTelemetry requests Integration `_
-* `OpenTelemetry Project `_
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-aiohttp-client/CHANGELOG.md
new file mode 100644
index 0000000000..d7dce5f65c
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Changelog
+
+## Unreleased
+
+- Change package name to opentelemetry-instrumentation-aiohttp-client
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
+
+## 0.7b1
+
+Released 2020-05-12
+
+- Initial release
diff --git a/ext/opentelemetry-ext-aiohttp-client/LICENSE b/instrumentation/opentelemetry-instrumentation-aiohttp-client/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-aiohttp-client/LICENSE
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/LICENSE
diff --git a/ext/opentelemetry-ext-aiohttp-client/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-aiohttp-client/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-aiohttp-client/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/MANIFEST.in
diff --git a/ext/opentelemetry-ext-aiohttp-client/README.rst b/instrumentation/opentelemetry-instrumentation-aiohttp-client/README.rst
similarity index 64%
rename from ext/opentelemetry-ext-aiohttp-client/README.rst
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/README.rst
index c257639cf3..bc44e0e262 100644
--- a/ext/opentelemetry-ext-aiohttp-client/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/README.rst
@@ -3,8 +3,8 @@ OpenTelemetry aiohttp client Integration
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-aiohttp-client.svg
- :target: https://pypi.org/project/opentelemetry-ext-aiohttp-client/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-aiohttp-client.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-aiohttp-client/
This library allows tracing HTTP requests made by the
`aiohttp client `_ library.
@@ -14,7 +14,7 @@ Installation
::
- pip install opentelemetry-ext-aiohttp-client
+ pip install opentelemetry-instrumentation-aiohttp-client
References
diff --git a/ext/opentelemetry-ext-aiohttp-client/setup.cfg b/instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.cfg
similarity index 86%
rename from ext/opentelemetry-ext-aiohttp-client/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.cfg
index d2be7e8c6e..318721ba64 100644
--- a/ext/opentelemetry-ext-aiohttp-client/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-aiohttp-client
-description = OpenTelemetry aiohttp client integration
+name = opentelemetry-instrumentation-aiohttp-client
+description = OpenTelemetry aiohttp client instrumentation
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/ext/opentelemetry-ext-aiohttp-client
+url = https://github.com/open-telemetry/opentelemetry-python/instrumentation/opentelemetry-instrumentation-aiohttp-client
platforms = any
license = Apache-2.0
classifiers =
diff --git a/ext/opentelemetry-ext-aiohttp-client/setup.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.py
similarity index 88%
rename from ext/opentelemetry-ext-aiohttp-client/setup.py
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.py
index 1b44425f06..fe74e23235 100644
--- a/ext/opentelemetry-ext-aiohttp-client/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.py
@@ -17,7 +17,12 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "aiohttp_client", "version.py"
+ BASE_DIR,
+ "src",
+ "opentelemetry",
+ "instrumentation",
+ "aiohttp_client",
+ "version.py",
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
diff --git a/ext/opentelemetry-ext-aiohttp-client/src/opentelemetry/ext/aiohttp_client/__init__.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py
similarity index 95%
rename from ext/opentelemetry-ext-aiohttp-client/src/opentelemetry/ext/aiohttp_client/__init__.py
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py
index a05e7c0601..2d9b8bd7a5 100644
--- a/ext/opentelemetry-ext-aiohttp-client/src/opentelemetry/ext/aiohttp_client/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py
@@ -13,8 +13,8 @@
# limitations under the License.
"""
-The opentelemetry-ext-aiohttp-client package allows tracing HTTP requests
-made by the aiohttp client library.
+The opentelemetry-instrumentation-aiohttp-client package allows tracing HTTP
+requests made by the aiohttp client library.
Usage
-----
@@ -22,7 +22,7 @@
.. code:: python
import aiohttp
- from opentelemetry.ext.aiohttp_client import (
+ from opentelemetry.instrumentation.aiohttp_client import (
create_trace_config,
url_path_span_name
)
@@ -51,7 +51,7 @@ def strip_query_params(url: yarl.URL) -> str:
from opentelemetry import context as context_api
from opentelemetry import propagators, trace
-from opentelemetry.ext.aiohttp_client.version import __version__
+from opentelemetry.instrumentation.aiohttp_client.version import __version__
from opentelemetry.instrumentation.utils import http_status_to_canonical_code
from opentelemetry.trace import SpanKind
from opentelemetry.trace.status import Status, StatusCanonicalCode
@@ -92,7 +92,7 @@ def create_trace_config(
.. code:: python
import aiohttp
- from opentelemetry.ext.aiohttp_client import create_trace_config
+ from opentelemetry.instrumentation.aiohttp_client import create_trace_config
async with aiohttp.ClientSession(trace_configs=[create_trace_config()]) as session:
async with session.get(url) as response:
diff --git a/ext/opentelemetry-ext-aiohttp-client/src/opentelemetry/ext/aiohttp_client/version.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py
similarity index 100%
rename from ext/opentelemetry-ext-aiohttp-client/src/opentelemetry/ext/aiohttp_client/version.py
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py
diff --git a/ext/opentelemetry-ext-aiohttp-client/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-aiohttp-client/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/__init__.py
diff --git a/ext/opentelemetry-ext-aiohttp-client/tests/test_aiohttp_client_integration.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
similarity index 93%
rename from ext/opentelemetry-ext-aiohttp-client/tests/test_aiohttp_client_integration.py
rename to instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
index 8db20c227e..f44e3df2da 100644
--- a/ext/opentelemetry-ext-aiohttp-client/tests/test_aiohttp_client_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
@@ -22,7 +22,7 @@
import aiohttp.test_utils
import yarl
-import opentelemetry.ext.aiohttp_client
+import opentelemetry.instrumentation.aiohttp_client
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace.status import StatusCanonicalCode
@@ -53,7 +53,7 @@ def test_url_path_span_name(self):
):
with self.subTest(url=url):
params = aiohttp.TraceRequestStartParams("METHOD", url, {})
- actual = opentelemetry.ext.aiohttp_client.url_path_span_name(
+ actual = opentelemetry.instrumentation.aiohttp_client.url_path_span_name(
params
)
self.assertEqual(actual, expected)
@@ -110,7 +110,7 @@ def test_status_codes(self):
):
with self.subTest(status_code=status_code):
host, port = self._http_request(
- trace_config=opentelemetry.ext.aiohttp_client.create_trace_config(),
+ trace_config=opentelemetry.instrumentation.aiohttp_client.create_trace_config(),
url="/test-path?query=param#foobar",
status_code=status_code,
)
@@ -149,7 +149,7 @@ def test_span_name_option(self):
):
with self.subTest(span_name=span_name, method=method, path=path):
host, port = self._http_request(
- trace_config=opentelemetry.ext.aiohttp_client.create_trace_config(
+ trace_config=opentelemetry.instrumentation.aiohttp_client.create_trace_config(
span_name=span_name
),
method=method,
@@ -182,7 +182,7 @@ def strip_query_params(url: yarl.URL) -> str:
return str(url.with_query(None))
host, port = self._http_request(
- trace_config=opentelemetry.ext.aiohttp_client.create_trace_config(
+ trace_config=opentelemetry.instrumentation.aiohttp_client.create_trace_config(
url_filter=strip_query_params
),
url="/some/path?query=param&other=param2",
@@ -209,7 +209,7 @@ def strip_query_params(url: yarl.URL) -> str:
def test_connection_errors(self):
trace_configs = [
- opentelemetry.ext.aiohttp_client.create_trace_config()
+ opentelemetry.instrumentation.aiohttp_client.create_trace_config()
]
for url, expected_status in (
@@ -251,7 +251,7 @@ async def request_handler(request):
return aiohttp.web.Response()
host, port = self._http_request(
- trace_config=opentelemetry.ext.aiohttp_client.create_trace_config(),
+ trace_config=opentelemetry.instrumentation.aiohttp_client.create_trace_config(),
url="/test_timeout",
request_handler=request_handler,
timeout=aiohttp.ClientTimeout(sock_read=0.01),
@@ -281,7 +281,7 @@ async def request_handler(request):
raise aiohttp.web.HTTPFound(location=location)
host, port = self._http_request(
- trace_config=opentelemetry.ext.aiohttp_client.create_trace_config(),
+ trace_config=opentelemetry.instrumentation.aiohttp_client.create_trace_config(),
url="/test_too_many_redirects",
request_handler=request_handler,
max_redirects=2,
diff --git a/ext/opentelemetry-instrumentation-aiopg/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-aiopg/CHANGELOG.md
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-aiopg/CHANGELOG.md
diff --git a/ext/opentelemetry-ext-django/LICENSE b/instrumentation/opentelemetry-instrumentation-aiopg/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-django/LICENSE
rename to instrumentation/opentelemetry-instrumentation-aiopg/LICENSE
diff --git a/ext/opentelemetry-ext-django/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-aiopg/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-django/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-aiopg/MANIFEST.in
diff --git a/ext/opentelemetry-instrumentation-aiopg/README.rst b/instrumentation/opentelemetry-instrumentation-aiopg/README.rst
similarity index 75%
rename from ext/opentelemetry-instrumentation-aiopg/README.rst
rename to instrumentation/opentelemetry-instrumentation-aiopg/README.rst
index 0e9248ec1d..f7a66579df 100644
--- a/ext/opentelemetry-instrumentation-aiopg/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-aiopg/README.rst
@@ -17,5 +17,5 @@ Installation
References
----------
-* `OpenTelemetry aiopg instrumentation `_
+* `OpenTelemetry aiopg Instrumentation `_
* `OpenTelemetry Project `_
diff --git a/ext/opentelemetry-instrumentation-aiopg/setup.cfg b/instrumentation/opentelemetry-instrumentation-aiopg/setup.cfg
similarity index 94%
rename from ext/opentelemetry-instrumentation-aiopg/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-aiopg/setup.cfg
index f2428301b5..bd9a06c524 100644
--- a/ext/opentelemetry-instrumentation-aiopg/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-aiopg/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-instrumentaation-aiopg
+name = opentelemetry-instrumentation-aiopg
description = OpenTelemetry aiopg instrumentation
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-instrumentation-aiopg
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-aiopg
platforms = any
license = Apache-2.0
classifiers =
diff --git a/ext/opentelemetry-instrumentation-aiopg/setup.py b/instrumentation/opentelemetry-instrumentation-aiopg/setup.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/setup.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/setup.py
diff --git a/ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/__init__.py b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/__init__.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/__init__.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/__init__.py
diff --git a/ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py
diff --git a/ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi/version.py b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
similarity index 100%
rename from ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi/version.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
diff --git a/ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py
diff --git a/ext/opentelemetry-ext-asgi/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-aiopg/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-asgi/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/tests/__init__.py
diff --git a/ext/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py b/instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py
rename to instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py
diff --git a/ext/opentelemetry-ext-asgi/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-asgi/CHANGELOG.md
similarity index 53%
rename from ext/opentelemetry-ext-asgi/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-asgi/CHANGELOG.md
index 886cbff8f1..7f2812bd05 100644
--- a/ext/opentelemetry-ext-asgi/CHANGELOG.md
+++ b/instrumentation/opentelemetry-instrumentation-asgi/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- Change package name to opentelemetry-instrumentation-asgi
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
+
## 0.8b0
Released 2020-05-27
diff --git a/ext/opentelemetry-ext-asgi/README.rst b/instrumentation/opentelemetry-instrumentation-asgi/README.rst
similarity index 74%
rename from ext/opentelemetry-ext-asgi/README.rst
rename to instrumentation/opentelemetry-instrumentation-asgi/README.rst
index bc286e5c8b..f2b760976a 100644
--- a/ext/opentelemetry-ext-asgi/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-asgi/README.rst
@@ -3,8 +3,8 @@ OpenTelemetry ASGI Middleware
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-asgi.svg
- :target: https://pypi.org/project/opentelemetry-ext-asgi/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-asgi.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-asgi/
This library provides a ASGI middleware that can be used on any ASGI framework
@@ -15,7 +15,7 @@ Installation
::
- pip install opentelemetry-ext-asgi
+ pip install opentelemetry-instrumentation-asgi
Usage (Quart)
@@ -24,7 +24,7 @@ Usage (Quart)
.. code-block:: python
from quart import Quart
- from opentelemetry.ext.asgi import OpenTelemetryMiddleware
+ from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware
app = Quart(__name__)
app.asgi_app = OpenTelemetryMiddleware(app.asgi_app)
@@ -46,7 +46,7 @@ Modify the application's ``asgi.py`` file as shown below.
import os
from django.core.asgi import get_asgi_application
- from opentelemetry.ext.asgi import OpenTelemetryMiddleware
+ from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'asgi_example.settings')
diff --git a/ext/opentelemetry-ext-asgi/setup.cfg b/instrumentation/opentelemetry-instrumentation-asgi/setup.cfg
similarity index 87%
rename from ext/opentelemetry-ext-asgi/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-asgi/setup.cfg
index 175e264995..fdd1f813fb 100644
--- a/ext/opentelemetry-ext-asgi/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-asgi/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-asgi
-description = ASGI Middleware for OpenTelemetry
+name = opentelemetry-instrumentation-asgi
+description = ASGI instrumentation for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/ext/opentelemetry-ext-asgi
+url = https://github.com/open-telemetry/opentelemetry-python/instrumentation/opentelemetry-instrumentation-asgi
platforms = any
license = Apache-2.0
classifiers =
diff --git a/ext/opentelemetry-ext-asgi/setup.py b/instrumentation/opentelemetry-instrumentation-asgi/setup.py
similarity index 91%
rename from ext/opentelemetry-ext-asgi/setup.py
rename to instrumentation/opentelemetry-instrumentation-asgi/setup.py
index 8bf19bd422..3369352fe1 100644
--- a/ext/opentelemetry-ext-asgi/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/setup.py
@@ -17,7 +17,7 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "asgi", "version.py"
+ BASE_DIR, "src", "opentelemetry", "instrumentation", "asgi", "version.py"
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
diff --git a/ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
similarity index 97%
rename from ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi/__init__.py
rename to instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
index 43b8804c24..02aabfea95 100644
--- a/ext/opentelemetry-ext-asgi/src/opentelemetry/ext/asgi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
@@ -13,7 +13,7 @@
# limitations under the License.
"""
-The opentelemetry-ext-asgi package provides an ASGI middleware that can be used
+The opentelemetry-instrumentation-asgi package provides an ASGI middleware that can be used
on any ASGI framework (such as Django-channels / Quart) to track requests
timing through OpenTelemetry.
"""
@@ -27,7 +27,7 @@
from asgiref.compatibility import guarantee_single_callable
from opentelemetry import context, propagators, trace
-from opentelemetry.ext.asgi.version import __version__ # noqa
+from opentelemetry.instrumentation.asgi.version import __version__ # noqa
from opentelemetry.instrumentation.utils import http_status_to_canonical_code
from opentelemetry.trace.status import Status, StatusCanonicalCode
diff --git a/ext/opentelemetry-ext-django/src/opentelemetry/ext/django/version.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py
similarity index 100%
rename from ext/opentelemetry-ext-django/src/opentelemetry/ext/django/version.py
rename to instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py
diff --git a/ext/opentelemetry-ext-django/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-django/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-asgi/tests/__init__.py
diff --git a/ext/opentelemetry-ext-asgi/tests/test_asgi_middleware.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
similarity index 99%
rename from ext/opentelemetry-ext-asgi/tests/test_asgi_middleware.py
rename to instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
index 05aa84b3c4..f994e25966 100644
--- a/ext/opentelemetry-ext-asgi/tests/test_asgi_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
@@ -16,7 +16,7 @@
import unittest
import unittest.mock as mock
-import opentelemetry.ext.asgi as otel_asgi
+import opentelemetry.instrumentation.asgi as otel_asgi
from opentelemetry import trace as trace_api
from opentelemetry.test.asgitestutil import (
AsgiTestBase,
diff --git a/ext/opentelemetry-ext-django/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-django/CHANGELOG.md
similarity index 81%
rename from ext/opentelemetry-ext-django/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-django/CHANGELOG.md
index 0328ccaa20..ae682630db 100644
--- a/ext/opentelemetry-ext-django/CHANGELOG.md
+++ b/instrumentation/opentelemetry-instrumentation-django/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+- Change package name to opentelemetry-instrumentation-django
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
- Update environment variable names, prefix changed from `OPENTELEMETRY` to `OTEL` ([#904](https://github.com/open-telemetry/opentelemetry-python/pull/904))
## Version 0.11b0
diff --git a/ext/opentelemetry-ext-flask/LICENSE b/instrumentation/opentelemetry-instrumentation-django/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-flask/LICENSE
rename to instrumentation/opentelemetry-instrumentation-django/LICENSE
diff --git a/ext/opentelemetry-ext-flask/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-django/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-flask/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-django/MANIFEST.in
diff --git a/ext/opentelemetry-ext-django/README.rst b/instrumentation/opentelemetry-instrumentation-django/README.rst
similarity index 67%
rename from ext/opentelemetry-ext-django/README.rst
rename to instrumentation/opentelemetry-instrumentation-django/README.rst
index b7a822f197..5cb570c7e9 100644
--- a/ext/opentelemetry-ext-django/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-django/README.rst
@@ -3,8 +3,8 @@ OpenTelemetry Django Tracing
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-django.svg
- :target: https://pypi.org/project/opentelemetry-ext-django/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-django.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-django/
This library allows tracing requests for Django applications.
@@ -13,7 +13,7 @@ Installation
::
- pip install opentelemetry-ext-django
+ pip install opentelemetry-instrumentation-django
Configuration
-------------
@@ -34,5 +34,5 @@ References
----------
* `Django `_
-* `OpenTelemetry Django Tracing `_
+* `OpenTelemetry Instrumentation for Django `_
* `OpenTelemetry Project `_
diff --git a/ext/opentelemetry-ext-django/setup.cfg b/instrumentation/opentelemetry-instrumentation-django/setup.cfg
similarity index 88%
rename from ext/opentelemetry-ext-django/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-django/setup.cfg
index 602a2cf7ba..b2ccaf22b8 100644
--- a/ext/opentelemetry-ext-django/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-django/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-django
+name = opentelemetry-instrumentation-django
description = OpenTelemetry Instrumentation for Django
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-ext-django
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-django
platforms = any
license = Apache-2.0
classifiers =
@@ -41,7 +41,7 @@ package_dir=
packages=find_namespace:
install_requires =
django >= 1.10
- opentelemetry-ext-wsgi == 0.12.dev0
+ opentelemetry-instrumentation-wsgi == 0.12.dev0
opentelemetry-instrumentation == 0.12.dev0
opentelemetry-api == 0.12.dev0
@@ -54,4 +54,4 @@ where = src
[options.entry_points]
opentelemetry_instrumentor =
- django = opentelemetry.ext.django:DjangoInstrumentor
+ django = opentelemetry.instrumentation.django:DjangoInstrumentor
diff --git a/ext/opentelemetry-ext-django/setup.py b/instrumentation/opentelemetry-instrumentation-django/setup.py
similarity index 97%
rename from ext/opentelemetry-ext-django/setup.py
rename to instrumentation/opentelemetry-instrumentation-django/setup.py
index 45cc68c0f4..fb9d615ce3 100644
--- a/ext/opentelemetry-ext-django/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-django/setup.py
@@ -22,7 +22,7 @@
dirname(__file__),
"src",
"opentelemetry",
- "ext",
+ "instrumentation",
"django",
"version.py",
)
diff --git a/ext/opentelemetry-ext-django/src/opentelemetry/ext/django/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
similarity index 97%
rename from ext/opentelemetry-ext-django/src/opentelemetry/ext/django/__init__.py
rename to instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
index 3eb3b2dd72..e0992e9a30 100644
--- a/ext/opentelemetry-ext-django/src/opentelemetry/ext/django/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
@@ -17,7 +17,7 @@
from django.conf import settings
from opentelemetry.configuration import Configuration
-from opentelemetry.ext.django.middleware import _DjangoMiddleware
+from opentelemetry.instrumentation.django.middleware import _DjangoMiddleware
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
_logger = getLogger(__name__)
diff --git a/ext/opentelemetry-ext-django/src/opentelemetry/ext/django/middleware.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware.py
similarity index 97%
rename from ext/opentelemetry-ext-django/src/opentelemetry/ext/django/middleware.py
rename to instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware.py
index c0cb244756..2c155b1be1 100644
--- a/ext/opentelemetry-ext-django/src/opentelemetry/ext/django/middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware.py
@@ -16,8 +16,8 @@
from opentelemetry.configuration import Configuration
from opentelemetry.context import attach, detach
-from opentelemetry.ext.django.version import __version__
-from opentelemetry.ext.wsgi import (
+from opentelemetry.instrumentation.django.version import __version__
+from opentelemetry.instrumentation.wsgi import (
add_response_attributes,
collect_request_attributes,
get_header_from_environ,
diff --git a/ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/version.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py
similarity index 100%
rename from ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/version.py
rename to instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py
diff --git a/ext/opentelemetry-ext-flask/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-django/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-flask/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-django/tests/__init__.py
diff --git a/ext/opentelemetry-ext-django/tests/conftest.py b/instrumentation/opentelemetry-instrumentation-django/tests/conftest.py
similarity index 100%
rename from ext/opentelemetry-ext-django/tests/conftest.py
rename to instrumentation/opentelemetry-instrumentation-django/tests/conftest.py
diff --git a/ext/opentelemetry-ext-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
similarity index 96%
rename from ext/opentelemetry-ext-django/tests/test_middleware.py
rename to instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
index e5c3e10d03..3250ac0c1c 100644
--- a/ext/opentelemetry-ext-django/tests/test_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
@@ -21,7 +21,7 @@
from django.test.utils import setup_test_environment, teardown_test_environment
from opentelemetry.configuration import Configuration
-from opentelemetry.ext.django import DjangoInstrumentor
+from opentelemetry.instrumentation.django import DjangoInstrumentor
from opentelemetry.test.wsgitestutil import WsgiTestBase
from opentelemetry.trace import SpanKind
from opentelemetry.trace.status import StatusCanonicalCode
@@ -116,7 +116,7 @@ def test_error(self):
self.assertEqual(span.attributes["http.scheme"], "http")
@patch(
- "opentelemetry.ext.django.middleware._DjangoMiddleware._excluded_urls",
+ "opentelemetry.instrumentation.django.middleware._DjangoMiddleware._excluded_urls",
ExcludeList(["http://testserver/excluded_arg/123", "excluded_noarg"]),
)
def test_exclude_lists(self):
diff --git a/ext/opentelemetry-ext-django/tests/views.py b/instrumentation/opentelemetry-instrumentation-django/tests/views.py
similarity index 100%
rename from ext/opentelemetry-ext-django/tests/views.py
rename to instrumentation/opentelemetry-instrumentation-django/tests/views.py
diff --git a/ext/opentelemetry-instrumentation-fastapi/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-fastapi/CHANGELOG.md
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-fastapi/CHANGELOG.md
diff --git a/ext/opentelemetry-instrumentation-fastapi/README.rst b/instrumentation/opentelemetry-instrumentation-fastapi/README.rst
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/README.rst
rename to instrumentation/opentelemetry-instrumentation-fastapi/README.rst
diff --git a/ext/opentelemetry-instrumentation-fastapi/setup.cfg b/instrumentation/opentelemetry-instrumentation-fastapi/setup.cfg
similarity index 93%
rename from ext/opentelemetry-instrumentation-fastapi/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-fastapi/setup.cfg
index b700b3d724..f4c64744f8 100644
--- a/ext/opentelemetry-instrumentation-fastapi/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/setup.cfg
@@ -19,7 +19,7 @@ long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-instrumentation-fastapi
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-fastapi
platforms = any
license = Apache-2.0
classifiers =
@@ -39,7 +39,7 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api == 0.12.dev0
- opentelemetry-ext-asgi == 0.12.dev0
+ opentelemetry-instrumentation-asgi == 0.12.dev0
[options.entry_points]
opentelemetry_instrumentor =
diff --git a/ext/opentelemetry-instrumentation-fastapi/setup.py b/instrumentation/opentelemetry-instrumentation-fastapi/setup.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/setup.py
rename to instrumentation/opentelemetry-instrumentation-fastapi/setup.py
diff --git a/ext/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
similarity index 97%
rename from ext/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
rename to instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
index 65d608393d..57c9a5bfc7 100644
--- a/ext/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
@@ -16,7 +16,7 @@
import fastapi
from starlette.routing import Match
-from opentelemetry.ext.asgi import OpenTelemetryMiddleware
+from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware
from opentelemetry.instrumentation.fastapi.version import __version__ # noqa
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
diff --git a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/version.py b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/version.py
rename to instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
diff --git a/ext/opentelemetry-ext-pyramid/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-fastapi/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-fastapi/tests/__init__.py
diff --git a/ext/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
rename to instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
diff --git a/ext/opentelemetry-ext-flask/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-flask/CHANGELOG.md
similarity index 85%
rename from ext/opentelemetry-ext-flask/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-flask/CHANGELOG.md
index 334084c149..156cf9db31 100644
--- a/ext/opentelemetry-ext-flask/CHANGELOG.md
+++ b/instrumentation/opentelemetry-instrumentation-flask/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+- Change package name to opentelemetry-instrumentation-flask
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
- Update environment variable names, prefix changed from `OPENTELEMETRY` to `OTEL` ([#904](https://github.com/open-telemetry/opentelemetry-python/pull/904))
## Version 0.11b0
diff --git a/ext/opentelemetry-ext-pyramid/LICENSE b/instrumentation/opentelemetry-instrumentation-flask/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/LICENSE
rename to instrumentation/opentelemetry-instrumentation-flask/LICENSE
diff --git a/ext/opentelemetry-ext-pyramid/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-flask/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-flask/MANIFEST.in
diff --git a/ext/opentelemetry-ext-flask/README.rst b/instrumentation/opentelemetry-instrumentation-flask/README.rst
similarity index 67%
rename from ext/opentelemetry-ext-flask/README.rst
rename to instrumentation/opentelemetry-instrumentation-flask/README.rst
index a75a0cfbaa..f79d8fd604 100644
--- a/ext/opentelemetry-ext-flask/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-flask/README.rst
@@ -3,8 +3,8 @@ OpenTelemetry Flask Tracing
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-flask.svg
- :target: https://pypi.org/project/opentelemetry-ext-flask/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-flask.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-flask/
This library builds on the OpenTelemetry WSGI middleware to track web requests
in Flask applications.
@@ -14,7 +14,7 @@ Installation
::
- pip install opentelemetry-ext-flask
+ pip install opentelemetry-instrumentation-flask
Configuration
-------------
@@ -34,5 +34,5 @@ will exclude requests such as ``https://site/client/123/info`` and ``https://sit
References
----------
-* `OpenTelemetry Flask Tracing `_
+* `OpenTelemetry Flask Instrumentation `_
* `OpenTelemetry Project `_
diff --git a/ext/opentelemetry-ext-flask/setup.cfg b/instrumentation/opentelemetry-instrumentation-flask/setup.cfg
similarity index 88%
rename from ext/opentelemetry-ext-flask/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-flask/setup.cfg
index e4b978645b..281a11249d 100644
--- a/ext/opentelemetry-ext-flask/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-flask/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-flask
-description = Flask tracing for OpenTelemetry (based on opentelemetry-ext-wsgi)
+name = opentelemetry-instrumentation-flask
+description = Flask instrumentation for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-ext-flask
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-flask
platforms = any
license = Apache-2.0
classifiers =
@@ -41,7 +41,7 @@ package_dir=
packages=find_namespace:
install_requires =
flask ~= 1.0
- opentelemetry-ext-wsgi == 0.12.dev0
+ opentelemetry-instrumentation-wsgi == 0.12.dev0
opentelemetry-instrumentation == 0.12.dev0
opentelemetry-api == 0.12.dev0
diff --git a/ext/opentelemetry-ext-flask/setup.py b/instrumentation/opentelemetry-instrumentation-flask/setup.py
similarity index 85%
rename from ext/opentelemetry-ext-flask/setup.py
rename to instrumentation/opentelemetry-instrumentation-flask/setup.py
index 84b33c23b2..587b697a7b 100644
--- a/ext/opentelemetry-ext-flask/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/setup.py
@@ -17,7 +17,7 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "flask", "version.py"
+ BASE_DIR, "src", "opentelemetry", "instrumentation", "flask", "version.py"
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
@@ -27,7 +27,7 @@
version=PACKAGE_INFO["__version__"],
entry_points={
"opentelemetry_instrumentor": [
- "flask = opentelemetry.ext.flask:FlaskInstrumentor"
+ "flask = opentelemetry.instrumentation.flask:FlaskInstrumentor"
]
},
)
diff --git a/ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
similarity index 95%
rename from ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/__init__.py
rename to instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
index 464958a7e9..d1936b1cd3 100644
--- a/ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
@@ -17,7 +17,7 @@
"""
This library builds on the OpenTelemetry WSGI middleware to track web requests
-in Flask applications. In addition to opentelemetry-ext-wsgi, it supports
+in Flask applications. In addition to opentelemetry-instrumentation-wsgi, it supports
flask-specific features such as:
* The Flask endpoint name is used as the Span name.
@@ -30,7 +30,7 @@
.. code-block:: python
from flask import Flask
- from opentelemetry.ext.flask import FlaskInstrumentor
+ from opentelemetry.instrumentation.flask import FlaskInstrumentor
app = Flask(__name__)
@@ -51,9 +51,9 @@ def hello():
import flask
-import opentelemetry.ext.wsgi as otel_wsgi
+import opentelemetry.instrumentation.wsgi as otel_wsgi
from opentelemetry import configuration, context, propagators, trace
-from opentelemetry.ext.flask.version import __version__
+from opentelemetry.instrumentation.flask.version import __version__
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.util import ExcludeList, time_ns
diff --git a/ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/version.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py
similarity index 100%
rename from ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/version.py
rename to instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py
diff --git a/ext/opentelemetry-ext-requests/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-requests/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-flask/tests/__init__.py
diff --git a/ext/opentelemetry-ext-flask/tests/base_test.py b/instrumentation/opentelemetry-instrumentation-flask/tests/base_test.py
similarity index 100%
rename from ext/opentelemetry-ext-flask/tests/base_test.py
rename to instrumentation/opentelemetry-instrumentation-flask/tests/base_test.py
diff --git a/ext/opentelemetry-ext-flask/tests/test_automatic.py b/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py
similarity index 96%
rename from ext/opentelemetry-ext-flask/tests/test_automatic.py
rename to instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py
index b94c7b33d6..d081bed9ee 100644
--- a/ext/opentelemetry-ext-flask/tests/test_automatic.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/tests/test_automatic.py
@@ -16,7 +16,7 @@
from werkzeug.test import Client
from werkzeug.wrappers import BaseResponse
-from opentelemetry.ext.flask import FlaskInstrumentor
+from opentelemetry.instrumentation.flask import FlaskInstrumentor
from opentelemetry.test.test_base import TestBase
from opentelemetry.test.wsgitestutil import WsgiTestBase
diff --git a/ext/opentelemetry-ext-flask/tests/test_programmatic.py b/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py
similarity index 97%
rename from ext/opentelemetry-ext-flask/tests/test_programmatic.py
rename to instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py
index 3a15979cb4..181f4e1e61 100644
--- a/ext/opentelemetry-ext-flask/tests/test_programmatic.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py
@@ -17,7 +17,7 @@
from flask import Flask, request
from opentelemetry import trace
-from opentelemetry.ext.flask import FlaskInstrumentor
+from opentelemetry.instrumentation.flask import FlaskInstrumentor
from opentelemetry.test.test_base import TestBase
from opentelemetry.test.wsgitestutil import WsgiTestBase
from opentelemetry.util import ExcludeList
@@ -144,7 +144,7 @@ def test_internal_error(self):
self.assertEqual(span_list[0].attributes, expected_attrs)
@patch(
- "opentelemetry.ext.flask._excluded_urls",
+ "opentelemetry.instrumentation.flask._excluded_urls",
ExcludeList(["http://localhost/excluded_arg/123", "excluded_noarg"]),
)
def test_exclude_lists(self):
diff --git a/ext/opentelemetry-ext-pyramid/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-pyramid/CHANGELOG.md
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-pyramid/CHANGELOG.md
diff --git a/ext/opentelemetry-ext-requests/LICENSE b/instrumentation/opentelemetry-instrumentation-pyramid/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-requests/LICENSE
rename to instrumentation/opentelemetry-instrumentation-pyramid/LICENSE
diff --git a/ext/opentelemetry-ext-requests/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-pyramid/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-requests/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-pyramid/MANIFEST.in
diff --git a/ext/opentelemetry-ext-pyramid/README.rst b/instrumentation/opentelemetry-instrumentation-pyramid/README.rst
similarity index 54%
rename from ext/opentelemetry-ext-pyramid/README.rst
rename to instrumentation/opentelemetry-instrumentation-pyramid/README.rst
index 6ec38b83c9..931486773a 100644
--- a/ext/opentelemetry-ext-pyramid/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/README.rst
@@ -1,17 +1,17 @@
-OpenTelemetry Pyramid Integration
-=================================
+OpenTelemetry Pyramid Instrumentation
+=====================================
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-pyramid.svg
- :target: https://pypi.org/project/opentelemetry-ext-pyramid/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-pyramid.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-pyramid/
Installation
------------
::
- pip install opentelemetry-ext-pyramid
+ pip install opentelemetry-instrumentation-pyramid
Exclude lists
*************
@@ -27,6 +27,6 @@ will exclude requests such as ``https://site/client/123/info`` and ``https://sit
References
----------
-* `OpenTelemetry Pyramid Integration `_
+* `OpenTelemetry Pyramid Instrumentation `_
* `OpenTelemetry Project `_
diff --git a/ext/opentelemetry-ext-pyramid/setup.cfg b/instrumentation/opentelemetry-instrumentation-pyramid/setup.cfg
similarity index 85%
rename from ext/opentelemetry-ext-pyramid/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-pyramid/setup.cfg
index 21a4910ac4..7f23f27ca5 100644
--- a/ext/opentelemetry-ext-pyramid/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-pyramid
-description = OpenTelemetry Pyramid integration
+name = opentelemetry-instrumentation-pyramid
+description = OpenTelemetry Pyramid instrumentation
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-ext-pyramid
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-pyramid
platforms = any
license = Apache-2.0
classifiers =
@@ -43,7 +43,7 @@ install_requires =
pyramid >= 1.7
opentelemetry-instrumentation == 0.12.dev0
opentelemetry-api == 0.12.dev0
- opentelemetry-ext-wsgi == 0.12.dev0
+ opentelemetry-instrumentation-wsgi == 0.12.dev0
wrapt >= 1.0.0, < 2.0.0
[options.extras_require]
@@ -56,4 +56,4 @@ where = src
[options.entry_points]
opentelemetry_instrumentor =
- pyramid = opentelemetry.ext.pyramid:PyramidInstrumentor
+ pyramid = opentelemetry.instrumentation.pyramid:PyramidInstrumentor
diff --git a/ext/opentelemetry-ext-wsgi/setup.py b/instrumentation/opentelemetry-instrumentation-pyramid/setup.py
similarity index 89%
rename from ext/opentelemetry-ext-wsgi/setup.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/setup.py
index 886800eacf..7141a89813 100644
--- a/ext/opentelemetry-ext-wsgi/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/setup.py
@@ -17,7 +17,12 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "wsgi", "version.py"
+ BASE_DIR,
+ "src",
+ "opentelemetry",
+ "instrumentation",
+ "pyramid",
+ "version.py",
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
diff --git a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/__init__.py
similarity index 85%
rename from ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/__init__.py
index c3db25ee7c..4125453153 100644
--- a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/__init__.py
@@ -28,7 +28,7 @@
.. code:: python
from pyramid.config import Configurator
- from opentelemetry.ext.pyramid import PyramidInstrumentor
+ from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
PyramidInstrumentor().instrument()
@@ -43,7 +43,7 @@
.. code:: python
from pyramid.config import Configurator
- from opentelemetry.ext.pyramid import PyramidInstrumentor
+ from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
config = Configurator()
PyramidInstrumentor().instrument_config(config)
@@ -55,7 +55,7 @@
---------------------------------
If you use Method 2 and then set tweens for your application with the ``pyramid.tweens`` setting,
-you need to add ``opentelemetry.ext.pyramid.trace_tween_factory`` explicity to the list,
+you need to add ``opentelemetry.instrumentation.pyramid.trace_tween_factory`` explicity to the list,
*as well as* instrumenting the config as shown above.
For example:
@@ -63,10 +63,10 @@
.. code:: python
from pyramid.config import Configurator
- from opentelemetry.ext.pyramid import PyramidInstrumentor
+ from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
settings = {
- 'pyramid.tweens', 'opentelemetry.ext.pyramid.trace_tween_factory\\nyour_tween_no_1\\nyour_tween_no_2',
+ 'pyramid.tweens', 'opentelemetry.instrumentation.pyramid.trace_tween_factory\\nyour_tween_no_1\\nyour_tween_no_2',
}
config = Configurator(settings=settings)
PyramidInstrumentor().instrument_config(config)
@@ -86,13 +86,13 @@
from wrapt import ObjectProxy
from wrapt import wrap_function_wrapper as _wrap
-from opentelemetry.ext.pyramid.callbacks import (
+from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
+from opentelemetry.instrumentation.pyramid.callbacks import (
SETTING_TRACE_ENABLED,
TWEEN_NAME,
trace_tween_factory,
)
-from opentelemetry.ext.pyramid.version import __version__
-from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
+from opentelemetry.instrumentation.pyramid.version import __version__
from opentelemetry.instrumentation.utils import unwrap
from opentelemetry.trace import TracerProvider, get_tracer
@@ -121,7 +121,7 @@ def _traced_init(wrapped, instance, args, kwargs):
kwargs["package"] = caller_package(level=3)
wrapped(*args, **kwargs)
- instance.include("opentelemetry.ext.pyramid.callbacks")
+ instance.include("opentelemetry.instrumentation.pyramid.callbacks")
class PyramidInstrumentor(BaseInstrumentor):
@@ -142,7 +142,7 @@ def instrument_config(self, config):
Args:
config: The Configurator to instrument.
"""
- config.include("opentelemetry.ext.pyramid.callbacks")
+ config.include("opentelemetry.instrumentation.pyramid.callbacks")
def uninstrument_config(self, config):
config.add_settings({SETTING_TRACE_ENABLED: False})
diff --git a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/callbacks.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
similarity index 94%
rename from ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/callbacks.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
index 4d3b81fdab..fe45c39e2a 100644
--- a/ext/opentelemetry-ext-pyramid/src/opentelemetry/ext/pyramid/callbacks.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
@@ -5,12 +5,12 @@
from pyramid.settings import asbool
from pyramid.tweens import EXCVIEW
-import opentelemetry.ext.wsgi as otel_wsgi
+import opentelemetry.instrumentation.wsgi as otel_wsgi
from opentelemetry import configuration, context, propagators, trace
-from opentelemetry.ext.pyramid.version import __version__
+from opentelemetry.instrumentation.pyramid.version import __version__
from opentelemetry.util import ExcludeList, time_ns
-TWEEN_NAME = "opentelemetry.ext.pyramid.trace_tween_factory"
+TWEEN_NAME = "opentelemetry.instrumentation.pyramid.trace_tween_factory"
SETTING_TRACE_ENABLED = "opentelemetry-pyramid.trace_enabled"
_ENVIRON_STARTTIME_KEY = "opentelemetry-pyramid.starttime_key"
@@ -57,7 +57,7 @@ def _before_traversal(event):
enabled = environ.get(_ENVIRON_ENABLED_KEY)
if enabled is None:
_logger.warning(
- "Opentelemetry pyramid tween 'opentelemetry.ext.pyramid.trace_tween_factory'"
+ "Opentelemetry pyramid tween 'opentelemetry.instrumentation.pyramid.trace_tween_factory'"
"was not called. Make sure that the tween is included in 'pyramid.tweens' if"
"the tween list was created manually"
)
diff --git a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/version.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py
similarity index 100%
rename from ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/version.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py
diff --git a/ext/opentelemetry-ext-wsgi/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-pyramid/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-ext-wsgi/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/tests/__init__.py
diff --git a/ext/opentelemetry-ext-pyramid/tests/pyramid_base_test.py b/instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py
similarity index 100%
rename from ext/opentelemetry-ext-pyramid/tests/pyramid_base_test.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/tests/pyramid_base_test.py
diff --git a/ext/opentelemetry-ext-pyramid/tests/test_automatic.py b/instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
similarity index 97%
rename from ext/opentelemetry-ext-pyramid/tests/test_automatic.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
index d19da3c2b3..b065e26064 100644
--- a/ext/opentelemetry-ext-pyramid/tests/test_automatic.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/tests/test_automatic.py
@@ -14,7 +14,7 @@
from pyramid.config import Configurator
-from opentelemetry.ext.pyramid import PyramidInstrumentor
+from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
from opentelemetry.test.test_base import TestBase
from opentelemetry.test.wsgitestutil import WsgiTestBase
diff --git a/ext/opentelemetry-ext-pyramid/tests/test_programmatic.py b/instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
similarity index 94%
rename from ext/opentelemetry-ext-pyramid/tests/test_programmatic.py
rename to instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
index d086fc37eb..add4660caa 100644
--- a/ext/opentelemetry-ext-pyramid/tests/test_programmatic.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/tests/test_programmatic.py
@@ -17,7 +17,7 @@
from pyramid.config import Configurator
from opentelemetry import trace
-from opentelemetry.ext.pyramid import PyramidInstrumentor
+from opentelemetry.instrumentation.pyramid import PyramidInstrumentor
from opentelemetry.test.test_base import TestBase
from opentelemetry.test.wsgitestutil import WsgiTestBase
from opentelemetry.util import ExcludeList
@@ -125,7 +125,7 @@ def test_internal_error(self):
self.assertEqual(span_list[0].attributes, expected_attrs)
def test_tween_list(self):
- tween_list = "opentelemetry.ext.pyramid.trace_tween_factory\npyramid.tweens.excview_tween_factory"
+ tween_list = "opentelemetry.instrumentation.pyramid.trace_tween_factory\npyramid.tweens.excview_tween_factory"
config = Configurator(settings={"pyramid.tweens": tween_list})
PyramidInstrumentor().instrument_config(config)
self._common_initialization(config)
@@ -146,7 +146,7 @@ def test_tween_list(self):
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 1)
- @patch("opentelemetry.ext.pyramid.callbacks._logger")
+ @patch("opentelemetry.instrumentation.pyramid.callbacks._logger")
def test_warnings(self, mock_logger):
tween_list = "pyramid.tweens.excview_tween_factory"
config = Configurator(settings={"pyramid.tweens": tween_list})
@@ -160,7 +160,9 @@ def test_warnings(self, mock_logger):
mock_logger.warning.called = False
- tween_list = "opentelemetry.ext.pyramid.trace_tween_factory"
+ tween_list = (
+ "opentelemetry.instrumentation.pyramid.trace_tween_factory"
+ )
config = Configurator(settings={"pyramid.tweens": tween_list})
self._common_initialization(config)
@@ -170,7 +172,7 @@ def test_warnings(self, mock_logger):
self.assertEqual(mock_logger.warning.called, True)
@patch(
- "opentelemetry.ext.pyramid.callbacks._excluded_urls",
+ "opentelemetry.instrumentation.pyramid.callbacks._excluded_urls",
ExcludeList(["http://localhost/excluded_arg/123", "excluded_noarg"]),
)
def test_exclude_lists(self):
diff --git a/ext/opentelemetry-ext-requests/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-requests/CHANGELOG.md
similarity index 83%
rename from ext/opentelemetry-ext-requests/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-requests/CHANGELOG.md
index c7bb877431..dda179d918 100644
--- a/ext/opentelemetry-ext-requests/CHANGELOG.md
+++ b/instrumentation/opentelemetry-instrumentation-requests/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- Change package name to opentelemetry-instrumentation-requests
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
+
## 0.7b1
Released 2020-05-12
diff --git a/ext/opentelemetry-ext-wsgi/LICENSE b/instrumentation/opentelemetry-instrumentation-requests/LICENSE
similarity index 100%
rename from ext/opentelemetry-ext-wsgi/LICENSE
rename to instrumentation/opentelemetry-instrumentation-requests/LICENSE
diff --git a/ext/opentelemetry-ext-wsgi/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-requests/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-ext-wsgi/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-requests/MANIFEST.in
diff --git a/instrumentation/opentelemetry-instrumentation-requests/README.rst b/instrumentation/opentelemetry-instrumentation-requests/README.rst
new file mode 100644
index 0000000000..d4944d3526
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-requests/README.rst
@@ -0,0 +1,23 @@
+OpenTelemetry Requests Instrumentation
+======================================
+
+|pypi|
+
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-requests.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-requests/
+
+This library allows tracing HTTP requests made by the
+`requests `_ library.
+
+Installation
+------------
+
+::
+
+ pip install opentelemetry-instrumentation-requests
+
+References
+----------
+
+* `OpenTelemetry requests Instrumentation `_
+* `OpenTelemetry Project `_
diff --git a/ext/opentelemetry-ext-requests/setup.cfg b/instrumentation/opentelemetry-instrumentation-requests/setup.cfg
similarity index 87%
rename from ext/opentelemetry-ext-requests/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-requests/setup.cfg
index 52d6f96739..77205b5816 100644
--- a/ext/opentelemetry-ext-requests/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-requests/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-requests
-description = OpenTelemetry requests integration
+name = opentelemetry-instrumentation-requests
+description = OpenTelemetry requests instrumentation
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-ext-requests
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-requests
platforms = any
license = Apache-2.0
classifiers =
@@ -54,4 +54,4 @@ where = src
[options.entry_points]
opentelemetry_instrumentor =
- requests = opentelemetry.ext.requests:RequestsInstrumentor
+ requests = opentelemetry.instrumentation.requests:RequestsInstrumentor
diff --git a/ext/opentelemetry-ext-requests/setup.py b/instrumentation/opentelemetry-instrumentation-requests/setup.py
similarity index 88%
rename from ext/opentelemetry-ext-requests/setup.py
rename to instrumentation/opentelemetry-instrumentation-requests/setup.py
index a71a8d44b5..237fef583b 100644
--- a/ext/opentelemetry-ext-requests/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-requests/setup.py
@@ -17,7 +17,12 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "requests", "version.py"
+ BASE_DIR,
+ "src",
+ "opentelemetry",
+ "instrumentation",
+ "requests",
+ "version.py",
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
diff --git a/ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
similarity index 97%
rename from ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
index a4db0591c8..a12f05999e 100644
--- a/ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
@@ -22,11 +22,11 @@
.. code-block:: python
import requests
- import opentelemetry.ext.requests
+ import opentelemetry.instrumentation.requests
# You can optionally pass a custom TracerProvider to
RequestInstrumentor.instrument()
- opentelemetry.ext.requests.RequestsInstrumentor().instrument()
+ opentelemetry.instrumentation.requests.RequestsInstrumentor().instrument()
response = requests.get(url="https://www.example.org/")
Limitations
@@ -51,8 +51,8 @@
from requests.sessions import Session
from opentelemetry import context, propagators
-from opentelemetry.ext.requests.version import __version__
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
+from opentelemetry.instrumentation.requests.version import __version__
from opentelemetry.instrumentation.utils import http_status_to_canonical_code
from opentelemetry.trace import SpanKind, get_tracer
from opentelemetry.trace.status import Status, StatusCanonicalCode
diff --git a/ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
rename to instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py
diff --git a/ext/opentelemetry-instrumentation-aiopg/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-requests/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-requests/tests/__init__.py
diff --git a/ext/opentelemetry-ext-requests/tests/test_requests_integration.py b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py
similarity index 97%
rename from ext/opentelemetry-ext-requests/tests/test_requests_integration.py
rename to instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py
index 75a63f3cf8..afec0a88d0 100644
--- a/ext/opentelemetry-ext-requests/tests/test_requests_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py
@@ -17,9 +17,9 @@
import httpretty
import requests
-import opentelemetry.ext.requests
+import opentelemetry.instrumentation.requests
from opentelemetry import context, propagators, trace
-from opentelemetry.ext.requests import RequestsInstrumentor
+from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.sdk import resources
from opentelemetry.test.mock_httptextformat import MockHTTPTextFormat
from opentelemetry.test.test_base import TestBase
@@ -68,7 +68,9 @@ def test_basic(self):
span.status.canonical_code, trace.status.StatusCanonicalCode.OK
)
- self.check_span_instrumentation_info(span, opentelemetry.ext.requests)
+ self.check_span_instrumentation_info(
+ span, opentelemetry.instrumentation.requests
+ )
def test_not_foundbasic(self):
url_404 = "http://httpbin.org/status/404"
diff --git a/ext/opentelemetry-instrumentation-starlette/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-starlette/CHANGELOG.md
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-starlette/CHANGELOG.md
diff --git a/ext/opentelemetry-instrumentation-starlette/README.rst b/instrumentation/opentelemetry-instrumentation-starlette/README.rst
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/README.rst
rename to instrumentation/opentelemetry-instrumentation-starlette/README.rst
diff --git a/ext/opentelemetry-instrumentation-starlette/setup.cfg b/instrumentation/opentelemetry-instrumentation-starlette/setup.cfg
similarity index 93%
rename from ext/opentelemetry-instrumentation-starlette/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-starlette/setup.cfg
index f1613a8cd8..905f4992e4 100644
--- a/ext/opentelemetry-instrumentation-starlette/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-starlette/setup.cfg
@@ -19,7 +19,7 @@ long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-instrumentation-starlette
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-starlette
platforms = any
license = Apache-2.0
classifiers =
@@ -39,7 +39,7 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api == 0.12.dev0
- opentelemetry-ext-asgi == 0.12.dev0
+ opentelemetry-instrumentation-asgi == 0.12.dev0
[options.entry_points]
opentelemetry_instrumentor =
diff --git a/ext/opentelemetry-instrumentation-starlette/setup.py b/instrumentation/opentelemetry-instrumentation-starlette/setup.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/setup.py
rename to instrumentation/opentelemetry-instrumentation-starlette/setup.py
diff --git a/ext/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py
similarity index 97%
rename from ext/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py
rename to instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py
index b8763bba05..f469447f3a 100644
--- a/ext/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py
@@ -16,7 +16,7 @@
from starlette import applications
from starlette.routing import Match
-from opentelemetry.ext.asgi import OpenTelemetryMiddleware
+from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.instrumentation.starlette.version import __version__ # noqa
diff --git a/ext/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
rename to instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
diff --git a/ext/opentelemetry-instrumentation-fastapi/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-starlette/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-fastapi/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-starlette/tests/__init__.py
diff --git a/ext/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py b/instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py
rename to instrumentation/opentelemetry-instrumentation-starlette/tests/test_starlette_instrumentation.py
diff --git a/ext/opentelemetry-ext-wsgi/CHANGELOG.md b/instrumentation/opentelemetry-instrumentation-wsgi/CHANGELOG.md
similarity index 82%
rename from ext/opentelemetry-ext-wsgi/CHANGELOG.md
rename to instrumentation/opentelemetry-instrumentation-wsgi/CHANGELOG.md
index 739ee7b0cc..6f1085b8bb 100644
--- a/ext/opentelemetry-ext-wsgi/CHANGELOG.md
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- Change package name to opentelemetry-instrumentation-wsgi
+ ([#961](https://github.com/open-telemetry/opentelemetry-python/pull/961))
+
## Version 0.11b0
Released 2020-07-28
diff --git a/ext/opentelemetry-instrumentation-aiopg/LICENSE b/instrumentation/opentelemetry-instrumentation-wsgi/LICENSE
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/LICENSE
rename to instrumentation/opentelemetry-instrumentation-wsgi/LICENSE
diff --git a/ext/opentelemetry-instrumentation-aiopg/MANIFEST.in b/instrumentation/opentelemetry-instrumentation-wsgi/MANIFEST.in
similarity index 100%
rename from ext/opentelemetry-instrumentation-aiopg/MANIFEST.in
rename to instrumentation/opentelemetry-instrumentation-wsgi/MANIFEST.in
diff --git a/ext/opentelemetry-ext-wsgi/README.rst b/instrumentation/opentelemetry-instrumentation-wsgi/README.rst
similarity index 63%
rename from ext/opentelemetry-ext-wsgi/README.rst
rename to instrumentation/opentelemetry-instrumentation-wsgi/README.rst
index 12ee81cb09..ac39dac0c7 100644
--- a/ext/opentelemetry-ext-wsgi/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/README.rst
@@ -3,8 +3,8 @@ OpenTelemetry WSGI Middleware
|pypi|
-.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-wsgi.svg
- :target: https://pypi.org/project/opentelemetry-ext-wsgi/
+.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-wsgi.svg
+ :target: https://pypi.org/project/opentelemetry-instrumentation-wsgi/
This library provides a WSGI middleware that can be used on any WSGI framework
@@ -15,12 +15,12 @@ Installation
::
- pip install opentelemetry-ext-wsgi
+ pip install opentelemetry-instrumentation-wsgi
References
----------
-* `OpenTelemetry WSGI Middleware `_
+* `OpenTelemetry WSGI Middleware `_
* `OpenTelemetry Project `_
* `WSGI `_
diff --git a/ext/opentelemetry-ext-wsgi/setup.cfg b/instrumentation/opentelemetry-instrumentation-wsgi/setup.cfg
similarity index 94%
rename from ext/opentelemetry-ext-wsgi/setup.cfg
rename to instrumentation/opentelemetry-instrumentation-wsgi/setup.cfg
index 97445a847c..b48d61dc84 100644
--- a/ext/opentelemetry-ext-wsgi/setup.cfg
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/setup.cfg
@@ -13,13 +13,13 @@
# limitations under the License.
#
[metadata]
-name = opentelemetry-ext-wsgi
+name = opentelemetry-instrumentation-wsgi
description = WSGI Middleware for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
author_email = cncf-opentelemetry-contributors@lists.cncf.io
-url = https://github.com/open-telemetry/opentelemetry-python/tree/master/ext/opentelemetry-ext-wsgi
+url = https://github.com/open-telemetry/opentelemetry-python/tree/master/instrumentation/opentelemetry-instrumentation-wsgi
platforms = any
license = Apache-2.0
classifiers =
diff --git a/ext/opentelemetry-ext-pyramid/setup.py b/instrumentation/opentelemetry-instrumentation-wsgi/setup.py
similarity index 91%
rename from ext/opentelemetry-ext-pyramid/setup.py
rename to instrumentation/opentelemetry-instrumentation-wsgi/setup.py
index 175db54ed5..fb4ffa7437 100644
--- a/ext/opentelemetry-ext-pyramid/setup.py
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/setup.py
@@ -17,7 +17,7 @@
BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
- BASE_DIR, "src", "opentelemetry", "ext", "pyramid", "version.py"
+ BASE_DIR, "src", "opentelemetry", "instrumentation", "wsgi", "version.py"
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
diff --git a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
similarity index 97%
rename from ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
rename to instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
index 709de24edf..8a2d0bec08 100644
--- a/ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
@@ -21,7 +21,7 @@
.. code-block:: python
from flask import Flask
- from opentelemetry.ext.wsgi import OpenTelemetryMiddleware
+ from opentelemetry.instrumentation.wsgi import OpenTelemetryMiddleware
app = Flask(__name__)
app.wsgi_app = OpenTelemetryMiddleware(app.wsgi_app)
@@ -42,7 +42,7 @@ def hello():
.. code-block:: python
import os
- from opentelemetry.ext.wsgi import OpenTelemetryMiddleware
+ from opentelemetry.instrumentation.wsgi import OpenTelemetryMiddleware
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings')
@@ -59,8 +59,8 @@ def hello():
import wsgiref.util as wsgiref_util
from opentelemetry import context, propagators, trace
-from opentelemetry.ext.wsgi.version import __version__
from opentelemetry.instrumentation.utils import http_status_to_canonical_code
+from opentelemetry.instrumentation.wsgi.version import __version__
from opentelemetry.trace.status import Status, StatusCanonicalCode
_HTTP_VERSION_PREFIX = "HTTP/"
diff --git a/ext/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
rename to instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py
diff --git a/ext/opentelemetry-instrumentation-starlette/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-wsgi/tests/__init__.py
similarity index 100%
rename from ext/opentelemetry-instrumentation-starlette/tests/__init__.py
rename to instrumentation/opentelemetry-instrumentation-wsgi/tests/__init__.py
diff --git a/ext/opentelemetry-ext-wsgi/tests/test_wsgi_middleware.py b/instrumentation/opentelemetry-instrumentation-wsgi/tests/test_wsgi_middleware.py
similarity index 99%
rename from ext/opentelemetry-ext-wsgi/tests/test_wsgi_middleware.py
rename to instrumentation/opentelemetry-instrumentation-wsgi/tests/test_wsgi_middleware.py
index 2a2d518513..5734027b0a 100644
--- a/ext/opentelemetry-ext-wsgi/tests/test_wsgi_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/tests/test_wsgi_middleware.py
@@ -18,7 +18,7 @@
import wsgiref.util as wsgiref_util
from urllib.parse import urlsplit
-import opentelemetry.ext.wsgi as otel_wsgi
+import opentelemetry.instrumentation.wsgi as otel_wsgi
from opentelemetry import trace as trace_api
from opentelemetry.test.wsgitestutil import WsgiTestBase
from opentelemetry.trace.status import StatusCanonicalCode
diff --git a/opentelemetry-api/src/opentelemetry/metrics/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/__init__.py
index 22b7b880b4..bd2e3b8573 100644
--- a/opentelemetry-api/src/opentelemetry/metrics/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/metrics/__init__.py
@@ -275,7 +275,7 @@ def get_meter(
This should *not* be the name of the module that is
instrumented but the name of the module doing the instrumentation.
E.g., instead of ``"requests"``, use
- ``"opentelemetry.ext.requests"``.
+ ``"opentelemetry.instrumentation.requests"``.
instrumenting_library_version: Optional. The version string of the
instrumenting library. Usually this should be the same as
diff --git a/opentelemetry-api/src/opentelemetry/trace/__init__.py b/opentelemetry-api/src/opentelemetry/trace/__init__.py
index 196cf3390c..ffda0a15e7 100644
--- a/opentelemetry-api/src/opentelemetry/trace/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/trace/__init__.py
@@ -242,7 +242,7 @@ def get_tracer(
This should *not* be the name of the module that is
instrumented but the name of the module doing the instrumentation.
E.g., instead of ``"requests"``, use
- ``"opentelemetry.ext.requests"``.
+ ``"opentelemetry.instrumentation.requests"``.
instrumenting_library_version: Optional. The version string of the
instrumenting library. Usually this should be the same as
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
index f624a2e4dd..857ceb84fe 100644
--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
+++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
@@ -25,16 +25,16 @@
# target library to desired instrumentor path/versioned package name
instrumentations = {
- "asgi": "opentelemetry-ext-asgi>=0.11b0",
+ "asgi": "opentelemetry-instrumentation-asgi>=0.11b0",
"asyncpg": "opentelemetry-ext-asyncpg>=0.11b0",
"boto": "opentelemetry-ext-boto>=0.11b0",
"botocore": "opentelemetry-ext-botocore>=0.11b0",
"celery": "opentelemetry-ext-celery>=0.11b0",
"dbapi": "opentelemetry-ext-dbapi>=0.8b0",
- "django": "opentelemetry-ext-django>=0.8b0",
+ "django": "opentelemetry-instrumentation-django>=0.8b0",
"elasticsearch": "opentelemetry-ext-elasticsearch>=0.11b0",
"fastapi": "opentelemetry-instrumentation-fastapi>=0.11b0",
- "flask": "opentelemetry-ext-flask>=0.8b0",
+ "flask": "opentelemetry-instrumentation-flask>=0.8b0",
"grpc": "opentelemetry-ext-grpc>=0.8b0",
"jinja2": "opentelemetry-ext-jinja2>=0.8b0",
"mysql": "opentelemetry-ext-mysql>=0.8b0",
@@ -42,27 +42,27 @@
"pymemcache": "opentelemetry-ext-pymemcache>=0.11b0",
"pymongo": "opentelemetry-ext-pymongo>=0.8b0",
"pymysql": "opentelemetry-ext-pymysql>=0.8b0",
- "pyramid": "opentelemetry-ext-pyramid>=0.11b0",
+ "pyramid": "opentelemetry-instrumentation-pyramid>=0.11b0",
"redis": "opentelemetry-ext-redis>=0.8b0",
- "requests": "opentelemetry-ext-requests>=0.8b0",
+ "requests": "opentelemetry-instrumentation-requests>=0.8b0",
"sqlalchemy": "opentelemetry-ext-sqlalchemy>=0.8b0",
"sqlite3": "opentelemetry-ext-sqlite3>=0.11b0",
"starlette": "opentelemetry-instrumentation-starlette>=0.11b0",
- "wsgi": "opentelemetry-ext-wsgi>=0.8b0",
+ "wsgi": "opentelemetry-instrumentation-wsgi>=0.8b0",
}
# relevant instrumentors and tracers to uninstall and check for conflicts for target libraries
libraries = {
- "asgi": ("opentelemetry-ext-asgi",),
+ "asgi": ("opentelemetry-instrumentation-asgi",),
"asyncpg": ("opentelemetry-ext-asyncpg",),
"boto": ("opentelemetry-ext-boto",),
"botocore": ("opentelemetry-ext-botocore",),
"celery": ("opentelemetry-ext-celery",),
"dbapi": ("opentelemetry-ext-dbapi",),
- "django": ("opentelemetry-ext-django",),
+ "django": ("opentelemetry-instrumentation-django",),
"elasticsearch": ("opentelemetry-ext-elasticsearch",),
"fastapi": ("opentelemetry-instrumentation-fastapi",),
- "flask": ("opentelemetry-ext-flask",),
+ "flask": ("opentelemetry-instrumentation-flask",),
"grpc": ("opentelemetry-ext-grpc",),
"jinja2": ("opentelemetry-ext-jinja2",),
"mysql": ("opentelemetry-ext-mysql",),
@@ -70,13 +70,13 @@
"pymemcache": ("opentelemetry-ext-pymemcache",),
"pymongo": ("opentelemetry-ext-pymongo",),
"pymysql": ("opentelemetry-ext-pymysql",),
- "pyramid": ("opentelemetry-ext-pyramid",),
+ "pyramid": ("opentelemetry-instrumentation-pyramid",),
"redis": ("opentelemetry-ext-redis",),
- "requests": ("opentelemetry-ext-requests",),
+ "requests": ("opentelemetry-instrumentation-requests",),
"sqlalchemy": ("opentelemetry-ext-sqlalchemy",),
"sqlite3": ("opentelemetry-ext-sqlite3",),
"starlette": ("opentelemetry-instrumentation-starlette",),
- "wsgi": ("opentelemetry-ext-wsgi",),
+ "wsgi": ("opentelemetry-instrumentation-wsgi",),
}
@@ -87,10 +87,10 @@ def _install_package(library, instrumentation):
OpenTelemetry auto-instrumentation packages often have traced libraries
- as instrumentation dependency (e.g. flask for opentelemetry-ext-flask),
- so using -I on library could cause likely undesired Flask upgrade.
- Using --no-dependencies alone would leave potential for nonfunctional
- installations.
+ as instrumentation dependency (e.g. flask for
+ opentelemetry-instrumentation-flask), so using -I on library could cause
+ likely undesired Flask upgrade.Using --no-dependencies alone would leave
+ potential for nonfunctional installations.
"""
pip_list = _sys_pip_freeze()
for package in libraries[library]:
@@ -159,7 +159,7 @@ def _pip_check():
Clean check reported as:
'No broken requirements found.'
Dependency conflicts are reported as:
- 'opentelemetry-ext-flask 1.0.1 has requirement opentelemetry-sdk<2.0,>=1.0, but you have opentelemetry-sdk 0.5.'
+ 'opentelemetry-instrumentation-flask 1.0.1 has requirement opentelemetry-sdk<2.0,>=1.0, but you have opentelemetry-sdk 0.5.'
To not be too restrictive, we'll only check for relevant packages.
"""
check_pipe = subprocess.Popen(
diff --git a/scripts/build.sh b/scripts/build.sh
index 0d481b8165..056998ebc1 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -16,7 +16,7 @@ DISTDIR=dist
mkdir -p $DISTDIR
rm -rf $DISTDIR/*
- for d in opentelemetry-api/ opentelemetry-sdk/ opentelemetry-instrumentation/ opentelemetry-proto/ exporter/*/ ext/*/ ; do
+ for d in opentelemetry-api/ opentelemetry-sdk/ opentelemetry-instrumentation/ opentelemetry-proto/ exporter/*/ ext/*/ instrumentation/*/ ; do
(
echo "building $d"
cd "$d"
diff --git a/scripts/coverage.sh b/scripts/coverage.sh
index 5cf393e7e6..830381225f 100755
--- a/scripts/coverage.sh
+++ b/scripts/coverage.sh
@@ -32,20 +32,20 @@ coverage erase
cov opentelemetry-api
cov opentelemetry-sdk
cov exporter/opentelemetry-exporter-datadog
-cov ext/opentelemetry-ext-flask
-cov ext/opentelemetry-ext-requests
+cov instrumentation/opentelemetry-instrumentation-flask
+cov instrumentation/opentelemetry-instrumentation-requests
cov exporter/opentelemetry-exporter-jaeger
cov ext/opentelemetry-ext-opentracing-shim
-cov ext/opentelemetry-ext-wsgi
+cov instrumentation/opentelemetry-instrumentation-wsgi
cov exporter/opentelemetry-exporter-zipkin
cov docs/examples/opentelemetry-example-app
# aiohttp is only supported on Python 3.5+.
if [ ${PYTHON_VERSION_INFO[1]} -gt 4 ]; then
- cov ext/opentelemetry-ext-aiohttp-client
+ cov instrumentation/opentelemetry-instrumentation-aiohttp-client
# ext-asgi is only supported on Python 3.5+.
if [ ${PYTHON_VERSION_INFO[1]} -gt 4 ]; then
- cov ext/opentelemetry-ext-asgi
+ cov instrumentation/opentelemetry-instrumentation-asgi
fi
coverage report --show-missing
diff --git a/tests/w3c_tracecontext_validation_server.py b/tests/w3c_tracecontext_validation_server.py
index 5961a3b039..f2fb14f206 100644
--- a/tests/w3c_tracecontext_validation_server.py
+++ b/tests/w3c_tracecontext_validation_server.py
@@ -24,8 +24,8 @@
import requests
from opentelemetry import trace
-from opentelemetry.ext.requests import RequestsInstrumentor
-from opentelemetry.ext.wsgi import OpenTelemetryMiddleware
+from opentelemetry.instrumentation.requests import RequestsInstrumentor
+from opentelemetry.instrumentation.wsgi import OpenTelemetryMiddleware
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
diff --git a/tox.ini b/tox.ini
index a018ec7a89..6dab08f703 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,7 @@ envlist =
py3{4,5,6,7,8}-test-instrumentation-example-app
pypy3-test-instrumentation-example-app
- ; opentelemetry-ext-aiohttp-client
+ ; opentelemetry-instrumentation-aiohttp-client
py3{5,6,7,8}-test-instrumentation-aiohttp-client
pypy3-test-instrumentation-aiohttp-client
@@ -40,7 +40,7 @@ envlist =
py3{6,7,8}-test-instrumentation-botocore
pypy3-test-instrumentation-botocore
- ; opentelemetry-ext-django
+ ; opentelemetry-instrumentation-django
py3{4,5,6,7,8}-test-instrumentation-django
pypy3-test-instrumentation-django
@@ -61,11 +61,11 @@ envlist =
py3{6,7,8}-test-instrumentation-fastapi
pypy3-test-instrumentation-fastapi
- ; opentelemetry-ext-flask
+ ; opentelemetry-instrumentation-flask
py3{4,5,6,7,8}-test-instrumentation-flask
pypy3-test-instrumentation-flask
- ; opentelemetry-ext-requests
+ ; opentelemetry-instrumentation-requests
py3{4,5,6,7,8}-test-instrumentation-requests
pypy3-test-instrumentation-requests
@@ -117,11 +117,11 @@ envlist =
py3{4,5,6,7,8}-test-instrumentation-pymysql
pypy3-test-instrumentation-pymysql
- ; opentelemetry-ext-pyramid
+ ; opentelemetry-instrumentation-pyramid
py3{4,5,6,7,8}-test-instrumentation-pyramid
pypy3-test-instrumentation-pyramid
- ; opentelemetry-ext-asgi
+ ; opentelemetry-instrumentation-asgi
py3{5,6,7,8}-test-instrumentation-asgi
pypy3-test-instrumentation-asgi
@@ -133,7 +133,7 @@ envlist =
py3{4,5,6,7,8}-test-instrumentation-sqlite3
pypy3-test-instrumentation-sqlite3
- ; opentelemetry-ext-wsgi
+ ; opentelemetry-instrumentation-wsgi
py3{4,5,6,7,8}-test-instrumentation-wsgi
pypy3-test-instrumentation-wsgi
@@ -197,19 +197,19 @@ changedir =
test-core-getting-started: docs/getting_started/tests
test-core-opentracing-shim: ext/opentelemetry-ext-opentracing-shim/tests
- test-instrumentation-aiohttp-client: ext/opentelemetry-ext-aiohttp-client/tests
- test-instrumentation-aiopg: ext/opentelemetry-instrumentation-aiopg/tests
- test-instrumentation-asgi: ext/opentelemetry-ext-asgi/tests
+ test-instrumentation-aiohttp-client: instrumentation/opentelemetry-instrumentation-aiohttp-client/tests
+ test-instrumentation-aiopg: instrumentation/opentelemetry-instrumentation-aiopg/tests
+ test-instrumentation-asgi: instrumentation/opentelemetry-instrumentation-asgi/tests
test-instrumentation-asyncpg: ext/opentelemetry-ext-asyncpg/tests
test-instrumentation-boto: ext/opentelemetry-ext-boto/tests
test-instrumentation-botocore: ext/opentelemetry-ext-botocore/tests
test-instrumentation-celery: ext/opentelemetry-ext-celery/tests
test-instrumentation-dbapi: ext/opentelemetry-ext-dbapi/tests
- test-instrumentation-django: ext/opentelemetry-ext-django/tests
+ test-instrumentation-django: instrumentation/opentelemetry-instrumentation-django/tests
test-instrumentation-example-app: docs/examples/opentelemetry-example-app/tests
test-instrumentation-elasticsearch{2,5,6,7}: ext/opentelemetry-ext-elasticsearch/tests
- test-instrumentation-fastapi: ext/opentelemetry-instrumentation-fastapi/tests
- test-instrumentation-flask: ext/opentelemetry-ext-flask/tests
+ test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests
+ test-instrumentation-flask: instrumentation/opentelemetry-instrumentation-flask/tests
test-instrumentation-grpc: ext/opentelemetry-ext-grpc/tests
test-instrumentation-jinja2: ext/opentelemetry-ext-jinja2/tests
test-instrumentation-mysql: ext/opentelemetry-ext-mysql/tests
@@ -217,14 +217,14 @@ changedir =
test-instrumentation-pymemcache: ext/opentelemetry-ext-pymemcache/tests
test-instrumentation-pymongo: ext/opentelemetry-ext-pymongo/tests
test-instrumentation-pymysql: ext/opentelemetry-ext-pymysql/tests
- test-instrumentation-pyramid: ext/opentelemetry-ext-pyramid/tests
+ test-instrumentation-pyramid: instrumentation/opentelemetry-instrumentation-pyramid/tests
test-instrumentation-redis: ext/opentelemetry-ext-redis/tests
- test-instrumentation-requests: ext/opentelemetry-ext-requests/tests
+ test-instrumentation-requests: instrumentation/opentelemetry-instrumentation-requests/tests
test-instrumentation-sqlalchemy: ext/opentelemetry-ext-sqlalchemy/tests
test-instrumentation-sqlite3: ext/opentelemetry-ext-sqlite3/tests
- test-instrumentation-starlette: ext/opentelemetry-instrumentation-starlette/tests
+ test-instrumentation-starlette: instrumentation/opentelemetry-instrumentation-starlette/tests
test-instrumentation-system-metrics: ext/opentelemetry-ext-system-metrics/tests
- test-instrumentation-wsgi: ext/opentelemetry-ext-wsgi/tests
+ test-instrumentation-wsgi: instrumentation/opentelemetry-instrumentation-wsgi/tests
test-exporter-jaeger: exporter/opentelemetry-exporter-jaeger/tests
test-exporter-datadog: exporter/opentelemetry-exporter-datadog/tests
@@ -243,31 +243,31 @@ commands_pre =
test-core-proto: pip install {toxinidir}/opentelemetry-proto
ext,instrumentation: pip install {toxinidir}/opentelemetry-instrumentation
- example-app: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/ext/opentelemetry-ext-requests {toxinidir}/ext/opentelemetry-ext-wsgi {toxinidir}/ext/opentelemetry-ext-flask {toxinidir}/docs/examples/opentelemetry-example-app
+ example-app: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-requests {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi {toxinidir}/instrumentation/opentelemetry-instrumentation-flask {toxinidir}/docs/examples/opentelemetry-example-app
- getting-started: pip install -e {toxinidir}/opentelemetry-instrumentation -e {toxinidir}/ext/opentelemetry-ext-requests -e {toxinidir}/ext/opentelemetry-ext-wsgi -e {toxinidir}/ext/opentelemetry-ext-flask
+ getting-started: pip install -e {toxinidir}/opentelemetry-instrumentation -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
celery: pip install {toxinidir}/ext/opentelemetry-ext-celery[test]
grpc: pip install {toxinidir}/ext/opentelemetry-ext-grpc[test]
- wsgi,flask,django,pyramid: pip install {toxinidir}/ext/opentelemetry-ext-wsgi
- asgi,starlette,fastapi: pip install {toxinidir}/ext/opentelemetry-ext-asgi
+ wsgi,flask,django,pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi
+ asgi,starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi
asyncpg: pip install {toxinidir}/ext/opentelemetry-ext-asyncpg
boto: pip install {toxinidir}/ext/opentelemetry-ext-botocore[test]
boto: pip install {toxinidir}/ext/opentelemetry-ext-boto[test]
- flask: pip install {toxinidir}/ext/opentelemetry-ext-flask[test]
+ flask: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
botocore: pip install {toxinidir}/ext/opentelemetry-ext-botocore[test]
dbapi: pip install {toxinidir}/ext/opentelemetry-ext-dbapi[test]
- django: pip install {toxinidir}/ext/opentelemetry-ext-django[test]
+ django: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test]
- fastapi: pip install {toxinidir}/ext/opentelemetry-instrumentation-fastapi[test]
+ fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test]
mysql: pip install {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-mysql[test]
@@ -286,21 +286,21 @@ commands_pre =
pymysql: pip install {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-pymysql[test]
- pyramid: pip install {toxinidir}/ext/opentelemetry-ext-pyramid[test]
+ pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test]
sqlite3: pip install {toxinidir}/ext/opentelemetry-ext-dbapi {toxinidir}/ext/opentelemetry-ext-sqlite3[test]
redis: pip install {toxinidir}/ext/opentelemetry-ext-redis[test]
- requests: pip install {toxinidir}/ext/opentelemetry-ext-requests[test]
+ requests: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test]
- starlette: pip install {toxinidir}/ext/opentelemetry-instrumentation-starlette[test]
+ starlette: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test]
jinja2: pip install {toxinidir}/ext/opentelemetry-ext-jinja2[test]
- aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-aiohttp-client
+ aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client
- aiopg: pip install {toxinidir}/ext/opentelemetry-ext-dbapi pip install {toxinidir}/ext/opentelemetry-instrumentation-aiopg[test]
+ aiopg: pip install {toxinidir}/ext/opentelemetry-ext-dbapi pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test]
jaeger: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger
@@ -383,9 +383,9 @@ commands_pre =
pip install -e {toxinidir}/opentelemetry-api \
-e {toxinidir}/opentelemetry-instrumentation \
-e {toxinidir}/opentelemetry-sdk \
- -e {toxinidir}/ext/opentelemetry-ext-requests \
- -e {toxinidir}/ext/opentelemetry-ext-wsgi \
- -e {toxinidir}/ext/opentelemetry-ext-flask
+ -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests \
+ -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi \
+ -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh
@@ -420,7 +420,7 @@ commands_pre =
-e {toxinidir}/ext/opentelemetry-ext-pymongo \
-e {toxinidir}/ext/opentelemetry-ext-pymysql \
-e {toxinidir}/ext/opentelemetry-ext-sqlalchemy \
- -e {toxinidir}/ext/opentelemetry-instrumentation-aiopg \
+ -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg \
-e {toxinidir}/ext/opentelemetry-ext-redis \
-e {toxinidir}/ext/opentelemetry-ext-system-metrics \
-e {toxinidir}/exporter/opentelemetry-exporter-opencensus