From 98f0b43a746b9ea12afc6d7ac65b0ed5195daf35 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 18 May 2026 21:28:21 +0700 Subject: [PATCH 1/5] feat: optional chartcuterie service & profile --- docker-compose.yml | 8 +++++++- sentry/sentry.conf.example.py | 23 ++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f5593891047..0b603cd78a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -852,7 +852,13 @@ services: <<: *depends_on-healthy profiles: - feature-complete - + chartcuterie: + <<: [*restart_policy, *pull_policy] + image: "$CHARTCUTERIE_IMAGE" + environment: + CHARTCUTERIE_CONFIG: "http://web:9000/_chartcuterie-config.js" + profiles: + - chartcuterie volumes: # These store application data that should persist across restarts. sentry-data: diff --git a/sentry/sentry.conf.example.py b/sentry/sentry.conf.example.py index 6d1312ffa42..077d965686c 100644 --- a/sentry/sentry.conf.example.py +++ b/sentry/sentry.conf.example.py @@ -93,7 +93,7 @@ def get_internal_network(): # `COMPOSE_PROFILES` to `errors-only`. # # See https://develop.sentry.dev/self-hosted/optional-features/errors-only/ -SENTRY_SELF_HOSTED_ERRORS_ONLY = env("COMPOSE_PROFILES") != "feature-complete" +SENTRY_SELF_HOSTED_ERRORS_ONLY = "errors-only" in env("COMPOSE_PROFILES") # When running in an air-gapped environment, set this to True to entirely disable # external network calls and features that require Internet connectivity. @@ -448,6 +448,27 @@ def get_internal_network(): } ) +################ +# Chartcuterie # +################ + +# Chartcuterie is a service that generates charts outside browser environment. +# It is used pretty much to create charts for metric alerts for Slack integration. +# At the time of writing, there are no other use case that depends on Chartcuterie. +# +# To enable it, add `chartcuterie` to `COMPOSE_PROFILES` in your `.env` file. +# An example would be: +# ```env +# COMPOSE_PROFILES=feature-complete,chartcuterie +# ``` + +if "chartcuterie" in env("COMPOSE_PROFILES"): + SENTRY_FEATURES["organizations:metric-alert-chartcuterie"] = True + SENTRY_OPTIONS["chart-rendering.enabled"] = True + SENTRY_OPTIONS["chart-rendering.chartcuterie"] = { + "url": "http://chartcuterie:9090" + } + ####################### # MaxMind Integration # ####################### From 900d25f928bab5419846cd21d10896186243dc3e Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 18 May 2026 21:32:45 +0700 Subject: [PATCH 2/5] feat: register CHARTCUTERIE_IMAGE variable everywhere --- .env | 1 + .github/ISSUE_TEMPLATE/release.yml | 1 + install/update-docker-images.sh | 4 ++++ scripts/bump-version.sh | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 483f3748751..2e488dd5aaf 100644 --- a/.env +++ b/.env @@ -20,6 +20,7 @@ TASKBROKER_IMAGE=ghcr.io/getsentry/taskbroker:nightly VROOM_IMAGE=ghcr.io/getsentry/vroom:nightly UPTIME_CHECKER_IMAGE=ghcr.io/getsentry/uptime-checker:nightly LAUNCHPAD_IMAGE=ghcr.io/getsentry/launchpad:nightly +CHARTCUTERIE_IMAGE=ghcr.io/getsentry/chartcuterie:nightly HEALTHCHECK_INTERVAL=30s HEALTHCHECK_TIMEOUT=1m30s HEALTHCHECK_RETRIES=10 diff --git a/.github/ISSUE_TEMPLATE/release.yml b/.github/ISSUE_TEMPLATE/release.yml index 13d31e431a3..182e45901db 100644 --- a/.github/ISSUE_TEMPLATE/release.yml +++ b/.github/ISSUE_TEMPLATE/release.yml @@ -18,6 +18,7 @@ body: - [ ] [`uptime-checker`](https://github.com/getsentry/uptime-checker/actions/workflows/release.yml) - [ ] [`taskbroker`](https://github.com/getsentry/taskbroker/actions/workflows/release.yml) - [ ] [`launchpad`](https://github.com/getsentry/launchpad/actions/workflows/release.yml) + - [ ] [`chartcuterie`](https://github.com/getsentry/chartcuterie/actions/workflows/release.yml) - [ ] Release self-hosted. - [ ] [Prepare the `self-hosted` release](https://github.com/getsentry/self-hosted/actions/workflows/release.yml) (_replace with publish issue repo link_). - [ ] Check to make sure the new release branch in self-hosted includes the appropriate CalVer images. diff --git a/install/update-docker-images.sh b/install/update-docker-images.sh index 34ddf484b6b..1ce5f89165e 100644 --- a/install/update-docker-images.sh +++ b/install/update-docker-images.sh @@ -24,4 +24,8 @@ $CONTAINER_ENGINE pull ${VROOM_IMAGE} || true $CONTAINER_ENGINE pull ${UPTIME_CHECKER_IMAGE} || true $CONTAINER_ENGINE pull ${LAUNCHPAD_IMAGE} || true +if [[ "$COMPOSE_PROFILES" == *"chartcuterie"* ]]; then + $CONTAINER_ENGINE pull ${CHARTCUTERIE_IMAGE} || true +fi + echo "${_endgroup}" diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 3514c5cca1a..64b6fa127c6 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -6,7 +6,7 @@ set -eu OLD_VERSION="${CRAFT_OLD_VERSION:-${1:-}}" NEW_VERSION="${CRAFT_NEW_VERSION:-${2:-}}" -sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|TASKBROKER\|VROOM\|UPTIME_CHECKER\|LAUNCHPAD\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env +sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|TASKBROKER\|VROOM\|UPTIME_CHECKER\|LAUNCHPAD\|CHARTCUTERIE\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env sed -i -e "s/^# Self-Hosted Sentry.*/# Self-Hosted Sentry $NEW_VERSION/" README.md [ -z "$OLD_VERSION" ] || echo "Previous version: $OLD_VERSION" From cc7696245b9ebbd7450280f948052c42dcd9daf4 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Tue, 19 May 2026 15:01:43 +0700 Subject: [PATCH 3/5] feat(ci): test out errors-only,chartcuterie profile --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e24bdca5251..a55f7310e4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,8 +45,8 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm] container_engine: ['docker'] # TODO: add 'podman' into the list - compose_profiles: ['feature-complete', 'errors-only'] - name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'errors-only' && ' (errors-only)' || '') }} + compose_profiles: ['feature-complete', 'errors-only', 'errors-only,chartcuterie'] + name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'feature-complete' && '' || format(' ({0})', matrix.compose_profiles) ) }} env: REPORT_SELF_HOSTED_ISSUES: 0 SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }} From f430caa7fae13a26778a3df2af9f3d3a9377f392 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Tue, 19 May 2026 15:07:16 +0700 Subject: [PATCH 4/5] fix(ci): compose profile guard --- .github/workflows/test.yml | 2 +- action.yaml | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a55f7310e4c..b1809c345d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: os: [ubuntu-24.04, ubuntu-24.04-arm] container_engine: ['docker'] # TODO: add 'podman' into the list compose_profiles: ['feature-complete', 'errors-only', 'errors-only,chartcuterie'] - name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'feature-complete' && '' || format(' ({0})', matrix.compose_profiles) ) }} + name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles != 'feature-complete' && format(' ({0})', matrix.compose_profiles) || '' ) }} env: REPORT_SELF_HOSTED_ISSUES: 0 SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }} diff --git a/action.yaml b/action.yaml index 49416a571ff..65743c6eeda 100644 --- a/action.yaml +++ b/action.yaml @@ -53,13 +53,8 @@ runs: exit 1 fi - # `COMPOSE_PROFILES` may only be `feature-complete` or `errors-only` - if [[ "$COMPOSE_PROFILES" != "" && "$COMPOSE_PROFILES" != "feature-complete" && "$COMPOSE_PROFILES" != "errors-only" ]]; then - echo "COMPOSE_PROFILES must be either unset, or set to either 'feature-complete' or 'errors-only'." - exit 1 - else - echo "COMPOSE_PROFILES=$COMPOSE_PROFILES" >> ${{ github.action_path }}/.env - fi + # Compose profiles can be anything at this point + echo "COMPOSE_PROFILES=$COMPOSE_PROFILES" >> ${{ github.action_path }}/.env - name: Cleanup runner image shell: bash From 96b4a6e8ef5d8593c8b813a0dca4de1668e13fe9 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Tue, 19 May 2026 15:13:48 +0700 Subject: [PATCH 5/5] fix(ci): make it able to cache chartcuterie --- action.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/action.yaml b/action.yaml index 65743c6eeda..0906c4b2458 100644 --- a/action.yaml +++ b/action.yaml @@ -56,6 +56,9 @@ runs: # Compose profiles can be anything at this point echo "COMPOSE_PROFILES=$COMPOSE_PROFILES" >> ${{ github.action_path }}/.env + # Cleanup compose profile string, it must not contains commas. Therefore we replace it with dashes. + echo "COMPOSE_PROFILES_CLEAN=${COMPOSE_PROFILES//,/-}" >> "$GITHUB_ENV" + - name: Cleanup runner image shell: bash run: | @@ -118,9 +121,9 @@ runs: id: restore_cache_sentry uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 with: - key: db-volumes-sentry-v3-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} + key: db-volumes-sentry-v3-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} restore-keys: | - key: db-volumes-sentry-v3-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }} + key: db-volumes-sentry-v3-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }} volumes: | sentry-postgres @@ -129,9 +132,9 @@ runs: id: restore_cache_snuba uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 with: - key: db-volumes-snuba-v3-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }}-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }} + key: db-volumes-snuba-v3-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }}-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }} restore-keys: | - key: db-volumes-snuba-v3-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }} + key: db-volumes-snuba-v3-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }} volumes: | sentry-clickhouse @@ -140,10 +143,10 @@ runs: id: restore_cache_kafka uses: BYK/docker-volume-cache-action/restore@0efa5cf5178c9906cb46ed8d1a357df8fd6b1a06 with: - key: db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }}-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }} + key: db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }}-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }} restore-keys: | - db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} - db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ inputs.compose_profiles }} + db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} + db-volumes-kafka-v2-${{ steps.cache_key.outputs.ARCH }}-${{ env.COMPOSE_PROFILES_CLEAN }} volumes: | sentry-kafka @@ -221,7 +224,7 @@ runs: npm ci - name: Setup required Emerge Tools files - if: inputs.compose_profiles == 'feature-complete' + if: contains(inputs.compose_profiles, 'feature-complete') shell: bash run: | set -euo pipefail