Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion milter/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,19 @@ fi
if [ "${OTEL_TRACING_ENABLED:-false}" = "true" ]; then
export OTEL_SERVICE_NAME="${OTEL_SERVICE_NAME:-milter}"
export OTEL_EXPORTER_OTLP_ENDPOINT="${OTEL_EXPORTER_OTLP_ENDPOINT:-http://localhost:4318}"
# The Dockerfile installs only the HTTP variant of the OTLP exporter
# (opentelemetry-exporter-otlp-proto-http). The OTel spec defaults
# the protocol to grpc, which makes opentelemetry-instrument try
# to load a gRPC exporter that isn't installed and raise:
# "Requested component 'otlp_proto_grpc' not found in entry
# point 'opentelemetry_traces_exporter'"
# Pin the protocol so the right exporter is selected.
export OTEL_EXPORTER_OTLP_PROTOCOL="${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}"
# tracecontext + baggage are the W3C-standard propagators; matches what
# ddtrace emits when DD_TRACE_PROPAGATION_STYLE includes tracecontext, so
# cross-service trace continuity holds regardless of which SDK is active.
export OTEL_PROPAGATORS="${OTEL_PROPAGATORS:-tracecontext,baggage}"
echo "OpenTelemetry tracing enabled (service=${OTEL_SERVICE_NAME}, endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT})"
echo "OpenTelemetry tracing enabled (service=${OTEL_SERVICE_NAME}, endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT}, protocol=${OTEL_EXPORTER_OTLP_PROTOCOL})"
fi

# Start the milter in background (MUST be running before Postfix starts).
Expand Down