Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint, and Test
name: CI

on:
push:
Expand Down Expand Up @@ -62,6 +62,14 @@ jobs:
with:
github-token: ${{ steps.token.outputs.token }}

job_typos:
name: Check Typos
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be able to be updated to v5, unless set for a specific reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, good catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in c72e050

- name: Check spelling with typos
uses: crate-ci/typos@master

job_test:
name: Test
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ repos:
- id: debug-statements
- id: flake8
- id: fix-encoding-pragma
args: ["--remove"]
args: ['--remove']
- repo: https://github.com/getsentry/pre-commit-hooks
rev: f3237d2d65af81d435c49dee3593dc8f03d23c2d
hooks:
- id: prettier
entry: node_modules/.bin/prettier
- id: eslint
entry: node_modules/.bin/eslint
- repo: https://github.com/crate-ci/typos
rev: v1.26.8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1.39.0 came out 3 days ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sick, thx!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in c72e050

hooks:
- id: typos
74 changes: 74 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[default]
# Regex patterns to ignore
extend-ignore-re = [
"\\bUE\\b", # Unreal Engine abbreviation
"\\bUE_LOG\\b", # Unreal Engine logging macro
"\\bue4\\b", # Unreal Engine 4
"\\bue5\\b", # Unreal Engine 5
"\\bue\\d+\\b", # Any UE version (ue5, ue6, etc.)
]

[files]
# Files and patterns to exclude from spell checking
extend-exclude = [
# Design and binary files
"*.excalidraw", # Diagram files contain random IDs
"*.png",
"*.jpg",
"*.jpeg",
"*.gif",
"*.svg",
"*.webp",

# Data and configuration files
"*.json", # JSON files have many false positives
"*.lock", # Package lock files
"yarn.lock", # Yarn lock file
"package-lock.json", # NPM lock file

# Documentation assets
"public/_platforms/*.json", # Platform metadata
"public/pdfs/*.pdf", # PDFs can't be edited programmatically

# Build artifacts and dependencies
".next/**", # Next.js build output
"node_modules/**", # Dependencies
"dist/**", # Distribution builds
"build/**", # Build output
]

[default.extend-words]
# Technical terms and product names that are spelled correctly
# .NET ecosystem
Paket = "Paket" # .NET package manager (legitimate tool)
paket = "paket" # .NET package manager CLI command

# Platform-specific terms
ITMS = "ITMS" # Apple error code prefix (legitimate)
SEH = "SEH" # Structured Exception Handling (Windows API)
EDE = "EDE" # Cipher name component (3DES_EDE_CBC_SHA)
UE = "UE" # Unreal Engine abbreviation
UE4 = "UE4" # Unreal Engine 4
UE5 = "UE5" # Unreal Engine 5

# Cloud/Infrastructure
nodejs_als = "nodejs_als" # Cloudflare compatibility flag (correct spelling)
als = "als" # Part of nodejs_als flag

# Common abbreviations in tech docs
DSN = "DSN" # Data Source Name (Sentry)
DSNs = "DSNs" # Plural
SDK = "SDK" # Software Development Kit
SDKs = "SDKs" # Plural
API = "API" # Application Programming Interface
APIs = "APIs" # Plural
MCP = "MCP" # Model Context Protocol
NPM = "NPM" # Node Package Manager

# Code identifiers that are intentionally "misspelled" or match external systems
# Note: These should ONLY include cases where the spelling is intentional
# (e.g., matching an external API/constant name we don't control)
childs = "childs" # Intentional variable name in mdx-deflist.ts
aso = "aso" # Intentional variable name in utils.ts (short for "a sidebar order")
MIGRATED_GETTING_STARTD_DOCS = "MIGRATED_GETTING_STARTD_DOCS" # Matches actual constant in Sentry backend (external)
STARTD = "STARTD" # Part of MIGRATED_GETTING_STARTD_DOCS - needed because typos parses words in markdown text
2 changes: 1 addition & 1 deletion app/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
const domain = isDeveloperDocs
? 'https://develop.sentry.dev'
: 'https://docs.sentry.io';
// enable og iamge preview on preview deployments
// enable og image preview on preview deployments
const previewDomain = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: domain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Service classes act as stubs that define the interface a service will have. In t
- `local_mode` defines which silo mode this service uses it’s ‘local implementation’. Services can have local implementations in either silo mode.
- `get_local_implementation` is used by the RPC machinery to find the implementation service when the silo mode matches or is `MONOLITH`.

