Skip to content

Commit e3723e7

Browse files
chore(devservices): Add additional devservices modes and commands (#14064)
## DESCRIBE YOUR PR This PR adds some descriptions for new devservices commands added. It also adds more modes that have been added, and a guide to debugging a background process in the foreground.
1 parent 8ee3211 commit e3723e7

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

develop-docs/development-infrastructure/devservices.mdx

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ commands:
2424
update Update devservices to the latest version
2525
purge Purge the local devservices cache
2626
toggle Toggle how a service is run
27+
foreground Foreground a background process for debugging
28+
serve Start the devserver
2729
```
2830
2931
## Installation
@@ -70,18 +72,50 @@ docker volume rm sentry_postgres-data
7072
7173
## Running devservices with a specific mode
7274
73-
Common modes:
75+
Common modes in sentry:
7476
7577
- `symbolicator`: Bring up sentry dependencies and symbolicator
7678
- `chartcuterie`: Bring up sentry dependencies and chartcuterie
79+
- `taskbroker`: Bring up sentry dependencies, taskbroker, taskworker, and taskworker-scheduler
7780
- `minimal`: Bring up minimal services for local development
78-
- `profiling`: Bring up sentry dependencies and vroom
81+
- `profiling`: Bring up sentry dependencies, vroom, and profiling consumers
82+
- `crons`: Brings up sentry dependencies and monitor consumers
83+
- `tracing`: Brings up sentry dependencies and everything necessary for transactions, spans, and metrics
84+
- `ingest`: Brings up the most common sentry dependencies to support ingestion of errors and transactions
85+
- `ingest-all`: Brings up sentry dependencies to support ingesting everything
7986
- `full`: Bring up all services (symbolicator, taskbroker, snuba, vroom, etc)
8087
8188
```shell
8289
devservices up --mode symbolicator
8390
```
8491
92+
## Debugging a Background Process Interactively
93+
94+
There are a couple groups of processes that are running in the background. These include ingest consumers, post process forwarders, and taskworkers. You'll want to use the devservices foreground command to debug these interactively if you cannot do so with the devserver itself.
95+
96+
1. Bring up your development environment:
97+
``` sh
98+
devservices up --mode taskbroker
99+
devservices serve
100+
```
101+
102+
2. Add a breakpoint
103+
104+
``` python
105+
def example () -> None
106+
...
107+
breakpoint() // After python 3.7
108+
import pdb; pdb.set_trace() // Before python 3.7
109+
...
110+
```
111+
112+
3. Bring a process to the foreground for debugging
113+
``` sh
114+
devservices foreground taskbroker
115+
```
116+
117+
118+
85119
## Running a dependency locally
86120

87121
You can run a dependency locally instead of as a container by toggling its runtime via the `devservices toggle` command.

0 commit comments

Comments
 (0)