# Instrument Docker Container running Jupyter Notebook

**URL:** <https://community.dynatrace.com/t/instrument-docker-container-running-jupyter-notebook/19090>\
**Category:** Container platforms\
**Tags:** oneagent, docker\
**Created:** [April 21, 2020, 5:28am UTC](https://community.dynatrace.com/t/instrument-docker-container-running-jupyter-notebook/19090 "2020-04-21T05:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rswarnka](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rswarnka/32/10979_2.png) [@rswarnka](https://community.dynatrace.com/u/rswarnka)\
**Post date:** [April 21, 2020, 5:28am UTC](https://community.dynatrace.com/t/instrument-docker-container-running-jupyter-notebook/19090/1 "2020-04-21T05:28:08Z")

</div>

Hello there,

Trying to instrument docker container running jupyter notebook.

```auto
docker run -it -d --rm -p 8888:8888 -v c:/docker/docker_data/:/rswarnka/ -e ONEAGENT_INSTALLER_SCRIPT_URL="https://tenant.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default&Api-Token=MyTocken" dynatrace/oneagent --set-app-log-content-access=true pyradix-python:v0.2 jupyter notebook --ip='*' --port=8888 --allow-root --NotebookApp.token='' --NotebookApp.password=''

```

However, container id is generated but exits immediately instead of continue to run. What is missing here?

---

<div class="post-metadata">

**Author:** ![mreider](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mreider/32/14971_2.png) [@mreider](https://community.dynatrace.com/u/mreider)\
**Post date:** [June 30, 2020, 5:16pm UTC](https://community.dynatrace.com/t/instrument-docker-container-running-jupyter-notebook/19090/2 "2020-06-30T17:16:14Z")

</div>

Hi there. I imagine you would have to use the Python SDK here. This would take some hackery, since the SDK requires you to create trace method on your own.

> **[GitHub - Dynatrace/OneAgent-SDK-for-Python: Enables custom tracing of Python applications in...](https://github.com/Dynatrace/OneAgent-SDK-for-Python#using-the-oneagent-sdk-for-python-in-your-application)**
>
> Enables custom tracing of Python applications in Dynatrace

---

<div class="post-metadata">

**Author:** ![dave\_mauney](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dave_mauney/32/27784_2.png) [@dave\_mauney](https://community.dynatrace.com/u/dave_mauney)\
**Post date:** [June 30, 2020, 5:23pm UTC](https://community.dynatrace.com/t/instrument-docker-container-running-jupyter-notebook/19090/3 "2020-06-30T17:23:49Z")

</div>

You might also want to check out this project on Github: [GitHub - dynatrace-oss/OneAgent-SDK-Python-AutoInstrumentation: autodynatrace, a python library that implements automatic instrumentation using the OneAgent SDK for Python · GitHub](https://github.com/dlopes7/autodynatrace)
