File tree Expand file tree Collapse file tree 4 files changed +664
-15
lines changed
samples/instrumentation-quickstart Expand file tree Collapse file tree 4 files changed +664
-15
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.12
1
+ FROM python:3.12-slim
2
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
2
3
WORKDIR /usr/src/app
3
4
COPY . .
4
- RUN python -m venv /venv && \
5
- /venv/bin/pip install -r requirements.txt
6
- CMD /venv/bin/gunicorn -b 0.0.0.0:8080 -w 4 'app:app' 2>&1 | tee /var/log/app.log
5
+ RUN uv sync --frozen
6
+ CMD uv run gunicorn -b 0.0.0.0:8080 -w 4 'app:app' 2>&1 | tee /var/log/app.log
Original file line number Diff line number Diff line change
1
+ [project ]
2
+ name = " instrumentation-quickstart"
3
+ version = " 0.1.0"
4
+ description = " A Flask app instrumented with OpenTelemetry and structured logging for GCP"
5
+ readme = " README.md"
6
+ requires-python = " >=3.9"
7
+ dependencies = [
8
+ " flask>=3.1.0" ,
9
+ " gunicorn>=23.0.0" ,
10
+ " opentelemetry-api>=1.29.0" ,
11
+ " opentelemetry-exporter-otlp-proto-http>=1.29.0" ,
12
+ " opentelemetry-instrumentation-flask>=0.50b0" ,
13
+ " opentelemetry-instrumentation-logging>=0.50b0" ,
14
+ " opentelemetry-instrumentation-requests>=0.50b0" ,
15
+ " opentelemetry-sdk>=1.29.0" ,
16
+ " python-json-logger>=3.2.0" ,
17
+ " requests>=2.32.3" ,
18
+ ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments