Skip to content

Commit

Permalink
kernel-gateway datadog logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 12, 2022
1 parent 029c539 commit 5bd83ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mpcontribs-kernel-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ ENV KG_PORT=10100

EXPOSE 10100
COPY make_seed.py .
RUN python make_seed.py
COPY start.sh .
RUN python make_seed.py && chmod +x start.sh

CMD wait-for-it.sh $DD_TRACE_HOST -s -t 60 -- ddtrace-run jupyter kernelgateway
ENV DD_SERVICE contribs-kernel-gateway
ENV DD_ENV prod
ENV DD_VERSION dev
LABEL com.datadoghq.ad.logs='[{"source": "gunicorn", "service": "contribs-kernel-gateway"}]'

CMD ./start.sh
9 changes: 9 additions & 0 deletions mpcontribs-kernel-gateway/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

pmgrc=$HOME/.pmgrc.yaml
[[ ! -e $pmgrc ]] && echo "PMG_DUMMY_VAR: dummy" > $pmgrc

exec wait-for-it.sh $DD_TRACE_HOST -s -q -t 60 -- ddtrace-run jupyter kernelgateway \
--KernelGatewayApp.log_format='%(asctime)s,%(msecs)03d %(levelname)s [%(name)s] [%(module)s:%(lineno)d] - %(message)s'


0 comments on commit 5bd83ec

Please sign in to comment.