|
20 | 20 | import sys
|
21 | 21 | from logging import getLogger
|
22 | 22 |
|
| 23 | +from opentelemetry.instrumentation.version import __version__ as version |
| 24 | + |
23 | 25 | logger = getLogger(__file__)
|
24 | 26 |
|
25 | 27 |
|
|
32 | 34 | # the libraries their application uses to figure which one can be
|
33 | 35 | # instrumented.
|
34 | 36 | # NOTE: system-metrics is not to be included.
|
35 |
| -instrumentations = { |
36 |
| - "aiohttp-client": "opentelemetry-instrumentation-aiohttp-client>=0.15b0", |
37 |
| - "aiopg": "opentelemetry-instrumentation-aiopg>=0.15b0", |
38 |
| - "asyncpg": "opentelemetry-instrumentation-asyncpg>=0.11b0", |
39 |
| - "boto": "opentelemetry-instrumentation-boto>=0.11b0", |
40 |
| - "botocore": "opentelemetry-instrumentation-botocore>=0.11b0", |
41 |
| - "celery": "opentelemetry-instrumentation-celery>=0.11b0", |
42 |
| - "dbapi": "opentelemetry-instrumentation-dbapi>=0.8b0", |
43 |
| - "django": "opentelemetry-instrumentation-django>=0.8b0", |
44 |
| - "elasticsearch": "opentelemetry-instrumentation-elasticsearch>=0.11b0", |
45 |
| - "falcon": "opentelemetry-instrumentation-falcon>=0.13b0", |
46 |
| - "fastapi": "opentelemetry-instrumentation-fastapi>=0.11b0", |
47 |
| - "flask": "opentelemetry-instrumentation-flask>=0.8b0", |
48 |
| - "grpc": "opentelemetry-instrumentation-grpc>=0.8b0", |
49 |
| - "jinja2": "opentelemetry-instrumentation-jinja2>=0.8b0", |
50 |
| - "mysql": "opentelemetry-instrumentation-mysql>=0.8b0", |
51 |
| - "psycopg2": "opentelemetry-instrumentation-psycopg2>=0.8b0", |
52 |
| - "pymemcache": "opentelemetry-instrumentation-pymemcache>=0.11b0", |
53 |
| - "pymongo": "opentelemetry-instrumentation-pymongo>=0.8b0", |
54 |
| - "pymysql": "opentelemetry-instrumentation-pymysql>=0.8b0", |
55 |
| - "pyramid": "opentelemetry-instrumentation-pyramid>=0.11b0", |
56 |
| - "redis": "opentelemetry-instrumentation-redis>=0.8b0", |
57 |
| - "requests": "opentelemetry-instrumentation-requests>=0.8b0", |
58 |
| - "sklearn": "opentelemetry-instrumentation-sklearn>=0.15b0", |
59 |
| - "sqlalchemy": "opentelemetry-instrumentation-sqlalchemy>=0.8b0", |
60 |
| - "sqlite3": "opentelemetry-instrumentation-sqlite3>=0.11b0", |
61 |
| - "starlette": "opentelemetry-instrumentation-starlette>=0.11b0", |
62 |
| - "tornado": "opentelemetry-instrumentation-tornado>=0.13b0", |
63 |
| - "urllib": "opentelemetry-instrumentation-urllib>=0.17b0", |
64 |
| -} |
| 37 | +def all_instrumentations(): |
| 38 | + pkg_instrumentation_map = { |
| 39 | + "aiohttp-client": "opentelemetry-instrumentation-aiohttp-client", |
| 40 | + "aiopg": "opentelemetry-instrumentation-aiopg", |
| 41 | + "asyncpg": "opentelemetry-instrumentation-asyncpg", |
| 42 | + "boto": "opentelemetry-instrumentation-boto", |
| 43 | + "botocore": "opentelemetry-instrumentation-botocore", |
| 44 | + "celery": "opentelemetry-instrumentation-celery", |
| 45 | + "dbapi": "opentelemetry-instrumentation-dbapi", |
| 46 | + "django": "opentelemetry-instrumentation-django", |
| 47 | + "elasticsearch": "opentelemetry-instrumentation-elasticsearch", |
| 48 | + "falcon": "opentelemetry-instrumentation-falcon", |
| 49 | + "fastapi": "opentelemetry-instrumentation-fastapi", |
| 50 | + "flask": "opentelemetry-instrumentation-flask", |
| 51 | + "grpc": "opentelemetry-instrumentation-grpc", |
| 52 | + "jinja2": "opentelemetry-instrumentation-jinja2", |
| 53 | + "mysql": "opentelemetry-instrumentation-mysql", |
| 54 | + "psycopg2": "opentelemetry-instrumentation-psycopg2", |
| 55 | + "pymemcache": "opentelemetry-instrumentation-pymemcache", |
| 56 | + "pymongo": "opentelemetry-instrumentation-pymongo", |
| 57 | + "pymysql": "opentelemetry-instrumentation-pymysql", |
| 58 | + "pyramid": "opentelemetry-instrumentation-pyramid", |
| 59 | + "redis": "opentelemetry-instrumentation-redis", |
| 60 | + "requests": "opentelemetry-instrumentation-requests", |
| 61 | + "sklearn": "opentelemetry-instrumentation-sklearn", |
| 62 | + "sqlalchemy": "opentelemetry-instrumentation-sqlalchemy", |
| 63 | + "sqlite3": "opentelemetry-instrumentation-sqlite3", |
| 64 | + "starlette": "opentelemetry-instrumentation-starlette", |
| 65 | + "tornado": "opentelemetry-instrumentation-tornado", |
| 66 | + "urllib": "opentelemetry-instrumentation-urllib", |
| 67 | + } |
| 68 | + for pkg, instrumentation in pkg_instrumentation_map.items(): |
| 69 | + pkg_instrumentation_map[pkg] = "{0}=={1}".format( |
| 70 | + instrumentation, version |
| 71 | + ) |
| 72 | + return pkg_instrumentation_map |
| 73 | + |
| 74 | + |
| 75 | +instrumentations = all_instrumentations() |
65 | 76 |
|
66 | 77 | # relevant instrumentors and tracers to uninstall and check for conflicts for target libraries
|
67 | 78 | libraries = {
|
|
0 commit comments