netdata / netdata

The open-source observability platform everyone needs!

Home Page:https://www.netdata.cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload source files to sentry.

vkalintiris opened this issue · comments

Summary

We need to add the logic we had in the rules file:

ifeq ($(ENABLE_SENTRY),true)
RELEASE_PIPELINE ?= Unknown
VERSION ?= Unknown
BUILD_DESTINATION ?= Unknown
SENTRY_CONFIG := -DENABLE_SENTRY=On \
-DNETDATA_SENTRY_ENVIRONMENT=$(RELEASE_PIPELINE) \
-DNETDATA_SENTRY_RELEASE=$(VERSION) \
-DNETDATA_SENTRY_DIST=$(BUILD_DESTINATION) \
-DNETDATA_SENTRY_DSN=$(SENTRY_DSN)
else
SENTRY_CONFIG := -DENABLE_SENTRY=Off
endif

if [ "${ENABLE_SENTRY}" = "true" ] && [ "${UPLOAD_SENTRY}" = "true" ]; then \
sentry-cli debug-files upload -o netdata-inc -p netdata-agent --force-foreground --log-level=debug --wait --include-sources /usr/src/netdata/debian/netdata/usr/sbin/netdata; \
fi

I think this should be placed under:

cmake --build "${BUILD_DIR}" --parallel "$(nproc)"

The new command should be something like:

sentry-cli debug-files upload -o netdata-inc -p netdata-agent --force-foreground --log-level=debug --wait --include-sources build/netdata