diff --git a/docling_serve/gradio_ui.py b/docling_serve/gradio_ui.py index 58d556c..de02294 100644 --- a/docling_serve/gradio_ui.py +++ b/docling_serve/gradio_ui.py @@ -400,7 +400,6 @@ def process_url( if docling_serve_settings.api_key: headers["X-Api-Key"] = str(auth) - print(f"{headers=}") try: ssl_ctx = get_ssl_context() response = httpx.post( diff --git a/docling_serve/settings.py b/docling_serve/settings.py index 8cd298c..dcdd43a 100644 --- a/docling_serve/settings.py +++ b/docling_serve/settings.py @@ -93,7 +93,7 @@ class DoclingServeSettings(BaseSettings): # OpenTelemetry settings otel_enable_metrics: bool = True - otel_enable_traces: bool = True + otel_enable_traces: bool = False otel_enable_prometheus: bool = True otel_enable_otlp_metrics: bool = False otel_service_name: str = "docling-serve" diff --git a/docs/configuration.md b/docs/configuration.md index 06de940..5ccbcf3 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -113,9 +113,22 @@ The following table describes the options to configure the Docling Serve KFP eng | `DOCLING_SERVE_ENG_KFP_SELF_CALLBACK_TOKEN_PATH` | | The token used for authenticating the progress callback. For cluster-internal workloads, use `/run/secrets/kubernetes.io/serviceaccount/token`. | | `DOCLING_SERVE_ENG_KFP_SELF_CALLBACK_CA_CERT_PATH` | | The CA certificate for the progress callback. For cluster-inetrnal workloads, use `/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt`. | -#### Gradio UI +### Gradio UI When using Gradio UI and using the option to output conversion as file, Gradio uses cache to prevent files to be overwritten ([more info here](https://www.gradio.app/guides/file-access#the-gradio-cache)), and we defined the cache clean frequency of one hour to clean files older than 10hours. For situations that files need to be available to download from UI older than 10 hours, there is two options: - Increase the older age of files to clean [here](https://github.com/docling-project/docling-serve/blob/main/docling_serve/gradio_ui.py#L483) to suffice the age desired; - Or set the clean up manually by defining the temporary dir of Gradio to use the same as `DOCLING_SERVE_SCRATCH_PATH` absolute path. This can be achieved by setting the environment variable `GRADIO_TEMP_DIR`, that can be done via command line `export GRADIO_TEMP_DIR=""` or in `Dockerfile` using `ENV GRADIO_TEMP_DIR=""`. After this, set the clean of cache to `None` [here](https://github.com/docling-project/docling-serve/blob/main/docling_serve/gradio_ui.py#L483). Now, the clean up of `DOCLING_SERVE_SCRATCH_PATH` will also clean the Gradio temporary dir. (If you use this option, please remember when reversing changes to remove the environment variable `GRADIO_TEMP_DIR`, otherwise may lead to files not be available to download). + +### Telemetry + +THe following table describes the telemetry options for the Docling Serve app. Some deployment examples are available in [examples/OTEL.md](../examples/OTEL.md). + +ENV | Default | Description | +|-----|---------|-------------| +| `DOCLING_SERVE_OTEL_ENABLE_METRICS` | true | Enable metrics collection. | +| `DOCLING_SERVE_OTEL_ENABLE_TRACES` | false | Enable trace collection. Requires a valid value for `OTEL_EXPORTER_OTLP_ENDPOINT`. | +| `DOCLING_SERVE_OTEL_ENABLE_PROMETHEUS` | true | Enable Prometheus /metrics endpoint. | +| `DOCLING_SERVE_OTEL_ENABLE_OTLP_METRICS` | `false` | Enable OTLP metrics export. | +| `DOCLING_SERVE_OTEL_SERVICE_NAME` | docling-serve | Service identification. | +| `OTEL_EXPORTER_OTLP_ENDPOINT` | | OTLP endpoint (for traces and optional metrics). |