-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(profiling): Run profiling on self-hosted #2154
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
Changes from all commits
17ac35b
d919885
7f82276
0cc8b66
e01c431
d608f0c
a006a3a
8aa571c
c47f62f
4564d44
36daec3
d079095
90dffe1
ce11a29
591d48d
35e98ad
35eeb82
1b85e47
6ffa0a5
f4e4c0a
9861b63
419cdc1
d5997b9
58838d7
9e28cef
a540847
40198e9
a49a5ed
a701258
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{"event_id":"66578634d48d433db0ad52882d1efe5b","sent_at":"2023-05-17T14:54:31.057Z","sdk":{"name":"sentry.javascript.node","version":"7.46.0"},"trace":{"environment":"production","transaction":"fib: sourcemaps here","public_key":"05ab86aebbe14a24bcab62caa839cf27","trace_id":"33321bfbd5304bcc9663d1b53b08f84e","sample_rate":"1"}} | ||
{"type":"transaction"} | ||
{"contexts":{"profile":{"profile_id":"e73aaf1f29b24812be60132f32d09f92"},"trace":{"op":"test","span_id":"b38f2b24537c3858","trace_id":"33321bfbd5304bcc9663d1b53b08f84e"},"runtime":{"name":"node","version":"v16.16.0"},"app":{"app_start_time":"2023-05-17T14:54:27.678Z","app_memory":57966592},"os":{"kernel_version":"22.3.0","name":"macOS","version":"13.2","build":"22D49"},"device":{"boot_time":"2023-05-12T15:08:41.047Z","arch":"arm64","memory_size":34359738368,"free_memory":6861651968,"processor_count":10,"cpu_description":"Apple M1 Pro","processor_frequency":24},"culture":{"locale":"en-US","timezone":"America/New_York"}},"spans":[],"start_timestamp":1684335267.744,"tags":{},"timestamp":1684335271.033,"transaction":"fib: sourcemaps here","type":"transaction","transaction_info":{"source":"custom"},"platform":"node","server_name":"TK6G745PW1.local","event_id":"66578634d48d433db0ad52882d1efe5b","environment":"production","sdk":{"integrations":["InboundFilters","FunctionToString","Console","Http","OnUncaughtException","OnUnhandledRejection","ContextLines","LocalVariables","Context","Modules","RequestData","LinkedErrors","ProfilingIntegration"],"name":"sentry.javascript.node","version":"7.46.0","packages":[{"name":"npm:@sentry/node","version":"7.46.0"}]},"debug_meta":{"images":[]},"modules":{}} | ||
{"type":"profile"} | ||
{"event_id":"e73aaf1f29b24812be60132f32d09f92","timestamp":"2023-05-17T14:54:27.744Z","platform":"node","version":"1","release":"","environment":"production","runtime":{"name":"node","version":"16.16.0"},"os":{"name":"darwin","version":"22.3.0","build_number":"Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000"},"device":{"locale":"en_US.UTF-8","model":"arm64","manufacturer":"Darwin","architecture":"arm64","is_emulator":false},"debug_meta":{"images":[]},"profile":{"samples":[{"stack_id":0,"thread_id":"0","elapsed_since_start_ns":125000},{"stack_id":0,"thread_id":"0","elapsed_since_start_ns":13958000}],"frames":[{"lineno":14129,"colno":17,"function":"startProfiling","abs_path":"/Users/jonasbadalic/code/node-profiler/lib/index.js"}],"stacks":[[0]],"thread_metadata":{"0":{"name":"main"}}},"transaction":{"name":"fib: sourcemaps here","id":"66578634d48d433db0ad52882d1efe5b","trace_id":"33321bfbd5304bcc9663d1b53b08f84e","active_thread_id":"0"}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,15 @@ x-sentry-defaults: &sentry_defaults | |
<<: *depends_on-default | ||
symbolicator: | ||
<<: *depends_on-default | ||
vroom: | ||
<<: *depends_on-default | ||
entrypoint: "/etc/sentry/entrypoint.sh" | ||
command: ["run", "web"] | ||
environment: | ||
PYTHONUSERBASE: "/data/custom-packages" | ||
SENTRY_CONF: "/etc/sentry" | ||
SNUBA: "http://snuba-api:1218" | ||
VROOM: "http://vroom:8085" | ||
# Force everything to use the system CA bundle | ||
# This is mostly needed to support installing custom CA certs | ||
# This one is used by botocore | ||
|
@@ -283,6 +286,12 @@ services: | |
snuba-subscription-consumer-transactions: | ||
<<: *snuba_defaults | ||
command: subscriptions-scheduler-executor --dataset transactions --entity transactions --auto-offset-reset=latest --no-strict-offset-reset --consumer-group=snuba-transactions-subscriptions-consumers --followed-consumer-group=transactions_group --delay-seconds=60 --schedule-ttl=60 --stale-threshold-seconds=900 | ||
snuba-profiling-profiles-consumer: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yay, more snuba containers! Let's add another strike to getsentry/snuba#1670 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm counting 36 containers total. This is somewhat frightening. |
||
<<: *snuba_defaults | ||
command: consumer --storage profiles --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset | ||
snuba-profiling-functions-consumer: | ||
<<: *snuba_defaults | ||
command: consumer --storage functions_raw --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset | ||
symbolicator: | ||
<<: *restart_policy | ||
image: "$SYMBOLICATOR_IMAGE" | ||
|
@@ -329,10 +338,12 @@ services: | |
ingest-replay-recordings: | ||
<<: *sentry_defaults | ||
command: run ingest-replay-recordings | ||
ingest-profiles: | ||
<<: *sentry_defaults | ||
command: run ingest-profiles --no-strict-offset-reset | ||
post-process-forwarder-errors: | ||
<<: *sentry_defaults | ||
command: run post-process-forwarder --entity errors | ||
|
||
post-process-forwarder-transactions: | ||
<<: *sentry_defaults | ||
command: run post-process-forwarder --entity transactions --commit-log-topic=snuba-transactions-commit-log --synchronize-commit-group transactions_group | ||
|
@@ -384,6 +395,19 @@ services: | |
<<: *depends_on-healthy | ||
web: | ||
<<: *depends_on-healthy | ||
vroom: | ||
phacops marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<<: *restart_policy | ||
image: "$VROOM_IMAGE" | ||
environment: | ||
SENTRY_KAFKA_BROKERS_PROFILING: "kafka:9092" | ||
SENTRY_KAFKA_BROKERS_OCCURRENCES: "kafka:9092" | ||
SENTRY_BUCKET_PROFILES: file://localhost//var/lib/sentry-profiles | ||
phacops marked this conversation as resolved.
Show resolved
Hide resolved
|
||
SENTRY_SNUBA_HOST: "http://snuba-api:1218" | ||
volumes: | ||
- sentry-vroom:/var/lib/sentry-profiles | ||
depends_on: | ||
kafka: | ||
<<: *depends_on-healthy | ||
volumes: | ||
# These store application data that should persist across restarts. | ||
sentry-data: | ||
|
@@ -400,8 +424,12 @@ volumes: | |
external: true | ||
sentry-symbolicator: | ||
external: true | ||
|
||
# This volume stores profiles and should be persisted. | ||
# Not being external will still persist data across restarts. | ||
# It won't persist if someone does a docker compose down -v. | ||
sentry-vroom: | ||
# These store ephemeral data that needn't persist across restarts. | ||
phacops marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# That said, volumes will be persisted across restarts until they are deleted. | ||
sentry-secrets: | ||
sentry-smtp: | ||
sentry-nginx-cache: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ NEW_VERSION="$2" | |
WAL2JSON_VERSION=${WAL2JSON_VERSION:-$(curl -s "https://api.github.com/repos/getsentry/wal2json/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')} | ||
|
||
sed -i -e "s/^WAL2JSON_VERSION=\([^:]\+\):.\+\$/WAL2JSON_VERSION=\1:$WAL2JSON_VERSION/" .env | ||
sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env | ||
sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR|VROOM\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should consider making this a blocklist now since almost all images get updated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #2207 ftr, missing escape of the |
||
sed -i -e "s/^\# Self-Hosted Sentry .*/# Self-Hosted Sentry $NEW_VERSION/" README.md | ||
sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why this was ever duplicated even after looking through the file history, and tests seem to be passing fine without it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe testing for duplicate volume creation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was to make sure trying to create volumes over and over again does not error. I think, since we run the whole installation twice now, this is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, safe to remove then