You can use the below instructions if you want to run your app as a docker image.
The docker image uses a bash script (server_start.sh located in the root folder) to start the FastAPI application via Uvicorn. If you change the module or app name, update the script accordingly.
docker build -t collibra-data-catalog-plugin-python .At this point, we can run the docker image as a container via the run command and the name associated with the image during the build. This automatically enables OpenTelemetry automatic instrumentation:
docker run -d --name collibra-python-container -p 5002:5002 collibra-data-catalog-plugin-pythonHowever, for OpenTelemetry to work correctly, some environment variables need to be set in order to send collected data to an Observability backend (e.g. Prometheus).
- If you already have a Collector up and running, replace
<CollectorURL>with its URL (e.g.http://172.20.0.1:5555).
docker run -d --name collibra-python-container \
-e OTEL_EXPORTER_OTLP_ENDPOINT=<CollectorURL> \
-e OTEL_METRICS_EXPORTER=otlp \
-e OTEL_SERVICE_NAME=collibra-data-catalog-plugin \
-e OTEL_TRACES_EXPORTER=otlp \
-p 5002:5002 collibra-data-catalog-plugin-python- If you are running the collector in your local host (for example, by running the provided docker-compose file) then you can replace
<CollectorURL>with the hostname address, and the final command will look like the following:
docker run -d --name collibra-python-container \
-e OTEL_EXPORTER_OTLP_ENDPOINT=http://$(hostname -f):5555 \
-e OTEL_METRICS_EXPORTER=otlp \
-e OTEL_SERVICE_NAME=collibra-data-catalog-plugin \
-e OTEL_TRACES_EXPORTER=otlp \
-p 5002:5002 collibra-data-catalog-plugin-python