25 Commits

Author SHA1 Message Date
Reinaldy Rafli
ebace8c662
fix: grep seaweedfs bucket name instead of using awk (#4076)
* fix: grep seaweedfs bucket name instead of using awk

Closes https://github.com/getsentry/self-hosted/issues/4075

* fix: inverted logic gate

* chore: file permission
2025-12-03 11:57:54 +00:00
Tony Xiao
84ebc583de
fix(profiling): Ingest profile file path (#4060)
* fix(profiling): Ingest profile file path

`ingest-profiles` is now using vroomrs to ingest profiles instead of writing
through vroom. For self-hosted, we need to make sure filestore for profiles is
properly configured so vroom can find the ingested profiles.

* feat: move profiling data to seaweedfs

* feat: review from Sentry

* Apply suggestions from code review

Co-authored-by: Burak Yigit Kaya <byk@sentry.io>

* ref: volume migration tests

* ref: execute file creation from vroom container

* fix: brainfart

* debug

* hack

* more debug

* now I know what I'm missing out

* explicitly state feature complete

* try to pull vroom image

* should only run when COMPOSE_PROFILES is feature complete

* using run invoked weed instead of empty shell

* execute the upload script from vroom container

* execute apt command as root

* gonna sleep

* missing endgroup

* missing sh

* directly execute s3cmd and do 'wc' outside out the container

* why did other test start failing

* manual cleanup

* vroom is not a persistent volume

* what about not removing the seaweed volume

---------

Co-authored-by: Reinaldy Rafli <github@reinaldyrafli.com>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
2025-11-28 14:30:28 +07:00
Amin Vakil
e1f003313e
Remove symbolicator external volume (#3992)
* Remove symbolicator volume creation command

* Remove symbolicator volume

* Create sentry-symbolicator on docker compose up

* Pass volume name to remove_command

* Remove sentry-symbolicator from unit test
2025-10-10 09:14:41 +07:00
Reinaldy Rafli
a222e3f8de
fix: able to setup nodestore multiple times (#3940)
* fix: able to setup nodestore multiple times

* fix(test): chmod issues
2025-09-16 15:01:13 +00:00
Burak Yigit Kaya
84f904f7a1
feat: Use S3 node store with seaweedfs (#3498)
* feat: Use S3 node store with garage

* lol, fix bash

* moar bash

* lol

* hate bash

* fix moar bash

* Add healthcheck to garage service

Co-authored-by: Reinaldy Rafli <aldy505@proton.me>

* revert +x

* fix healthcheck, fix config

* add env var for garage size

* use better compression level

* simpler garage config

* add migration support

* feat: use seaweedfs as nodestore backend (#3842)

* feat: seaweedfs as s3 nodestore backend

* fix: 'server' was missing for seaweed

* feat: remove minimum volume free space

* feat: specify hostname on ip

* fix: grpc port on seaweed should be `-{service}.port.grpc` instead of `-{service}.grpcPort`

* fix: wrong access key & secret key; use localhost for internal comms

* fix: create index directory

* test: add sentry-seaweedfs volume into expected volumes

* debug: aaaaaaaaaaaaaaaaaaaaaaarrrrggggggghhhhhhhhhhhhhhh

* test: correct ordering for expected volumes

* chore: seaweedfs healthcheck to multiple urls

See https://stackoverflow.com/a/14578575/3153224

* chore: add swap for arm64 runners

* ci: debug memory issues for arm64 runners

* ci: turn off swapfile first

Turns out the arm64 runners already have 3GB of swap

* feat: nodestore config update behind a prompt/flag

* feat: set s3 lifecycle policy

* fix: seaweed is a busybox

* fix: try xml policy

* fix: go back to simplified json

* Revert "fix: go back to simplified json"

This reverts commit 2f1575dfe33db6f781b09d09b01f5382716b8826.

* chore: reword debug lifecycle policy

* fix: don't pollute APPLY_AUTOMATIC_CONFIG_UPDATES variable

---------

Co-authored-by: Reinaldy Rafli <github@reinaldyrafli.com>
2025-09-13 07:48:56 +07:00
Reinaldy Rafli
2e7a3ff7ad
feat: install script to migrate sentry.conf.py config to use pgbouncer (#3898) 2025-09-12 21:02:59 +07:00
Burak Yigit Kaya
433eed8fb7
ref(js-assets): Simplify how we call nginx container (#3761) 2025-06-18 04:47:23 +07:00
Reinaldy Rafli
d350bd4b7d
fix: js-sdk directory/file permission should be set correctly (#3616) 2025-03-18 12:26:48 +00:00
Reinaldy Rafli
ee3cbf0f91
feat: merge .env and .env.custom file during installation (#3564)
Closes https://github.com/getsentry/self-hosted/issues/3558
2025-02-04 12:41:12 +00:00
Burak Yigit Kaya
559e732468
breaking: Upgrade min Compose version to 2.23.2 (#3535)
In this version, there's a new `--pull` argument for `docker compose run` which we will start leveraging, especially with `sentry-admin` command.

Should come with a slight speed boost.
2025-01-16 21:45:07 +00:00
Burak Yigit Kaya
49e30a7356
fix: Use js.sentry-cdn.com for JS SDK downloads (#3417)
Since we download JS SDKs in a for loop which invokes a separate docker container for each `curl` run, we seem to be triggering some sort of a DoS protection. And rightfully so as the old method causes TCP and TLS churn although we advertise we support HTTP/1.1 and HTTP/2.

This patch does a few things:

1. Uses `curl`s globbing support to download all files in one go, maxing TCP and TLS reuse. This should fix the DoS protection
2. Uses `curl`'s `--compress` option to make things even more efficient
3. Uses `curl`'s `--create-dirs` to save 1 docker container run per version for creating the directory
4. Removes the `-I` `HEAD` checks in favor of a `-f` fail option combined with `|| true` which makes curl fail and not write the output on a non-200 response while still allowing the script to succeed
5. To make sure the above approach works, it adds a file size test, requiring all downloaded files to be larger than 1kB
2024-11-07 12:25:53 +00:00
Reinaldy Rafli
2a7abf215e
fix(loader): provide js sdk assets from 4.x (#3415)
Hopefully fixes https://github.com/getsentry/sentry/issues/22715#issuecomment-2458066842

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
2024-11-07 10:11:07 +00:00
Reinaldy Rafli
5910c02cc4
ref: allow hosted js sdk bundles (#3365)
* ref: allow hosted js sdk bundles


---------

Co-authored-by: Burak Yigit Kaya <ben@byk.im>
2024-10-07 16:03:28 -07:00
Hubert Deng
0ce7b00b2a
Migrate to zookeeper-less kafka (#3263)
* migrate to kraft

* fix syntax error

* move zookeeper volume removal to end of installation
2024-08-13 14:14:11 -07:00
Hubert Deng
48c30b08c0
Revert "feat: upgrade to zookeeper-less kafka (#2445)" (#2500)
This reverts commit a177142f3569dbd05dc6934eb13d1a40f615bb07.
2023-10-19 12:22:35 -07:00
Joshua Li
a177142f35
feat: upgrade to zookeeper-less kafka (#2445)
* upgrade to zookeeper-less kafka

* clean up sentry-zookeeper volume if it exists

---------

Co-authored-by: hubertdeng123 <hubertdeng123@gmail.com>
2023-10-17 13:50:12 -07:00
Chad Whitacre
27c9cc7594
Fix error fingerprinting (#2237) 2023-06-27 02:20:32 +00:00
Pierre Massat
e07be386ee
feat(profiling): Run profiling on self-hosted (#2154) 2023-06-02 13:58:49 +00:00
Benedikt Franke
ec4f416c26
Reference paths relative to project root (#1800)
* Reference paths relative to the current script or project root

Before this PR:
- some scripts change the current working directory and use relative paths
- different approaches are taken to know which directory a script is running in
- paths are sometimes relative, sometimes absolute, sometimes traversing directories

After this PR:
- scripts do neither change nor care much about the current working directory
- a unified approach determines the directory of the current script
- paths are always relative to the project root

This should resolve an issue I already tried to fix with https://github.com/getsentry/self-hosted/pull/1798,
where the contents of `./sentry` were not copied
into the built container image,
thus `enhance-image.sh` did not apply.

Co-authored-by: Amin Vakil <info@aminvakil.com>
2023-02-17 09:59:48 -08:00
Ethan Smith
47ea7a0346
ref: Move jq build to error-handling.sh, and use proxy config (#1895)
This fixes [errors early in the installer run not getting reported correctly](https://github.com/getsentry/self-hosted/issues/1884) and [jq's docker build not using the proxy config correctly](https://github.com/getsentry/self-hosted/issues/1871)
2023-01-06 12:11:58 -08:00
Ethan Smith
433afd9397
Fix jq usage (#1814)
In this PR we fix our usage of jq:
1. Use the container. Before we were accidentally using jq installed in the environment
1. Rewrite generate_breadcrumb_json to read log file all at once
1. Build docker image for jq in unit tests
2022-11-15 13:36:23 -08:00
Hubert Deng
97a4e5cce4
Add context line, error msg to envelope (#1784)
* add context line, error msg to envelope
2022-11-04 08:38:44 -07:00
Ethan Smith
3a07ff4884
Upload end of log as breadcrumbs, use exceptions and stacktrace (#1775)
In this PR, we change the send-event function to write out more information into the envelope we send via sentry-cli, particularly adding breadcrumbs with the end of the log and giving the stack trace in a format Sentry self-hosted can understand.

Fixes getsentry/team-ospo#54 and getsentry/team-ospo#53
Example issue with this formatting: https://self-hosted.getsentry.net/organizations/self-hosted/issues/227/?query=is%3Aunresolved
2022-10-26 14:15:32 -07:00
Ethan Smith
6b9306a17c
Add pre-commit config (#1738) 2022-10-21 13:46:35 -07:00
Hubert Deng
871c5f6092
Reorganize unit test layout (#1729)
* fix failing unit tests

* fix unit test pipeline

* add newline to unit-test file

* preserve semantics from docker volume test

* add error-handling tests

* reorganize file structure of unit tests

* add comment for using _file format in ensure relay credentials test

* add error handling unit tests

* use unit-test directory

* stack trace should be from the unit test directory

* Slightly better fail signal

* Clearer start as well

Co-authored-by: Chad Whitacre <chadwhitacre@sentry.io>
2022-09-29 14:48:48 -07:00