Skip to content

Commit a721393

Browse files
committed
Merge branch 'master' into fix-platform-section-spacing
2 parents 35304cc + b728484 commit a721393

File tree

90 files changed

+2640
-745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2640
-745
lines changed

develop-docs/backend/application-domains/options.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,13 @@ If you expect to frequently update your option, you can make it editable in the
6969
If you're working on a system-wide feature, you may choose to use options for your rollout instead of feature flags. Unlike feature flags, options don't allow for easy segmentation, but they are performant, stable, and simple to implement. e.g.,
7070

7171
```python
72-
import random
73-
from sentry import options
72+
from sentry.options.rollout import in_random_rollout
7473

75-
rate = options.get("performance.some-feature-rate")
76-
if rate > random.random():
74+
if in_random_rollout("performance.some-feature-rate"):
7775
do_feature_stuff()
7876
```
7977

80-
However, be careful! Using `random.random` will cause your feature to be enabled and disabled randomly between page requests. This may be unacceptable for user-facing features. To avoid this, you can use the `sample_modulo` helper. e.g.,
78+
However, be careful! `in_random_rollout` uses `random.random` under the hood, and will cause your feature to be enabled and disabled randomly between page requests. This may be unacceptable for user-facing features. To avoid this, you can use the `sample_modulo` helper. e.g.,
8179

