You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
: An optional stack trace object corresponding to the [Stack Trace Interface](/sdk/data-model/event-payloads/stacktrace/).
54
-
55
54
## Exception Mechanism
56
55
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.
61
59
62
60
### Attributes
63
61
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
+
<Expandabletitle="Examples">
65
80
66
-
: Required unique identifier of this mechanism determining rendering and processing of the mechanism data.
Use `'generic'` for user-invoked exception captures (i.e. default value):
106
+
107
+
```js
108
+
functioncaptureException(error, context) {
109
+
constmechanism= {
110
+
type:'generic',
111
+
handled:true,
112
+
...context?.mechanism,
113
+
}
114
+
// ...
115
+
}
116
+
```
69
117
70
-
: Optional human-readable description of the error mechanism and a possible hint on how to solve this error.
71
118
72
-
`help_link`
119
+
</Expandable>
73
120
74
-
: Optional fully qualified URL to an online help resource, possibly interpolated with error parameters.
121
+
<Expandable title="Why Trace Origin?">
75
122
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.
77
130
78
-
: Optional flag indicating whether the user has handled the exception (for example, via `try ... catch`).
131
+
</Expandable>
79
132
80
-
`synthetic`
133
+
#### `handled`
81
134
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`)
94
136
95
-
`exception_id`
137
+
Flag indicating whether the user has handled the exception (for example, via `try...catch`).
96
138
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`
103
140
104
-
`parent_id`
141
+
Optional (`string`)
105
142
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.
109
144
110
-
`is_exception_group`
145
+
#### `help_link`
111
146
112
-
: An optional flag indicating that this exception is part of an exception group type specific to the platform or language.
147
+
Optional (`string`)
113
148
114
-
`source`
149
+
Fully qualified URL to an online help resource, possibly interpolated with error parameters.
115
150
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.
Copy file name to clipboardExpand all lines: develop-docs/sdk/platform-specifics/serverless-sdks/aws-lambda.mdx
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,11 @@ sidebar_order: 10
5
5
6
6
Lambda functions can be written in numerous programming languages (JavaScript,
7
7
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/).
9
10
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.
11
13
12
14
## A short primer into AWS Lambda functions, and layers.
13
15
@@ -79,3 +81,7 @@ this can be found [here](https://github.com/getsentry/sentry-javascript/blob/mas
79
81
80
82
To deploy a new version of the Lambda layer to AWS, you need to trigger a new
81
83
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.
Copy file name to clipboardExpand all lines: docs/product/explore/logs/index.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,14 @@ You can create Alert rules and dashboard widgets based on your log queries.
55
55

56
56
57
57
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.
Copy file name to clipboardExpand all lines: docs/product/issues/issue-details/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,11 +190,11 @@ Enabling one or more of our [evaluation tracking integrations](/product/explore/
190
190
191
191
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.
192
192
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.
194
194
195
195

196
196
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.
Copy file name to clipboardExpand all lines: docs/product/issues/issue-details/query-injection-issues/index.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ description: "Learn more about Potential Query Injection Vulnerability issues an
6
6
7
7
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.
8
8
9
+
You can turn on this detector for your project in in **Project Settings > Performance**.
10
+
9
11
## Detection Criteria
10
12
11
13
The detector evaluates each request in **two stages**:
0 commit comments