-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 0.98.x tar.gz file size increased? #2599
Comments
Hey @brandonburkett, We've decided to keep full debug symbols of the rust code to enhance debuggability in case there are issues. However, this comes, as you noticed at the cost of a size increase. To avoid the particular issue with /tmp space being exceeded, you can specify a different temp directory: I'll keep this issue open so that we invest into splitting the .tar.gz up or using other strategies. |
I slightly improved the situation in v1.1.0. Here are the sizes for the
It's still over 400 MiB, so we plan to continue working on this. |
We worked around it by copying only the necessary files and using them in our final Docker image with this script: cd $(mktemp -d)
curl -Lo datadog-php-tracer.apk https://github.com/DataDog/dd-trace-php/releases/download/${DATADOG_TRACER_VERSION}/datadog-php-tracer_${DATADOG_TRACER_VERSION}_$(uname -m).apk
apk add datadog-php-tracer.apk --allow-untrusted
PHP_API=$(php -i | grep "PHP API" | awk '{split($0,a,"=>"); print a[2]}' | xargs)
DD_TRACER_EXTENSION="/opt/datadog-php/extensions/ddtrace-${PHP_API}-alpine.so"
for filename in /opt/datadog-php/extensions/*; do
[ -e "${filename}" ] || continue
if [ "${filename}" = "${DD_TRACER_EXTENSION}" ]; then continue; fi
rm -f "${filename}"
done
mkdir /tmp/ddtracer
for filename in $(apk info -L datadog-php-tracer); do
[ -e "/${filename}" ] || continue
cp -p --parents "/${filename}" /tmp/ddtracer
done
cp -p --parents /usr/local/etc/php/conf.d/98-ddtrace.ini /tmp/ddtracer We use in combination with Our images are down to <70MB. |
the Alpine apk installation leaves all unneded bundled extension binaries in place:
|
This is really unacceptable, our docker image with BTW: maybe using https://github.com/DataDog/dd-trace-php/releases/latest/download/datadog-setup.php is a good alternative. |
@razvanphp If you use the docker image, you probably should download, use dpkg and remove the .deb file in the same dockerfile RUN line, to avoids storing the whole .deb file in the image itself. |
I do that already, still the sizes above. I think you should publish separate
BTW,
|
Oh, you are right, sorry. This is the .deb. I suppose we need to strip the extensions we don't install somehow. The problem with separate -dbg.deb packages is that it's going to defeat the point of crashtracking which #2763 will introduce: we want to automatically collect fully symbolicated dumps (meaning we need at least line tables). |
While I totally understand the reasoning why you would need this, please imagine what this does for an infrastructure where we deploy thousands of containers, each of them with a size of 1 GB; not counting the repo traffic cost, the time it takes for one container to come up is exponential with the size. |
datadog-setup.php is now split in individual small packages, downloading less than 50 MB for single version installs. |
Bug report
With version 0.97 and below, the tar.gz file size was around 135mb, but with 0.98 release, I see it is up to 400mb+. Our elastic beanstalk default /tmp only has
924M
without attempting to give /tmp more space.In short,
php datadog-setup.php --php-bin=all
is failing because /tmp is out of disk space while trying to untar, which was not a problem with 0.97 and below.PHP version
8.2.15
Tracer or profiler version
0.98.x
Installed extensions
No response
Output of
phpinfo()
No response
Upgrading from
No response
The text was updated successfully, but these errors were encountered: