Skip to content

Commit

Permalink
Add other files from zzhlogin's PR
Browse files Browse the repository at this point in the history
  • Loading branch information
thpierce committed Feb 7, 2024
1 parent 96cd9ba commit 9b06ceb
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 4 deletions.
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To build one auto-instrumentation image for Python, please:
# - Ensure the packages are installed in the `/autoinstrumentation` directory. This is required as when instrumenting the pod,
# one init container will be created to copy all the content in `/autoinstrumentation` directory to your app's container. Then
# update the `PYTHONPATH` environment variable accordingly. To achieve this, you can mimic the one in `autoinstrumentation/python/Dockerfile`
# by using multi-stage builds. In the first stage, install all the required packages in one custom directory with `pip install --target`.
# Then in the second stage, copy the directory to `/autoinstrumentation`.
# - Ensure you have `opentelemetry-distro` and `opentelemetry-instrumentation` or your customized alternatives installed.
# Those two packages are essential to Python auto-instrumentation.
# - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation`
# - For auto-instrumentation by container injection, the Linux command cp is
# used and must be available in the image.
FROM python:3.10 AS build

WORKDIR /operator-build

ADD aws-opentelemetry-distro/ ./aws-opentelemetry-distro/

RUN mkdir workspace && pip install --target workspace ./aws-opentelemetry-distro

FROM busybox

COPY --from=build /operator-build/workspace /autoinstrumentation

RUN chmod -R go+r /autoinstrumentation
57 changes: 53 additions & 4 deletions aws-opentelemetry-distro/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,61 @@ license = "Apache-2.0"
requires-python = ">=3.8"

dependencies = [
"grpcio ~= 1.60.0",
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.43b0",
"opentelemetry-instrumentation ~= 0.43b0",
"opentelemetry-sdk ~= 1.13",
"opentelemetry-distro == 0.43b0",
"opentelemetry-distro ~= 0.43b0",
"opentelemetry-sdk-extension-aws ~= 2.0.1",
"opentelemetry-exporter-otlp-proto-grpc == 1.22.0"
"opentelemetry-exporter-otlp-proto-grpc ~= 1.22.0",
"opentelemetry-exporter-otlp-proto-http ~= 1.22.0",
"opentelemetry-propagator-b3 ~= 1.22.0",
"opentelemetry-propagator-jaeger ~= 1.22.0",
"opentelemetry-propagator-aws-xray ~= 1.0.1",
"opentelemetry-propagator-ot-trace ~= 0.43b0",
"opentelemetry-exporter-otlp-proto-common ~= 1.22.0",
"opentelemetry-instrumentation-aio-pika ~= 0.43b0",
"opentelemetry-instrumentation-aiohttp-client ~= 0.43b0",
"opentelemetry-instrumentation-aiopg ~= 0.43b0",
"opentelemetry-instrumentation-asgi ~= 0.43b0",
"opentelemetry-instrumentation-asyncpg ~= 0.43b0",
"opentelemetry-instrumentation-boto ~= 0.43b0",
"opentelemetry-instrumentation-boto3sqs ~= 0.43b0",
"opentelemetry-instrumentation-botocore ~= 0.43b0",
"opentelemetry-instrumentation-celery ~= 0.43b0",
"opentelemetry-instrumentation-confluent-kafka ~= 0.43b0",
"opentelemetry-instrumentation-dbapi ~= 0.43b0",
"opentelemetry-instrumentation-django ~= 0.43b0",
"opentelemetry-instrumentation-elasticsearch ~= 0.43b0",
"opentelemetry-instrumentation-falcon ~= 0.43b0",
"opentelemetry-instrumentation-fastapi ~= 0.43b0",
"opentelemetry-instrumentation-flask ~= 0.43b0",
"opentelemetry-instrumentation-grpc ~= 0.43b0",
"opentelemetry-instrumentation-httpx ~= 0.43b0",
"opentelemetry-instrumentation-jinja2 ~= 0.43b0",
"opentelemetry-instrumentation-kafka-python ~= 0.43b0",
"opentelemetry-instrumentation-logging ~= 0.43b0",
"opentelemetry-instrumentation-mysql ~= 0.43b0",
"opentelemetry-instrumentation-mysqlclient ~= 0.43b0",
" opentelemetry-instrumentation-pika ~= 0.43b0",
"opentelemetry-instrumentation-psycopg2 ~= 0.43b0",
"opentelemetry-instrumentation-pymemcache ~= 0.43b0",
"opentelemetry-instrumentation-pymongo ~= 0.43b0",
"opentelemetry-instrumentation-pymysql ~= 0.43b0",
"opentelemetry-instrumentation-pyramid ~= 0.43b0",
"opentelemetry-instrumentation-redis ~= 0.43b0",
"opentelemetry-instrumentation-remoulade ~= 0.43b0",
"opentelemetry-instrumentation-requests ~= 0.43b0",
"opentelemetry-instrumentation-sklearn ~= 0.43b0",
"opentelemetry-instrumentation-sqlalchemy ~= 0.43b0",
"opentelemetry-instrumentation-sqlite3 ~= 0.43b0",
"opentelemetry-instrumentation-starlette ~= 0.43b0",
"opentelemetry-instrumentation-system-metrics ~= 0.43b0",
"opentelemetry-instrumentation-tornado ~= 0.43b0",
"opentelemetry-instrumentation-tortoiseorm ~= 0.43b0",
"opentelemetry-instrumentation-urllib ~= 0.43b0",
"opentelemetry-instrumentation-urllib3 ~= 0.43b0",
"opentelemetry-instrumentation-wsgi ~= 0.43b0"
]

[project.optional-dependencies]
Expand All @@ -41,4 +90,4 @@ include = [
]

[tool.hatch.build.targets.wheel]
packages = ["src/amazon"]
packages = ["src/amazon"]

0 comments on commit 9b06ceb

Please sign in to comment.