-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate datadog to pusher for logs and traces (#1312)
Issue #1217 **Key changes:** - Add ddtrace library for pusher - Wrap application to datadog serverless-init to collect traces and logs
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM python:3.11 AS builder | ||
|
||
ENV PATH="/opt/venv/bin:$PATH" | ||
RUN python -m venv /opt/venv | ||
|
||
COPY backend/requirements.txt /tmp/requirements.txt | ||
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt | ||
|
||
FROM python:3.11-slim | ||
|
||
WORKDIR /app | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
RUN apt-get update && apt-get -y install ffmpeg curl unzip && rm -rf /var/lib/apt/lists/* && \ | ||
pip install --target /dd_tracer/python/ ddtrace | ||
|
||
COPY --from=builder /opt/venv /opt/venv | ||
COPY --from=gcr.io/datadoghq/serverless-init:1 /datadog-init /app/datadog-init | ||
COPY backend/ . | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["/app/datadog-init"] | ||
CMD ["/dd_tracer/python/bin/ddtrace-run", "uvicorn", "pusher.main:app", "--host", "0.0.0.0", "--port", "8080"] | ||
|