Skip to content

Commit

Permalink
Update bootstrap cmd to use exact version when installing
Browse files Browse the repository at this point in the history
instrumentation packages

This commit updates the bootstrap command to ensure it'll install
instrumentation packages compatible with the opentelemetry-instrument
package.

Since opentelemetry-instrumentation (as as a result all
instrumentations) are not stable yet, installing an instrumentation
package older or newer than opentelemtry-instrumentation can result in
a broken setup. This commit updates the bootstrap command so that it'll
always install instrumentation packages with the exact same version as
it's own.
  • Loading branch information
owais committed Mar 28, 2021
1 parent b9c0b6f commit 45a01bb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.0.0...HEAD)

- Update bootstrap cmd to use exact version when installing instrumentation packages.
([#1722](https://github.com/open-telemetry/opentelemetry-python/pull/1722))


## [1.0.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.0.0) - 2021-03-26
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import sys
from logging import getLogger

from opentelemetry.instrumentation.version import __version__ as version

logger = getLogger(__file__)


Expand All @@ -33,36 +35,40 @@
# instrumented.
# NOTE: system-metrics is not to be included.
instrumentations = {
"aiohttp-client": "opentelemetry-instrumentation-aiohttp-client>=0.15b0",
"aiopg": "opentelemetry-instrumentation-aiopg>=0.15b0",
"asyncpg": "opentelemetry-instrumentation-asyncpg>=0.11b0",
"boto": "opentelemetry-instrumentation-boto>=0.11b0",
"botocore": "opentelemetry-instrumentation-botocore>=0.11b0",
"celery": "opentelemetry-instrumentation-celery>=0.11b0",
"dbapi": "opentelemetry-instrumentation-dbapi>=0.8b0",
"django": "opentelemetry-instrumentation-django>=0.8b0",
"elasticsearch": "opentelemetry-instrumentation-elasticsearch>=0.11b0",
"falcon": "opentelemetry-instrumentation-falcon>=0.13b0",
"fastapi": "opentelemetry-instrumentation-fastapi>=0.11b0",
"flask": "opentelemetry-instrumentation-flask>=0.8b0",
"grpc": "opentelemetry-instrumentation-grpc>=0.8b0",
"jinja2": "opentelemetry-instrumentation-jinja2>=0.8b0",
"mysql": "opentelemetry-instrumentation-mysql>=0.8b0",
"psycopg2": "opentelemetry-instrumentation-psycopg2>=0.8b0",
"pymemcache": "opentelemetry-instrumentation-pymemcache>=0.11b0",
"pymongo": "opentelemetry-instrumentation-pymongo>=0.8b0",
"pymysql": "opentelemetry-instrumentation-pymysql>=0.8b0",
"pyramid": "opentelemetry-instrumentation-pyramid>=0.11b0",
"redis": "opentelemetry-instrumentation-redis>=0.8b0",
"requests": "opentelemetry-instrumentation-requests>=0.8b0",
"sklearn": "opentelemetry-instrumentation-sklearn>=0.15b0",
"sqlalchemy": "opentelemetry-instrumentation-sqlalchemy>=0.8b0",
"sqlite3": "opentelemetry-instrumentation-sqlite3>=0.11b0",
"starlette": "opentelemetry-instrumentation-starlette>=0.11b0",
"tornado": "opentelemetry-instrumentation-tornado>=0.13b0",
"urllib": "opentelemetry-instrumentation-urllib>=0.17b0",
"aiohttp-client": "opentelemetry-instrumentation-aiohttp-client",
"aiopg": "opentelemetry-instrumentation-aiopg",
"asyncpg": "opentelemetry-instrumentation-asyncpg",
"boto": "opentelemetry-instrumentation-boto",
"botocore": "opentelemetry-instrumentation-botocore",
"celery": "opentelemetry-instrumentation-celery",
"dbapi": "opentelemetry-instrumentation-dbapi",
"django": "opentelemetry-instrumentation-django",
"elasticsearch": "opentelemetry-instrumentation-elasticsearch",
"falcon": "opentelemetry-instrumentation-falcon",
"fastapi": "opentelemetry-instrumentation-fastapi",
"flask": "opentelemetry-instrumentation-flask",
"grpc": "opentelemetry-instrumentation-grpc",
"jinja2": "opentelemetry-instrumentation-jinja2",
"mysql": "opentelemetry-instrumentation-mysql",
"psycopg2": "opentelemetry-instrumentation-psycopg2",
"pymemcache": "opentelemetry-instrumentation-pymemcache",
"pymongo": "opentelemetry-instrumentation-pymongo",
"pymysql": "opentelemetry-instrumentation-pymysql",
"pyramid": "opentelemetry-instrumentation-pyramid",
"redis": "opentelemetry-instrumentation-redis",
"requests": "opentelemetry-instrumentation-requests",
"sklearn": "opentelemetry-instrumentation-sklearn",
"sqlalchemy": "opentelemetry-instrumentation-sqlalchemy",
"sqlite3": "opentelemetry-instrumentation-sqlite3",
"starlette": "opentelemetry-instrumentation-starlette",
"tornado": "opentelemetry-instrumentation-tornado",
"urllib": "opentelemetry-instrumentation-urllib",
}

for pkg, inst in instrumentations.items():
instrumentations[pkg] = "{0}=={1}".format(inst, version)


# relevant instrumentors and tracers to uninstall and check for conflicts for target libraries
libraries = {
"aiohttp-client": ("opentelemetry-instrumentation-aiohttp-client",),
Expand Down

0 comments on commit 45a01bb

Please sign in to comment.