8280
```python
8381
from sentry.utils.options import sample_modulo

docs/concepts/key-terms/tracing/span-metrics.mdx

Lines changed: 69 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,17 @@ By attaching attributes directly to spans, you create a unified view of both the
2020
// Simple database query with dynamic attributes
2121
Sentry.startSpan(
2222
{
23-
name: 'Database Query',
24-
op: 'db.query'
23+
name: "Database Query",
24+
op: "db.query",
2525
},
26-
() => {
27-
// Get active span to set attributes as data becomes available
28-
const span = Sentry.getActiveSpan();
29-
26+
(span) => {
3027
// Execute query and add results to span
31-
const result = executeQuery('SELECT * FROM users WHERE active = true');
32-
28+
const result = executeQuery("SELECT * FROM users WHERE active = true");
29+
3330
// Set attributes with the results data
34-
if (span) {
35-
span.setAttribute('db.rows_returned', result.length);
36-
span.setAttribute('db.execution_time_ms', result.executionTime);
37-
}
38-
31+
span.setAttribute("db.rows_returned", result.length);
32+
span.setAttribute("db.execution_time_ms", result.executionTime);
33+
3934
return result;
4035
}
4136
);
@@ -55,14 +50,14 @@ By integrating these attributes into tracing, you can maintain a single telemetr
5550
// Adding business context to a payment processing span
5651
Sentry.startSpan(
5752
{
58-
name: 'Process Payment',
59-
op: 'payment.process',
53+
name: "Process Payment",
54+
op: "payment.process",
6055
attributes: {
61-
'payment.amount': 99.99,
62-
'payment.currency': 'USD',
63-
'payment.method': 'credit_card',
64-
'customer.type': 'returning'
65-
}
56+
"payment.amount": 99.99,
57+
"payment.currency": "USD",
58+
"payment.method": "credit_card",
59+
"customer.type": "returning",
60+
},
6661
},
6762
async () => {
6863
// Payment processing implementation
@@ -91,12 +86,12 @@ Augment automatically-created or manually-defined spans with additional attribut
9186
const span = Sentry.getActiveSpan();
9287
if (span) {
9388
// User context
94-
span.setAttribute('user.subscription_tier', 'premium');
95-
89+
span.setAttribute("user.subscription_tier", "premium");
90+
9691
// Multiple metrics in a single operation
9792
span.setAttributes({
98-
'memory.heap_used': 1024000,
99-
'processing.total_steps': 5
93+
"memory.heap_used": 1024000,
94+
"processing.total_steps": 5,
10095
});
10196
}
10297
```
@@ -109,16 +104,16 @@ Create spans specifically for grouping related attributes or metrics, particular
109104
// Creating a span for monitoring external API usage
110105
Sentry.startSpan(
111106
{
112-
name: 'Third-Party API Usage',
113-
op: 'external.api',
107+
name: "Third-Party API Usage",
108+
op: "external.api",
114109
attributes: {
115110
// Performance metrics
116-
'api.response_time_ms': 245,
117-
111+
"api.response_time_ms": 245,
112+
118113
// Context data
119-
'feature.using_api': 'image_recognition',
120-
'user.plan': 'enterprise'
121-
}
114+
"feature.using_api": "image_recognition",
115+
"user.plan": "enterprise",
116+
},
122117
},
123118
async () => {
124119
// API call implementation
@@ -138,15 +133,15 @@ Monitor client-side performance metrics related to user experience:
138133
// UI performance monitoring
139134
Sentry.startSpan(
140135
{
141-
name: 'Page Interaction',
142-
op: 'ui.interaction',
136+
name: "Page Interaction",
137+
op: "ui.interaction",
143138
attributes: {
144-
'ui.first_input_delay_ms': 24,
145-
'ui.time_to_interactive_ms': 320,
146-
'ui.frames_dropped': 0,
147-
'user.device_type': 'mobile',
148-
'feature.being_used': 'image_carousel'
149-
}
139+
"ui.first_input_delay_ms": 24,
140+
"ui.time_to_interactive_ms": 320,
141+
"ui.frames_dropped": 0,
142+
"user.device_type": "mobile",
143+
"feature.being_used": "image_carousel",
144+
},
150145
},
151146
async () => {
152147
// UI interaction handling
@@ -162,17 +157,17 @@ Track database performance characteristics and their impact on application behav
162157
// Database query monitoring
163158
Sentry.startSpan(
164159
{
165-
name: 'Product Search Query',
166-
op: 'db.query',
160+
name: "Product Search Query",
161+
op: "db.query",
167162
attributes: {
168-
'db.query_type': 'SELECT',
169-
'db.table': 'products',
170-
'db.execution_time_ms': 145,
171-
'db.rows_returned': 87,
172-
'db.index_used': 'product_category_idx',
173-
'business.search_term': 'winter jacket',
174-
'business.search_filters_applied': 3
175-
}
163+
"db.query_type": "SELECT",
164+
"db.table": "products",
165+
"db.execution_time_ms": 145,
166+
"db.rows_returned": 87,
167+
"db.index_used": "product_category_idx",
168+
"business.search_term": "winter jacket",
169+
"business.search_filters_applied": 3,
170+
},
176171
},
177172
async () => {
178173
// Database query execution
@@ -188,21 +183,21 @@ Monitor file handling operations across your application stack:
188183
// File processing monitoring
189184
Sentry.startSpan(
190185
{
191-
name: 'Process Uploaded Image',
192-
op: 'file.process',
186+
name: "Process Uploaded Image",
187+
op: "file.process",
193188
attributes: {
194189
// Technical metrics
195-
'file.size_bytes': 2500000,
196-
'file.type': 'image/jpeg',
197-
190+
"file.size_bytes": 2500000,
191+
"file.type": "image/jpeg",
192+
198193
// Processing metrics
199-
'processing.steps_completed': ['virus_scan', 'resize', 'compress'],
200-
'processing.total_time_ms': 850,
201-
194+
"processing.steps_completed": ["virus_scan", "resize", "compress"],
195+
"processing.total_time_ms": 850,
196+
202197
// Context data
203-
'feature.using_upload': 'user_avatar',
204-
'subscription.allows_hd': true
205-
}
198+
"feature.using_upload": "user_avatar",
199+
"subscription.allows_hd": true,
200+
},
206201
},
207202
async () => {
208203
// Image processing implementation
@@ -218,21 +213,21 @@ Monitor performance and reliability of third-party service interactions:
218213
// Payment gateway monitoring
219214
Sentry.startSpan(
220215
{
221-
name: 'Payment Gateway',
222-
op: 'payment.gateway',
216+
name: "Payment Gateway",
217+
op: "payment.gateway",
223218
attributes: {
224219
// Performance metrics
225-
'gateway.response_time_ms': 980,
226-
'gateway.retry_count': 0,
227-
220+
"gateway.response_time_ms": 980,
221+
"gateway.retry_count": 0,
222+
228223
// Transaction data
229-
'order.total_amount': 159.99,
230-
'order.items_count': 3,
231-
224+
"order.total_amount": 159.99,
225+
"order.items_count": 3,
226+
232227
// Service metrics
233-
'gateway.fee_amount': 4.50,
234-
'gateway.fee_percent': 0.029
235-
}
228+
"gateway.fee_amount": 4.5,
229+
"gateway.fee_percent": 0.029,
230+
},
236231
},
237232
async () => {
238233
// Payment gateway integration
@@ -255,6 +250,7 @@ Maintain consistent naming patterns following the format `category.metric_name`
255250
#### Data Type Selection
256251

257252
Choose appropriate data types for your metrics:
253+
258254
- Numeric values for measurements (`response_time_ms`: 250)
259255
- Boolean values for state indicators (`cache.hit`: true)
260256
- String values for categorical data (`user.subscription`: 'premium')
@@ -263,6 +259,7 @@ Choose appropriate data types for your metrics:
263259
#### Performance Considerations
264260

265261
Be mindful of the performance impact of collecting metrics, especially for high-volume operations:
262+
266263
- Consider implementing sampling for high-frequency operations
267264
- Prioritize metrics with the highest analytical value
268265
- Avoid redundant or closely correlated metrics
@@ -276,6 +273,7 @@ If you're currently using Sentry's standalone Metrics product, migrating to span
276273
- **Improved correlation**: Direct association between attributes, traces, and errors
277274

278275
Migration process:
276+
279277
1. Identify your current metric instrumentation points
280278
2. Locate corresponding spans in your application
281279
3. Transfer your metrics to span attributes

docs/organization/integrations/deployment/vercel/index.mdx

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: Vercel
33
sidebar_order: 1
4-
description: "Learn more about Sentry's Vercel integration and how you can sync release deployments and source map uploads."
4+
description: "Learn more about Sentry's Vercel integrations and how you can sync release deployments and source map uploads, as well as the Vercel Marketplace integration."
55
---
66

7+
## Releases and Source Map Integration
8+
79
<Alert level="warning">
810

911
If you make changes to your organization slug, you'll need to update your configuration for this integration. Learn more in our [troubleshooting guide](/organization/integrations/troubleshooting).
@@ -13,7 +15,7 @@ If you make changes to your organization slug, you'll need to update your config
1315
Connect your Sentry and Vercel projects to automatically notify Sentry of every deployment and upload source maps for your Next.js application.
1416
To learn more about using Sentry in your Next.js app, check out the [Next.js SDK](/platforms/javascript/guides/nextjs/).
1517

16-
## Install
18+
### Install
1719

1820
<Alert>
1921

@@ -35,11 +37,11 @@ Sentry owner, manager, or admin permissions are required to install this integra
3537

3638
![Sentry modal showing Vercel internal integration](./img/vercel_internal_integration.png)
3739

38-
## Configure
40+
### Configure
3941

4042
Use Vercel to [link projects](#project-linking) for uploading source maps and notifiying Sentry of release deployment.
4143

42-
### Project Linking
44+
#### Project Linking
4345

4446
1. When prompted by the installer, select a Sentry project and a Vercel project to link together.
4547

@@ -56,25 +58,66 @@ Use Vercel to [link projects](#project-linking) for uploading source maps and no
5658

5759
2. Redeploy your Vercel project in order to trigger a release.
5860

59-
## Usage
61+
### Usage
6062

6163
- If you have not already done so, [instrument your code with Sentry](/platforms/javascript/).
6264
- Ensure you have [installed a repository integration](/product/releases/setup/release-automation/) and added the relevant repository.
6365
- Add a Sentry bundler plugin to your bundler configuration ([webpack plugin](https://www.npmjs.com/package/@sentry/webpack-plugin), [Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin), [Esbuild Plugin](https://www.npmjs.com/package/@sentry/esbuild-plugin), [Rollup Plugin](https://www.npmjs.com/package/@sentry/rollup-plugin)). If you are using Sentry's Next.js, or SvelteKit SDKs this will already have been done for you.
6466
- In case you already have a Vercel project integrated with Sentry, ensure the Sentry project you link is the one you're already using to report errors.
6567

66-
## Uninstallation
68+
### Uninstallation
6769

6870
1. You can uninstall the integration from Vercel or Sentry. To do so in Sentry, navigate to **Settings > Integrations > Vercel > Configurations**, click "Uninstall", and confirm.
6971

7072
2. Delete the internal integration that was created by navigating to **Settings > Developer Settings** and clicking the trash can icon next to "Vercel Internal Integration". You will be prompted to confirm the deletion by entering a string provided in the modal. Enter the string and click "Confirm" to finalize the deletion:
7173

7274
![Sentry modal showing uninstalling Vercel integration](./img/vercel_delete_internal_integration.png)
7375

74-
## Troubleshooting
76+
### Troubleshooting
7577

76-
### Failed to fetch
78+
#### Failed to fetch
7779

7880
![Failed to fetch error message](./img/vercel_failed_to_fetch.png)
7981

8082
This issue typically occurs if you have an ad blocker blocking the conversation between Vercel and Sentry during setup. To remediate the issue, disable your ad blocker and go through the installation flow again.
83+
84+
## Vercel Marketplace
85+
86+
The Vercel Marketplace integration allows existing Vercel users to onboard to Sentry with a one-click workflow. This setup is designed for **new Sentry users** and unifies billing within the Vercel platform.
87+
88+
There is no path for existing Sentry organizations to use the Vercel Marketplace integration.
89+
90+
When you configure Sentry using the Vercel Marketplace, you'll be able to set the name of your new Sentry Organization (referred to as an "Installation" in Vercel) and projects (Resources/Products in Vercel) during the setup process.
91+
92+
### Billing Settings
93+
94+
When using the Vercel Marketplace native integration, users can modify their organizations billing information from within the Vercel platform, or within Sentry directly. Credit card settings can only be modified within Vercel.
95+
96+
Subscription settings can only be modified within Sentry. During setup, organizations can choose between Team or Business plans. Pay-as-you-go budgets can be set after the initial setup is completed.
97+
98+
### User Access
99+
100+
Vercel users will have single sign-on access to Sentry using the "Open in Sentry" button within Vercel, and will be able to create new projects in either Vercel or Sentry.
101+
102+
Users will still be able to login to their Sentry organization directly, without using the Vercel single-sign on, by using the login they configured during the setup process. For non social based login (Google, Github, etc.) users, Sentry will prompt for password creation.
103+
104+
### Automatically Configured Environment Variables
105+
106+
For every project configured, the following environment variables will be set within the Vercel deployment:
107+
108+
- **SENTRY_PROJECT**
109+
- **SENTRY_AUTH_TOKEN**
110+
- **NEXT_PUBLIC_SENTRY_DSN**
111+
- **SENTRY_ORG**
112+
113+
### Integration Deletion
114+
115+
If the integration is deleted within Vercel, the Sentry organization **will not** be deleted. The deletion will permanently remove the connection between the Vercel account and the Sentry account, and is **irreversible**.
116+
117+
Preserving the Sentry organization allows teams to still access historical data from within Sentry, even if they are not sending monitoring data anymore.
118+
119+
If the native integration is deleted, teams are still able to leverage the non-native Vercel integration described at the top of this document. Only one integration can be active at a time.
120+
121+
For more information, see the [Introducing the Vercel Marketplace blog post](https://vercel.com/blog/introducing-the-vercel-marketplace).
122+
123+

docs/organization/membership/index.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ Projects can only be accessed by that project's team(s). Team Admins, Org Manage
118118
Any Org Member can get access to a project by joining the team that's associated with that project. Once you've joined a project you'll also be able to edit [ownership rules](/product/issues/ownership-rules/) for that project.
119119

120120
### Adding New Members
121-
<Alert>
122-
This feature is currently only available for [Early Adopters](/organization/early-adopter-features/).
123-
</Alert>
124121

125122
Users with Manager and Owner-level permissions can add, remove, and change members for a project or organization. They can also toggle on the "Let Members Invite Others" setting to allow any org member to freely invite anyone they like without needing org owner or manager approval.
126123

0 commit comments

Comments
 (0)