RPC methods like `get_org_by_slug` must be defined as `abstractmethod` and must have either `rpc_method` or `regional_rpc_method` applied. If a method has `local_mode = REGION` it should use `regional_rpc_method` with a resolve ‘resolver’. There are several resolvers that accomodate a variety of method call signatures:
RPC methods like `get_org_by_slug` must be defined as `abstractmethod` and must have either `rpc_method` or `regional_rpc_method` applied. If a method has `local_mode = REGION` it should use `regional_rpc_method` with a resolve ‘resolver’. There are several resolvers that accommodate a variety of method call signatures:

- `ByOrganizationSlug` will extract the `organization_slug` parameter and use it to locate the region using `sentry_organizationmapping`.
- `ByOrganizationId` will extract the `organization_id` parameter and use it to locate the organization’s region using `sentry_organizationmapping`
Expand Down
2 changes: 1 addition & 1 deletion develop-docs/application-architecture/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This graph is extremely simplified mostly due to layout constraints. Missing fro
* How Relay fetches project configs. Answer: from sentry-web
* How Relay caches project configs. Answer: In memory, and in Redis
* How Relay counts events and keeps track of quotas. Answer: more Redis
* Symbolicator as auxilliary service to symbolicate-event
* Symbolicator as auxiliary service to symbolicate-event
* How alerting is triggered. Answer: postprocess-event, a Celery task which is responsible for alerting (spawned by a Kafka consumer in Sentry reading from eventstream)
* Possibly more

Expand Down
2 changes: 1 addition & 1 deletion develop-docs/backend/api/design.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Design Principles
sidebar_order: 2
---

