Skip to content

Commit

Permalink
Rename db framework packages from "ext" to "instrumentation" (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Aug 4, 2020
1 parent 28d0cdf commit 6e34dfe
Show file tree
Hide file tree
Showing 154 changed files with 725 additions and 636 deletions.
10 changes: 0 additions & 10 deletions docs/ext/asyncpg/asyncpg.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/dbapi/dbapi.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/mysql/mysql.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/psycopg2/psycopg2.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/pymemcache/pymemcache.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/pymongo/pymongo.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/pymysql/pymysql.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/ext/sqlite3/sqlite3.rst

This file was deleted.

10 changes: 10 additions & 0 deletions docs/instrumentation/asyncpg/asyncpg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Opentelemetry asyncpg Instrumentation
=====================================

Module contents
---------------

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

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

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

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

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

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

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

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

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

.. automodule:: opentelemetry.instrumentation.sqlite3
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sortfirst=
opentelemetry-proto
tests/util
instrumentation/opentelemetry-instrumentation-wsgi
ext/opentelemetry-ext-dbapi
instrumentation/opentelemetry-instrumentation-dbapi
instrumentation/opentelemetry-instrumentation-asgi
ext/opentelemetry-ext-botocore
instrumentation/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
_INSTRUMENTATION_SPAN_TYPES = {
"opentelemetry.instrumentation.aiohttp-client": DatadogSpanTypes.HTTP,
"opentelemetry.instrumentation.asgi": DatadogSpanTypes.WEB,
"opentelemetry.ext.dbapi": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.dbapi": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.django": DatadogSpanTypes.WEB,
"opentelemetry.instrumentation.flask": DatadogSpanTypes.WEB,
"opentelemetry.ext.grpc": DatadogSpanTypes.GRPC,
"opentelemetry.ext.jinja2": DatadogSpanTypes.TEMPLATE,
"opentelemetry.ext.mysql": DatadogSpanTypes.SQL,
"opentelemetry.ext.psycopg2": DatadogSpanTypes.SQL,
"opentelemetry.ext.pymemcache": DatadogSpanTypes.CACHE,
"opentelemetry.ext.pymongo": DatadogSpanTypes.MONGODB,
"opentelemetry.ext.pymysql": DatadogSpanTypes.SQL,
"opentelemetry.ext.redis": DatadogSpanTypes.REDIS,
"opentelemetry.instrumentation.mysql": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.psycopg2": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.pymemcache": DatadogSpanTypes.CACHE,
"opentelemetry.instrumentation.pymongo": DatadogSpanTypes.MONGODB,
"opentelemetry.instrumentation.pymysql": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.redis": DatadogSpanTypes.REDIS,
"opentelemetry.instrumentation.requests": DatadogSpanTypes.HTTP,
"opentelemetry.ext.sqlalchemy": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.sqlalchemy": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.wsgi": DatadogSpanTypes.WEB,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,18 @@ def test_resources(self):
def test_span_types(self):
test_instrumentations = [
"opentelemetry.instrumentation.aiohttp-client",
"opentelemetry.ext.dbapi",
"opentelemetry.instrumentation.dbapi",
"opentelemetry.instrumentation.django",
"opentelemetry.instrumentation.flask",
"opentelemetry.ext.grpc",
"opentelemetry.ext.jinja2",
"opentelemetry.ext.mysql",
"opentelemetry.ext.psycopg2",
"opentelemetry.ext.pymongo",
"opentelemetry.ext.pymysql",
"opentelemetry.ext.redis",
"opentelemetry.instrumentation.mysql",
"opentelemetry.instrumentation.psycopg2",
"opentelemetry.instrumentation.pymongo",
"opentelemetry.instrumentation.pymysql",
"opentelemetry.instrumentation.redis",
"opentelemetry.instrumentation.requests",
"opentelemetry.ext.sqlalchemy",
"opentelemetry.instrumentation.sqlalchemy",
"opentelemetry.instrumentation.wsgi",
]

Expand Down
23 changes: 0 additions & 23 deletions ext/opentelemetry-ext-asyncpg/README.rst

This file was deleted.

21 changes: 0 additions & 21 deletions ext/opentelemetry-ext-dbapi/README.rst

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import asyncpg

from opentelemetry.ext.asyncpg import AsyncPGInstrumentor
from opentelemetry.instrumentation.asyncpg import AsyncPGInstrumentor
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace.status import StatusCanonicalCode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import mysql.connector

from opentelemetry import trace as trace_api
from opentelemetry.ext.mysql import MySQLInstrumentor
from opentelemetry.instrumentation.mysql import MySQLInstrumentor
from opentelemetry.test.test_base import TestBase

MYSQL_USER = os.getenv("MYSQL_USER ", "testuser")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import psycopg2

from opentelemetry import trace as trace_api
from opentelemetry.ext.psycopg2 import Psycopg2Instrumentor
from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor
from opentelemetry.test.test_base import TestBase

POSTGRES_HOST = os.getenv("POSTGRESQL_HOST ", "localhost")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from pymongo import MongoClient

from opentelemetry import trace as trace_api
from opentelemetry.ext.pymongo import PymongoInstrumentor
from opentelemetry.instrumentation.pymongo import PymongoInstrumentor
from opentelemetry.test.test_base import TestBase

MONGODB_HOST = os.getenv("MONGODB_HOST ", "localhost")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import pymysql as pymy

from opentelemetry import trace as trace_api
from opentelemetry.ext.pymysql import PyMySQLInstrumentor
from opentelemetry.instrumentation.pymysql import PyMySQLInstrumentor
from opentelemetry.test.test_base import TestBase

MYSQL_USER = os.getenv("MYSQL_USER ", "testuser")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import redis

from opentelemetry import trace
from opentelemetry.ext.redis import RedisInstrumentor
from opentelemetry.instrumentation.redis import RedisInstrumentor
from opentelemetry.test.test_base import TestBase


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from sqlalchemy.orm import sessionmaker

from opentelemetry import trace
from opentelemetry.ext.sqlalchemy import SQLAlchemyInstrumentor
from opentelemetry.ext.sqlalchemy.engine import _DB, _ROWS, _STMT
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from opentelemetry.instrumentation.sqlalchemy.engine import _DB, _ROWS, _STMT
from opentelemetry.test.test_base import TestBase

Base = declarative_base()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import sqlalchemy

from opentelemetry import trace
from opentelemetry.ext.sqlalchemy import SQLAlchemyInstrumentor
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from opentelemetry.test.test_base import TestBase

POSTGRES_CONFIG = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
from sqlalchemy.exc import ProgrammingError

from opentelemetry import trace
from opentelemetry.ext.sqlalchemy.engine import _DB, _HOST, _PORT, _ROWS, _STMT
from opentelemetry.instrumentation.sqlalchemy.engine import (
_DB,
_HOST,
_PORT,
_ROWS,
_STMT,
)

from .mixins import SQLAlchemyTestMixin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
from sqlalchemy.exc import ProgrammingError

from opentelemetry import trace
from opentelemetry.ext.sqlalchemy.engine import _DB, _HOST, _PORT, _ROWS, _STMT
from opentelemetry.instrumentation.sqlalchemy.engine import (
_DB,
_HOST,
_PORT,
_ROWS,
_STMT,
)

from .mixins import SQLAlchemyTestMixin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sqlalchemy.exc import OperationalError

from opentelemetry import trace
from opentelemetry.ext.sqlalchemy.engine import _DB, _ROWS, _STMT
from opentelemetry.instrumentation.sqlalchemy.engine import _DB, _ROWS, _STMT

from .mixins import SQLAlchemyTestMixin

Expand Down
25 changes: 0 additions & 25 deletions ext/opentelemetry-ext-mysql/README.rst

This file was deleted.

Loading

0 comments on commit 6e34dfe

Please sign in to comment.