OpenTelemetry tracing add (default off, k8s me on)
This commit is contained in:
parent
e9ed75d510
commit
7b946b1182
10
Dockerfile
10
Dockerfile
@ -22,4 +22,12 @@ USER appuser
|
|||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
HEALTHCHECK --interval=30s --timeout=3s CMD python -c "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8000/health')"
|
HEALTHCHECK --interval=30s --timeout=3s CMD python -c "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8000/health')"
|
||||||
|
|
||||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "app.main:app"]
|
# Tracing default OFF. k8s manifest me OTEL_SDK_DISABLED=false karke on hota hai,
|
||||||
|
# taaki build/smoke test ke waqt export ki koshish na ho.
|
||||||
|
ENV OTEL_SDK_DISABLED=true \
|
||||||
|
OTEL_TRACES_EXPORTER=otlp \
|
||||||
|
OTEL_METRICS_EXPORTER=none \
|
||||||
|
OTEL_LOGS_EXPORTER=none \
|
||||||
|
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
||||||
|
|
||||||
|
CMD ["opentelemetry-instrument", "gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "app.main:app"]
|
||||||
|
|||||||
@ -1,2 +1,5 @@
|
|||||||
flask==3.0.3
|
flask
|
||||||
gunicorn==22.0.0
|
gunicorn
|
||||||
|
opentelemetry-distro
|
||||||
|
opentelemetry-exporter-otlp-proto-http
|
||||||
|
opentelemetry-instrumentation-flask
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user