Skip to content

Commit 0af29f6

Browse files
authored
Merge branch 'master' into feat-docs-mcp-server
2 parents ef04421 + b4aa648 commit 0af29f6

File tree

16 files changed

+216
-91
lines changed

16 files changed

+216
-91
lines changed

develop-docs/ingestion/relay/relay-best-practices.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ Make sure changes to the event protocol and APIs are forward-compatible. Relay s
1616
or truncate data it does not understand. It is a supported use-case to have customers running
1717
outdated Relays but up-to-date SDKs.
1818

19+
For example, `enum`s in the event protocol (or any other data type received from the SDK) need to have a catchall variant
20+
such that customer relays running an older version can still forward the data:
21+
22+
```rust
23+
enum EventColor {
24+
Red,
25+
Green,
26+
Blue,
27+
/// Unknown color, for forward compatibility.
28+
Unknown(String),
29+
}
30+
```
1931

2032
## Feature Gate new Functionality
2133

develop-docs/sdk/data-model/event-payloads/exception.mdx

Lines changed: 120 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -51,89 +51,156 @@ created this exception.
5151
`stacktrace`
5252

5353
: An optional stack trace object corresponding to the [Stack Trace Interface](/sdk/data-model/event-payloads/stacktrace/).
54-
5554
## Exception Mechanism
5655

57-
The exception mechanism is an optional field residing in the _Exception
58-
Interface_. It carries additional information about the way the exception was
59-
created on the target system. This includes general exception values obtained
60-
from the operating system or runtime APIs, as well as mechanism-specific values.
56+
The exception mechanism is an optional field residing in the _Exception Interface_.
57+
It carries additional information about the way the exception was created and captured ("capturing mechanism") on the target system.
58+
This includes general exception values obtained from the operating system or runtime APIs, as well as capturing mechanism-specific values.
6159

6260
### Attributes
6361

64-
`type`
62+
#### `type`
63+
64+
Required (`string`)
65+
66+
The identifier of the capturing mechanism that captured the exception.
67+
The chosen mechanism `type` MUST help users as well as Sentry employees determine the responsible mechanism for capturing the exception.
68+
This is either instrumentation within our SDKs or users manually capturing exceptions (for example via `captureException`).
69+
70+
The `type` MUST be _reasonably unique_ to make it possible to identify the integration or SDK API that performed the capture.
71+
There's no strict uniqueness requirement as in certain situations, multiple paths exist within one instrumentation, in which case it is fine to use a common mechanism `type`.
72+
73+
For user-invoked exception captures (e.g. via `captureException`), the `type` MUST be set to `'generic'`.
74+
75+
For SDK-invoked exception captures, the mechanism `type` value MUST NOT be set to `'generic'` and SHOULD follow the [Trace Origin](/sdk/performance/trace-origin/) naming scheme whenever applicable.
76+
For example, if a span is wrapping the exception capture logic, `type` should be equal to this span's `sentry.origin` attribute.
77+
If no (specific) span is present, the `type` SHOULD be set to an adequate value, following the Trace Origin naming scheme as closely as possible.
78+
79+
<Expandable title="Examples">
6580

66-
: Required unique identifier of this mechanism determining rendering and processing of the mechanism data.
81+
Exception capture within a span:
6782

