Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate datadog to pusher for logs and traces #1312

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gcp_backend_pusher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: ./backend/pusher/Dockerfile
file: ./backend/pusher/Dockerfile.datadog
push: true
tags: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:latest
cache-from: type=registry,ref=gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:buildcache
Expand Down
24 changes: 24 additions & 0 deletions backend/pusher/Dockerfile.datadog
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"]