diff --git a/Dockerfile b/Dockerfile index b917ab0..ec7b7d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,18 +28,24 @@ RUN if [ "$INSTALL_DDTRACE" = "true" ]; then \ # Optional: OpenTelemetry tracing (enabled via OTEL_TRACING_ENABLED=true at runtime). # Parallel to ddtrace — deployer picks one at runtime; both can be installed. # -# Auto-instrumentation packages match the libraries primitivemail uses so the -# OTel path produces the same span graph ddtrace's auto-instrumentation does: -# urllib3 — outbound HTTP (webhook + HTTP-style storage uploads) -# botocore — boto3 (S3 native uploads) -# logging — adds otelTraceID/otelSpanID to LogRecord for log-trace correlation -# dnspython — DNS lookups during SPF/DKIM/DMARC checks +# Auto-instrumentation packages match the libraries primitivemail uses +# so the OTel path produces the same span graph ddtrace's +# auto-instrumentation does for those libraries: +# urllib3 — outbound HTTP (webhook + HTTP-style storage uploads) +# botocore — boto3 (S3 native uploads) +# logging — adds otelTraceID/otelSpanID to LogRecord for log-trace +# correlation # The opentelemetry-distro package supplies the `opentelemetry-instrument` # CLI wrapper used by entrypoint.sh to activate everything at startup. # +# Note: there's no upstream OTel auto-instrumentation for `dnspython`, +# so DNS lookups during SPF/DKIM/DMARC checks don't get their own +# spans. The manual milter.process_email parent span still wraps them +# — we lose per-call breakdown, not trace context. +# # Auto-instrumentations can be disabled per-library via -# OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=urllib3,botocore,... if a deployer -# wants only the manual spans. +# OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=urllib3,botocore,logging if a +# deployer wants only the manual spans. ARG INSTALL_OTEL=false RUN if [ "$INSTALL_OTEL" = "true" ]; then \ pip3 install --no-cache-dir \ @@ -49,8 +55,7 @@ RUN if [ "$INSTALL_OTEL" = "true" ]; then \ 'opentelemetry-distro>=0.48b0,<1' \ 'opentelemetry-instrumentation-urllib3>=0.48b0,<1' \ 'opentelemetry-instrumentation-botocore>=0.48b0,<1' \ - 'opentelemetry-instrumentation-logging>=0.48b0,<1' \ - 'opentelemetry-instrumentation-dnspython>=0.48b0,<1'; \ + 'opentelemetry-instrumentation-logging>=0.48b0,<1'; \ fi # Work dir for our scripts/config