68-
`description`
83+
```js
84+
startSpan(
85+
{
86+
name: 'Middleware',
87+
attributes: { 'sentry.origin': 'auto.http.express.middleware' },
88+
},
89+
() => {
90+
captureException(error, {
91+
mechanism: { type: 'auto.http.express.middleware', handled: false }
92+
});
93+
},
94+
);
95+
```
96+
97+
Exception capture outside of a span:
98+
99+
```js
100+
captureException(error, {
101+
mechanism: { type: 'auto.browser.global_handlers.onerror', handled: false }
102+
});
103+
```
104+
105+
Use `'generic'` for user-invoked exception captures (i.e. default value):
106+
107+
```js
108+
function captureException(error, context) {
109+
const mechanism = {
110+
type: 'generic',
111+
handled: true,
112+
...context?.mechanism,
113+
}
114+
// ...
115+
}
116+
```
69117
70-
: Optional human-readable description of the error mechanism and a possible hint on how to solve this error.
71118
72-
`help_link`
119+
</Expandable>
73120
74-
: Optional fully qualified URL to an online help resource, possibly interpolated with error parameters.
121+
<Expandable title="Why Trace Origin?">
75122
76-
`handled`
123+
Historically, there was no requirement for the `type` attribute naming scheme.
124+
Consequently, different SDKs took diffferent approaches as to how they set the `type` attribute.
125+
In some cases, the `type` attribute was/is not set at all.
126+
Chosing [Trace Origin](/sdk/performance/trace-origin/) as the naming scheme for the `type` attribute means that we're using an already established and accepted naming scheme.
127+
The scheme works well enough for the exception mechanism `type` attribute.
128+
Slight deviations to accomodate for the applicability to exceptions are allowed and to be expected.
129+
SDK maintainers are free to migrate to the new naming scheme for existing capturing mechanisms or use it when adding new mechanisms.
77130
78-
: Optional flag indicating whether the user has handled the exception (for example, via `try ... catch`).
131+
</Expandable>
79132
80-
`synthetic`
133+
#### `handled`
81134
82-
: An optional flag indicating that this error is synthetic. Synthetic errors are errors that
83-
carry little meaning by themselves. This may be because they are created at a central
84-
place (like a crash handler), and are all called the same: `Error`, `Segfault` etc.
85-
When the flag is set, Sentry will then try to use other information (top in-app frame
86-
function) rather than the exception type and value in the UI for the primary event display.
87-
Furthermore, if this flag is set, Sentry will ignore the exception `type` when grouping the
88-
exception into issues.
89-
: This flag should be set for all "segfaults" for instance as every single error group would
90-
look very similar otherwise. Also, errors the SDK creates to add a stack trace to events
91-
that don't have one themselves should be marked as `synthetic` (This happens, for example,
92-
when users set `attachStackTrace: true` and capture a string message via `captureException`
93-
or `captureMessage`.)
135+
Optional (`boolean`)
94136
95-
`exception_id`
137+
Flag indicating whether the user has handled the exception (for example, via `try ... catch`).
96138
97-
: An optional numeric value providing an ID for the exception relative
98-
to this specific event. The SDK should assign simple incrementing integers
99-
to each exception in the tree, starting with 0 for the root of the tree.
100-
In other words, when flattened into the list provided in the exception
101-
values on the event, the last exception in the list should have ID 0,
102-
the previous one should have ID 1, the next previous should have ID 2, etc.
139+
#### `description`
103140
104-
`parent_id`
141+
Optional (`string`)
105142
106-
: An optional numeric value pointing at the exception_id that is the
107-
parent of this exception. The SDK should assign this to all exceptions except
108-
the root exception (the last to be listed in the exception values).
143+
Human-readable description of the error mechanism and a possible hint on how to solve this error.
109144
110-
`is_exception_group`
145+
#### `help_link`
111146
112-
: An optional flag indicating that this exception is part of an exception group type specific to the platform or language.
147+
Optional (`string`)
113148
114-
`source`
149+
Fully qualified URL to an online help resource, possibly interpolated with error parameters.
115150
116-
: An optional string value describing the source of the exception. The SDK should populate this with the name of the property or attribute of the parent exception that this exception was acquired from. In the case of an array, it should include the zero-based array index as well.
151+
#### `synthetic`
152+
153+
Optional (`boolean`)
154+
155+
Flag indicating that this error is synthetic.
156+
Synthetic errors are errors that carry little meaning by themselves.
157+
This may be because they are all created at a central place (like a crash handler), and share the same title: `Error`, `Segfault` etc.
158+
When the flag is set, Sentry will then try to use other information (top in-app frame function) rather than the exception type and value in the UI for the primary event display.
159+
Furthermore, if this flag is set, Sentry will ignore the exception `type` when grouping the exception into issues.
160+
This flag SHOULD be set for all "segfaults" for instance as every single error group would look very similar otherwise.
161+
Also, errors the SDK creates to add a stack trace to events that don't have one themselves SHOULD be marked as `synthetic` (This happens, for example, when users set `attachStackTrace: true` and capture a string message via `captureException` or `captureMessage`.)
162+
163+
#### `exception_id`
164+
165+
Optional (`number`)
166+
167+
An optional numeric value providing an ID for the exception relative to this specific event.
168+
The SDK SHOULD assign simple incrementing integers to each exception in the tree, starting with 0 for the root of the tree.
169+
In other words, when flattened into the list provided in the exception values on the event, the last exception in the list SHOULD have ID 0,
170+
the previous one SHOULD have ID 1, the next previous SHOULD have ID 2, etc.
171+
172+
#### `parent_id`
173+
174+
Optional (`number`)
175+
176+
An optional numeric value pointing at the exception_id that is the parent of this exception.
177+
The SDK SHOULD assign this to all exceptions except the root exception (the last to be listed in the exception values).
178+
179+
#### `is_exception_group`
180+
181+
Optional (`boolean`)
182+
183+
Flag indicating that this exception is part of an exception group type specific to the platform or language.
184+
185+
#### `source`
186+
187+
Optional (`string`)
188+
189+
An optional string value describing the source of the exception.
190+
The SDK SHOULD populate this with the name of the property or attribute of the parent exception that this exception was acquired from.
191+
In the case of an array, it SHOULD include the zero-based array index as well.
117192
118193
- Python Examples: `"__context__"`, `"__cause__"`, `"exceptions[0]"`, `"exceptions[1]"`
119194
- .NET Examples: `"InnerException"`, `"InnerExceptions[0]"`, `"InnerExceptions[1]"`
120195
- JavaScript Examples: `"cause"`, `"errors[0]"`, `"errors[1]"`
121196
122-
`meta`
123-
124-
: Optional information from the operating system or runtime on the exception
125-
mechanism (see [meta information](#meta-information)).
197+
#### `meta`
126198
127-
`data`
199+
Optional information from the operating system or runtime on the exception mechanism (see [meta information](#meta-information)).
128200
129-
: Arbitrary extra data that might help the user understand the error thrown by
130-
this mechanism.
201+
#### `data`
131202
132-
<Alert title="Note" level="warning">
133-
The <code>type</code> attribute is required to send any exception mechanism attribute, even
134-
if the SDK cannot determine the specific mechanism. In this case, set the <code>type</code>
135-
to <code>generic</code>. See below for an example.
136-
</Alert>
203+
Arbitrary extra data that might help the user understand the error thrown by this mechanism.
137204
138205
### Meta information
139206

develop-docs/sdk/platform-specifics/serverless-sdks/aws-lambda.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ sidebar_order: 10
55

66
Lambda functions can be written in numerous programming languages (JavaScript,
77
Python, Ruby, Java, Go, ...). Sentry is currently supporting automatic
8-
instrumentation of Lambda functions written in JavaScript and Python.
8+
instrumentation of Lambda functions written in [JavaScript](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/)
9+
and [Python](https://docs.sentry.io/platforms/python/integrations/aws-lambda/).
910

10-
See the [Sentry Documentation](https://docs.sentry.io/product/integrations/cloud-monitoring/) on how to set up serverless instrumentation.
11+
See the [Sentry Documentation](https://docs.sentry.io/product/integrations/cloud-monitoring/)
12+
on how to set up serverless instrumentation.
1113

1214
## A short primer into AWS Lambda functions, and layers.
1315

@@ -79,3 +81,7 @@ this can be found [here](https://github.com/getsentry/sentry-javascript/blob/mas
7981

8082
To deploy a new version of the Lambda layer to AWS, you need to trigger a new
8183
release of the JavaScript SDK.
84+
85+
### Development Environment
86+
87+
When working on the Sentry AWS Lambda layer, the workflow is that you have your example Lambda function in a dev account on AWS and then deploy your local layer and attach it to your example function. How to do this in Python is described in the [contribution guide](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md#contributing-to-sentry-aws-lambda-layer) of the Python SDK.

docs/platforms/godot/configuration/android.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ Once configured, export your project normally. During export, Godot will automat
3636
While the Android support is comprehensive, there are some current limitations:
3737

3838
- Automatic screenshots on crashes are not yet supported on Android. ([#238](https://github.com/getsentry/sentry-godot/issues/238))
39-
- Local variable values in GDScript stack traces are not currently captured. ([#232](https://github.com/getsentry/sentry-godot/issues/232))
39+
- Attachments are missing in case of native crashes on Android. ([#243](https://github.com/getsentry/sentry-godot/issues/243))
4040

4141
These limitations will be addressed in future versions of the SDK.

docs/product/explore/logs/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ You can create Alert rules and dashboard widgets based on your log queries.
5555
![Log Queries](./img/LogQueries.png)
5656

5757

58+
## AI-Powered Log Analysis
59+
60+
Your Sentry logs can be leveraged with AI agents and tooling for debugging, summarizing, and automated analysis.
61+
62+
- **[Sentry CLI](/cli/logs/)**: Provides command-line access to your logs, making it easy to feed log data directly into AI tools and scripts for analysis.
63+
- **[Sentry MCP Server](/product/sentry-mcp/)**: Provides secure connectivity between your Sentry data and LLM clients using the Model Context Protocol. This enables natural language queries and deep integration with AI tools like Claude, Cursor, and VS Code.
64+
- **[Seer](/product/ai-in-sentry/seer/)**: Sentry's AI debugging agent automatically uses logs alongside other telemetry data to provide intelligent issue analysis and automated fixes.
65+
5866
## Video - Getting Started with Sentry Logs
5967

6068
<VimeoEmbed id="1081149414?h=4094d6e14f" />

docs/product/issues/issue-details/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ Enabling one or more of our [evaluation tracking integrations](/product/explore/
190190

191191
Setting up evaluation tracking also allows you to use Issues Search in conjunction with feature flags. On Issues Search, using the `flags` keyword will allow you to filter for issues containing errors where the feature flag evaluated value is true or false. This allows you to quickly find all errors where a specific flag evaluation and its value of interest are present. See [searchable properties](/concepts/search/searchable-properties/issues/#flags) for more details about the search syntax.
192192

193-
Enabling a [change tracking integration](/product/explore/feature-flags/#change-tracking) will enable annotations on the event volume chart. These lines mark feature flag changes and can help identify regressions caused by a feature flag definition change.
193+
Enabling both [change tracking](/product/explore/feature-flags/#change-tracking) and evaluation tracking integrations adds feature flag change annotations to the event volume chart and unlocks suspect feature flag detection. Feature flag change annotations help you identify regressions caused by updates to a feature flag’s definition. An annotation will only appear for flags that were evaluated before the error event occurred.
194194

195195
![Feature Flag Release Chart](./img/ff-release.png)
196196

197-
Enabling both a change tracking integration and a evaluation tracking integration will enable suspect feature flag detection. Sentry will attempt to identify feature flags which might have caused an error event and highlight them for review.
197+
With suspect feature flag detection, Sentry automatically highlights feature flags that may have contributed to an error event, making it easier to review and pinpoint potential causes.
198198

199199
### Event Grouping Information
200200

docs/product/issues/issue-details/query-injection-issues/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: "Learn more about Potential Query Injection Vulnerability issues an
66

77
Potential Query Injection Vulnerability issues are raised when Sentry detects values taken directly from an incoming request being incorporated into a database query. Unsanitized interpolation of user input can lead to [SQL injection](https://owasp.org/www-community/attacks/SQL_Injection) and related attacks.
88

9+
You can turn on this detector for your project in in **Project Settings > Performance**.
10+
911
## Detection Criteria
1012

1113
The detector evaluates each request in **two stages**:

0 commit comments

Comments
 (0)