This document contains a set of design principles and requirements whish should be applied to all Sentry APIs. These are _requirements_ when designing public APIs (such as Sentry's Web API), but internal APIs (such as an an internal service that Sentry communicates with) should attempt to adhere to these principles as well where it makes sense.
This document contains a set of design principles and requirements which should be applied to all Sentry APIs. These are _requirements_ when designing public APIs (such as Sentry's Web API), but internal APIs (such as an an internal service that Sentry communicates with) should attempt to adhere to these principles as well where it makes sense.

In the Sentry monolith, we use [Django REST framework](https://www.django-rest-framework.org/) (DRF).

Expand Down
2 changes: 1 addition & 1 deletion develop-docs/backend/api/serializers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class ModelSerializer(Serializer):

**get_attrs Method**

Why do this when Django Rest Framework has similar functionality? The `get_attrs` method is the reason. It allows you to do a bulk query versus multiple queries. In our example, instead of calling `ExampleTypes.objects.get(...)` multiple items, I can filter for the ones I want and assign them to the item in question using python. In the case of `attr` dictionary, the `key` is the item iteself. and the `value` is a dictionary with the name of the attribute you want to add and it's values.
Why do this when Django Rest Framework has similar functionality? The `get_attrs` method is the reason. It allows you to do a bulk query versus multiple queries. In our example, instead of calling `ExampleTypes.objects.get(...)` multiple items, I can filter for the ones I want and assign them to the item in question using python. In the case of `attr` dictionary, the `key` is the item itself. and the `value` is a dictionary with the name of the attribute you want to add and it's values.

```python
attrs[item] = {'attribute_name': attribute}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ Flagpole currently supports the following `operator` types:

`contains`

: Given a single int, string, float, or boolean value, evalutes to `True` if the context property value is a list containing the provided value.
: Given a single int, string, float, or boolean value, evaluates to `True` if the context property value is a list containing the provided value.

`not_contains`

: The inverse of `contains`, evalutes to `True` if the context property value is a list which does not contain the provided value.
: The inverse of `contains`, evaluates to `True` if the context property value is a list which does not contain the provided value.

`equals`

Expand All @@ -114,7 +114,7 @@ Here are some common properties we surface via our Sentry and GetSentry context

`sentry_region` [str]

: The sentry region or single-tenant the flag check is being perfomed in.
: The sentry region or single-tenant the flag check is being performed in.

`sentry_singletenant` [bool]

Expand Down
6 changes: 3 additions & 3 deletions develop-docs/backend/application-domains/grouping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ which can be customized [on the client](https://docs.sentry.io/platforms/python/
and on the server via [fingerprint rules](https://docs.sentry.io/product/data-management-settings/event-grouping/fingerprint-rules/)
and [stack trace rules](https://docs.sentry.io/product/data-management-settings/event-grouping/stack-trace-rules/).

This documentation attemps to explain how the system currently functions and what limitations exist presently with it.
This documentation attempts to explain how the system currently functions and what limitations exist presently with it.

# Basics

Expand Down Expand Up @@ -192,8 +192,8 @@ The following general paths forward are current envisioned:

The consequences of making too many groups today are alert spam and the inability to work with multiple
issues at once. If Sentry were to no longer be alerting on all new groups and tools existed to work
across multiple groups more opportunies arise. In particular the grouping algorithm could continue to
just fingerprint the stack trace but a secondary process could come in peridically and sweep up related
across multiple groups more opportunities arise. In particular the grouping algorithm could continue to
just fingerprint the stack trace but a secondary process could come in periodically and sweep up related
fingerprints into a larger group. If we take the `get_current_user` example the creation of 50 independent
groups is not much of an issue if no alerts are fired. If after 5 minute the system detected that they are
in fact all very related (eg: the bug is "in `get_current_user`") it could leave the 50 generated groups
Expand Down
2 changes: 1 addition & 1 deletion develop-docs/backend/application-domains/nodestore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ If you have a favorite data storage solution, it only has to operate under a few
- get key
- delete key

For more information on implementating your own backend, take a look at `sentry.nodestore.base.NodeStorage`.
For more information on implementing your own backend, take a look at `sentry.nodestore.base.NodeStorage`.
2 changes: 1 addition & 1 deletion develop-docs/backend/application-domains/pii/selectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Select known parts of the schema using the following:
[Remove] [Anything] from [$frame.vars]
```

### Escaping Specal Characters
### Escaping Special Characters

If the object key you want to match contains whitespace or special characters,
you can use quotes to escape it:
Expand Down
4 changes: 2 additions & 2 deletions develop-docs/development-infrastructure/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ If your analytics aren't showing up after you added it, you can't find an event
- Check Amplitude for blocked events: In Amplitude, go to the "Data" section in the sidebar. From there, navigate to "Events" and search for your event name. It will show up with status "Blocked" if blocked, which means events won't show up. Some events may be blocked in favor of automatic route or button analytics.
- For route analytics, confirm that the analytic event isn't being blocked with `useDisableRouteAnalytics`. Some components already had an analytic event so the route analytics were disabled.
- Check the types of the data you are sending. Arrays aren't recommended data types to send (they can be hard to query and produce some unexpected behavior). Try to remove those if you are using them.
- Remember there will always be some discrepency. Ad-blockers, for example, can block events from being sent. This could be a cause of why some numbers aren't adding up.
- Remember there will always be some discrepancy. Ad-blockers, for example, can block events from being sent. This could be a cause of why some numbers aren't adding up.

## Metrics

Track aggregrate stats with [Metrics](/backend/metrics/). For example, this can be used to track aggregate response codes for an endpoint.
Track aggregate stats with [Metrics](/backend/metrics/). For example, this can be used to track aggregate response codes for an endpoint.

Import the metrics library and use the `metrics.inc` function. The key needs to be unique.

Expand Down
4 changes: 2 additions & 2 deletions develop-docs/development-infrastructure/environment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ To run tasks, you will also need to start taskbroker:
# start just taskbroker
devservices up --mode=taskbroker

# start taskbroker and a backgrond worker
# start taskbroker and a background worker
devservices up --mode=taskworker
```

Expand Down Expand Up @@ -226,7 +226,7 @@ Then, either end the process or kill it if you need to.

---

**Problem:** You see `Error occured while trying to proxy to: dev.getsentry.net:8000/`
**Problem:** You see `Error occurred while trying to proxy to: dev.getsentry.net:8000/`

**Solution:** You likely need to upgrade your Python dependencies. Go to the git root directory and run `make install-py-dev`.

Expand Down
2 changes: 1 addition & 1 deletion develop-docs/engineering-practices/documentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_order: 30

Because documentation is a big part of what makes Sentry work we’ve outlined some guidelines about how this documentation is structured and how to extend it.

This page primarily focuses on writing **developer-facing documentation**, although some concepts may also apply to user-facing documentation. We have separate [contribution guidelines](https://docs.sentry.io/contributing/) specifically for user-facing documenation.
This page primarily focuses on writing **developer-facing documentation**, although some concepts may also apply to user-facing documentation. We have separate [contribution guidelines](https://docs.sentry.io/contributing/) specifically for user-facing documentation.

## Repository

Expand Down
8 changes: 4 additions & 4 deletions develop-docs/frontend/using-rtl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ As a part of this goal, we avoid testing implementation details so refactors (ch
We are generally in favor of Use Case Coverage over Code Coverage.

## Use our built-in contexts
By default, `render()` has some default contexts setup for you. The organization context is set to `OrganizationFixture()` and the router context has some default params like orgId and projectId. These can be overriden by passing a property to the 2nd argument of the `render()` function.
By default, `render()` has some default contexts setup for you. The organization context is set to `OrganizationFixture()` and the router context has some default params like orgId and projectId. These can be overridden by passing a property to the 2nd argument of the `render()` function.

Example of overriding the default organization features and access:
```tsx
Expand Down Expand Up @@ -50,7 +50,7 @@ expect(screen.getByText(/example/i)).toBeInTheDocument();

## Testing route changes

When using `render()`, an in-memory router is used, which will react to navigations with `useNavigate()` or interations with `Link` components. If your component relies on the URL, you can define the initial state in `initialRouterConfig`. You can access the current router state by referencing the returned `router` class, as well as navigate programmatically with `router.navigate()`.
When using `render()`, an in-memory router is used, which will react to navigations with `useNavigate()` or interactions with `Link` components. If your component relies on the URL, you can define the initial state in `initialRouterConfig`. You can access the current router state by referencing the returned `router` class, as well as navigate programmatically with `router.navigate()`.

```tsx
const {router} = render(<TestComponent />, {
Expand Down Expand Up @@ -134,7 +134,7 @@ Suppose routes.tsx defines some nested routes like:
}
```

We can configure the in-memory router to know about just the route tree that you need. Remember to render the wrapper component itself, and the router + route child components will render themsevles.
We can configure the in-memory router to know about just the route tree that you need. Remember to render the wrapper component itself, and the router + route child components will render themselves.
```tsx
// settingsWrapper.tsx
interface OutletContext {
Expand Down Expand Up @@ -208,7 +208,7 @@ expect(screen.getByText('Settings > Default > Project: 123')).toBeInTheDocument(
To ensure that the tests resemble how users interact with our code we recommend the following priority for querying:

1. `getByRole` - This should be the go-to selector for almost everything. As a nice bonus with this selector, we make sure that our app is accessible. It will most likely be used together with the name option `getByRole('button', {name: /save/i})`. The name is usually the label of a form element or the text content of a button, or the value of the aria-label attribute. If unsure, use the [logRoles](https://testing-library.com/docs/dom-testing-library/api-accessibility/#logroles) feature or consult the [list of available roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques#roles).
2. `getByLabelText`/`getByPlaceholderText` - Users find form elements using label text, therefore this option is prefered when testing forms.
2. `getByLabelText`/`getByPlaceholderText` - Users find form elements using label text, therefore this option is preferred when testing forms.
3. `getByText` - Outside of forms, text content is the main way users find elements. This method can be used to find non-interactive elements (like divs, spans, and paragraphs).
4. `getByTestId` - As this does not reflect how users interact with the app, it is only recommended for cases where you can't use any other selector

Expand Down
2 changes: 1 addition & 1 deletion develop-docs/ingestion/relay/creating-a-datacategory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ New data categories are always released as a new patch version, for example if t
would trigger the workflow with version `0.7.13`.

<Alert level="warning" title="Important">
Double and tripple check the version before triggering the workflow.
Double and triple check the version before triggering the workflow.
</Alert>


Expand Down
2 changes: 1 addition & 1 deletion develop-docs/ingestion/symbolicator/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ These endpoints all differ in the schema of requests that they expect. In all ca
Using the request ID, it is possible to check the status of the request using the `/requests` endpoint. Possible return values for the response are (in JSON)

- `{ "status": "pending", "request_id": <ID>, "retry_after": 30}` if the request is running
- `{ “status": "completed", <rest of response data> }` if symbolication was succesful
- `{ “status": "completed", <rest of response data> }` if symbolication was successful
- `{ "status": "failed", "message": <message> }` if symbolication failed
- `{ "status": "timeout" }` if symbolication timed out (after 15min)
- `{ "status": "internal_error" }` if the sender was dropped, i.e. something went very badly wrong
Expand Down
2 changes: 1 addition & 1 deletion develop-docs/integrations/jira/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ og_image: /og-images/integrations-jira.png

### Permissions for Certain Features

To enable issue-sync between Jira and a locally hosted Sentry Jira integration, you must set your email address permission to "Anyone". This setting can be found in the [Profile and visiblity](https://id.atlassian.com/manage-profile/profile-and-visibility) page under "Contact".
To enable issue-sync between Jira and a locally hosted Sentry Jira integration, you must set your email address permission to "Anyone". This setting can be found in the [Profile and visibility](https://id.atlassian.com/manage-profile/profile-and-visibility) page under "Contact".


## Set Up ngrok
Expand Down
Loading
Loading