Skip to content

Commit 2a9e006

Browse files
committed
* 'master' of https://github.com/getsentry/sentry-docs: feat(seer): Seer webhook docs (#14702) feat: Update logs spec to mention message template constraint (#14759) Unreal Engine: Update sampling docs (#14740) Unreal Engine: Update info about reading certain options from env vars (#14714) feat(Apple): Add `enableUnhandledCPPExceptionsV2` to experimental features (#14731) feat(kmp): Add Sentry Cocoa compatibility version info (#14737) Fix reference to span in processOrderBatch function (#14741) chore(java): Add docs on how to use tracePropagationTargets (#14752)
2 parents 36a901c + 83d8d1f commit 2a9e006

File tree

13 files changed

+376
-42
lines changed

13 files changed

+376
-42
lines changed

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ If the log was paramaterized the SDK should attach the following
299299
}
300300
```
301301

302+
If there are no `sentry.message.parameter.X` attributes included in the log, then the SDK MUST NOT attach a `sentry.message.template` attribute. This is important because it reduces duplicate content in the log and makes PII processing in Sentry much easier as only we don't have to duplicate processing between the log message and the `sentry.message.template` attribute.
303+
302304
#### SDK Integration Attributes
303305

304306
If a log is generated by an SDK integration, the SDK should also set the `sentry.origin` attribute, as per the [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation. It is assumed that logs without a `sentry.origin` attribute are manually created by the user.

docs/organization/integrations/integration-platform/webhooks.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ This header lets you know which resource from the list below triggered an action
4242
- `metric_alert`
4343
- `error`
4444
- `comment`
45+
- `seer`
4546

4647
### `Sentry-Hook-Signature`
4748

@@ -146,6 +147,8 @@ Webhooks should respond within 1 second. Otherwise, the response is considered a
146147

147148
- [Errors](/organization/integrations/integration-platform/webhooks/errors/)
148149

150+
- [Seer](/organization/integrations/integration-platform/webhooks/seer/)
151+
149152
## Developing and Testing Webhooks
150153

151154
If you’d like to test webhook configuration and look at payloads before starting development, an HTTP catch-all service that provides a designated URL where you can receive HTTP payloads and inspect the JSON event payload can come in handy. After you’ve reviewed the relevant event payloads, you can begin development.
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
---
2+
title: Seer
3+
sidebar_order: 7
4+
description: "Learn more about Sentry's integration platform Seer webhooks for Issue Fix analysis notifications."
5+
---
6+
7+
Sentry integrations that have subscribed to Seer webhooks can receive notifications about the Seer [Issue Fix](/product/ai-in-sentry/seer/issue-fix/) process. These webhooks allow you to track the progress of automated root cause analysis, solution generation, and code fixes.
8+
9+
## Sentry-Hook-Resource Header
10+
11+
`'Sentry-Hook-Resource': 'seer'`
12+
13+
## Webhook Types
14+
15+
Seer webhooks support seven different event types that track the complete lifecycle of AI-powered issue resolution:
16+
17+
### Root Cause Analysis
18+
- `seer.root_cause_started` - Triggered when root cause analysis begins
19+
- `seer.root_cause_completed` - Triggered when root cause analysis completes with results
20+
21+
### Solution Generation
22+
- `seer.solution_started` - Triggered when solution generation begins
23+
- `seer.solution_completed` - Triggered when a solution has been generated
24+
25+
### Code Generation
26+
- `seer.coding_started` - Triggered when code generation/fixing begins
27+
- `seer.coding_completed` - Triggered when code changes are ready
28+
- `seer.pr_created` - Triggered when pull request(s) are created
29+
30+
## Common Attributes
31+
32+
All Seer webhooks share these common attributes:
33+
34+
### action
35+
36+
- type: string
37+
- description: The specific Seer event that occurred (e.g., `root_cause_started`, `solution_completed`)
38+
39+
### data['run_id']
40+
41+
- type: integer
42+
- description: Unique identifier for this Seer analysis run
43+
44+
### data['group_id']
45+
46+
- type: integer
47+
- description: The Sentry issue ID being analyzed
48+
49+
## Event-Specific Payloads
50+
51+
### Root Cause Started
52+
53+
Minimal payload indicating analysis has begun:
54+
55+
```json
56+
{
57+
"action": "root_cause_started",
58+
"actor": {
59+
"id": "sentry",
60+
"name": "Sentry",
61+
"type": "application"
62+
},
63+
"data": {
64+
"run_id": 12345,
65+
"group_id": 1170820242
66+
},
67+
"installation": {
68+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
69+
}
70+
}
71+
```
72+
73+
### Root Cause Completed
74+
75+
Includes the identified root cause:
76+
77+
```json
78+
{
79+
"action": "root_cause_completed",
80+
"actor": {
81+
"id": "sentry",
82+
"name": "Sentry",
83+
"type": "application"
84+
},
85+
"data": {
86+
"run_id": 12345,
87+
"group_id": 1170820242,
88+
"root_cause": {
89+
"description": "Woah wow there's a bug here.",
90+
"steps": [
91+
{
92+
"title": "User navigates to the dashboard page, initiating page load.",
93+
"code_snippet_and_analysis": "The user's browser sends a GET request to `/dashboard`. This is the entry point for the issue.",
94+
"timeline_item_type": "human_action",
95+
"relevant_code_file": {
96+
"file_path": "N/A",
97+
"repo_name": "N/A"
98+
},
99+
"is_most_important_event": false
100+
},
101+
{
102+
"title": "Next.js server renders the /dashboard route.",
103+
"code_snippet_and_analysis": "The Next.js server processes the request and hits the bug",
104+
"timeline_item_type": "internal_code",
105+
"relevant_code_file": {
106+
"file_path": "src/app/page.ts",
107+
"repo_name": "owner/repo"
108+
},
109+
"is_most_important_event": true
110+
}
111+
]
112+
}
113+
},
114+
"installation": {
115+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
116+
}
117+
}
118+
```
119+
120+
### Solution Started
121+
122+
Minimal payload indicating solution generation has begun:
123+
124+
```json
125+
{
126+
"action": "solution_started",
127+
"actor": {
128+
"id": "sentry",
129+
"name": "Sentry",
130+
"type": "application"
131+
},
132+
"data": {
133+
"run_id": 12345,
134+
"group_id": 1170820242
135+
},
136+
"installation": {
137+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
138+
}
139+
}
140+
```
141+
142+
### Solution Completed
143+
144+
Includes the generated solution details:
145+
146+
```json
147+
{
148+
"action": "solution_completed",
149+
"actor": {
150+
"id": "sentry",
151+
"name": "Sentry",
152+
"type": "application"
153+
},
154+
"data": {
155+
"run_id": 12345,
156+
"group_id": 1170820242,
157+
"solution": {
158+
"description": "Definitely need to fix this.",
159+
"steps": [
160+
{
161+
"title": "Go fix it",
162+
},
163+
{
164+
"title": "Then go fix this other thing.",
165+
},
166+
],
167+
168+
}
169+
},
170+
"installation": {
171+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
172+
}
173+
}
174+
```
175+
176+
### Coding Started
177+
178+
Minimal payload indicating code generation has begun:
179+
180+
```json
181+
{
182+
"action": "coding_started",
183+
"actor": {
184+
"id": "sentry",
185+
"name": "Sentry",
186+
"type": "application"
187+
},
188+
"data": {
189+
"run_id": 12345,
190+
"group_id": 1170820242
191+
},
192+
"installation": {
193+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
194+
}
195+
}
196+
```
197+
198+
### Coding Completed
199+
200+
Includes details about the code changes made:
201+
202+
```json
203+
{
204+
"action": "coding_completed",
205+
"actor": {
206+
"id": "sentry",
207+
"name": "Sentry",
208+
"type": "application"
209+
},
210+
"data": {
211+
"run_id": 12345,
212+
"group_id": 1170820242,
213+
"changes": [
214+
{
215+
"repo_name": "my-app",
216+
"repo_external_id": "12345",
217+
"title": "fix: Initialize undefined variable",
218+
"description": "This change initializes the 'blooopy' variable before use to prevent ReferenceError",
219+
"diff": "<the diff as a string>",
220+
"branch_name": "seer/fix-this-thing",
221+
}
222+
]
223+
},
224+
"installation": {
225+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
226+
}
227+
}
228+
```
229+
230+
### PR Created
231+
232+
Includes pull request details, there may be more than one pull request if there are multiple repos:
233+
234+
```json
235+
{
236+
"action": "pr_created",
237+
"actor": {
238+
"id": "sentry",
239+
"name": "Sentry",
240+
"type": "application"
241+
},
242+
"data": {
243+
"run_id": 12345,
244+
"group_id": 1170820242,
245+
"pull_requests": [
246+
{
247+
"pull_request": {
248+
"pr_number": 123,
249+
"pr_url": "https://github.com/owner/repo/pull/123",
250+
"pr_id": 456789
251+
},
252+
"repo_name": "my-app",
253+
"provider": "github"
254+
}
255+
]
256+
},
257+
"installation": {
258+
"uuid": "a8e5d37a-696c-4c54-adb5-b3f28d64c7de"
259+
}
260+
}
261+
```
262+
263+
## Use Cases
264+
265+
Seer webhooks enable you to:
266+
267+
1. **Track Progress**: Monitor the status of Seer Issue Fix in real-time
268+
2. **Build Notifications**: Send custom notifications when fixes are ready
269+
3. **Audit Trail**: Maintain a log of all Seer fixes for your issues
270+
4. **Custom Integrations**: Build custom tools that react to Seer's analysis results
271+
272+
## Best Practices
273+
274+
- Store the `run_id` to correlate related webhook events
275+
- Use the `group_id` to link webhooks back to the original Sentry issue

docs/platforms/android/tracing/trace-propagation/index.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,34 @@ If you run any JavaScript applications in your distributed system, make sure tha
3232
<PlatformContent includePath="distributed-tracing/how-to-use/" />
3333

3434
Remember that in order to propagate trace information through your whole distributed system, you have to use Sentry in all of the involved services and applications. Take a look at the respective SDK documentation to learn how distributed tracing can be enabled for each platform.
35+
36+
### tracePropagationTargets
37+
38+
The Android SDK will attach the `sentry-trace` and `baggage` headers to all outgoing requests by default. To narrow
39+
this down to only specific URLs, add those URLs to the `tracePropagationTargets` allowlist, (you can use both
40+
strings and regexes). The SDK will then only attach the `sentry-trace` and `baggage` headers to outgoing requests matching the allowlist.
41+
42+
<Alert>
43+
The `tracePropagationTargets` option can contain full URLs (e.g. `"https://api.myproject.org/request/path"`), sub-strings (e.g. `"api.myproject.org"`) or regular expressions (e.g. `"https://[\w]*\.myproject\.org/.*"`).
44+
</Alert>
45+
46+
Since the value of `tracePropagationTargets` is `".*"` by default, tracing headers are attached to all requests unless otherwise specified.
47+
48+
```java {tabTitle:Java}
49+
SentryAndroid.init(context, options -> {
50+
final ArrayList<String> tracePropagationTargets = new ArrayList<>();
51+
tracePropagationTargets.add("https://api.myproject.org/");
52+
53+
options.setDsn("___PUBLIC_DSN___");
54+
options.setTracePropagationTargets(tracePropagationTargets);
55+
});
56+
```
57+
58+
```kotlin {tabTitle:Kotlin}
59+
SentryAndroid.init(context, { options ->
60+
options.setDsn("___PUBLIC_DSN___")
61+
options.setTracePropagationTargets(listOf(
62+
"https://api.myproject.org/"
63+
))
64+
})
65+
```

docs/platforms/apple/common/features/experimental-features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ Do you want to try some new experimental features? On the latest version of the
2020
</PlatformSection>
2121
- If you use Swift concurrency, stitch together stack traces of your async code with the `swiftAsyncStacktraces` option. Note that you can enable this in your Objective-C project, but only async code written in Swift will be stitched together.
2222
- Enable the <PlatformLink to="/configuration/options/#enable-persisting-traces-when-crashing">`enablePersistingTracesWhenCrashing`</PlatformLink> option to link ongoing transactions to a crash event when your app crashes.
23-
23+
- Enable the `enableUnhandledCPPExceptionsV2` option to capture fatal CPPExceptions via hooking into `cxa_throw`
2424

2525
Let us know if you have feedback through [GitHub issues](https://github.com/getsentry/sentry-cocoa/issues).

docs/platforms/java/common/tracing/trace-propagation/index.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,34 @@ If you run any JavaScript applications in your distributed system, make sure tha
3232
<PlatformContent includePath="distributed-tracing/how-to-use/" />
3333

3434
Remember that in order to propagate trace information through your whole distributed system, you have to use Sentry in all of the involved services and applications. Take a look at the respective SDK documentation to learn how distributed tracing can be enabled for each platform.
35+
36+
### tracePropagationTargets
37+
38+
The Java SDK will attach the `sentry-trace` and `baggage` headers to all outgoing requests by default. To narrow
39+
this down to only specific URLs, add those URLs to the `tracePropagationTargets` allowlist, (you can use both
40+
strings and regexes). The SDK will then only attach the `sentry-trace` and `baggage` headers to outgoing requests matching the allowlist.
41+
42+
<Alert>
43+
The `tracePropagationTargets` option can contain full URLs (e.g. `"https://api.myproject.org/request/path"`), sub-strings (e.g. `"api.myproject.org"`) or regular expressions (e.g. `"https://[\w]*\.myproject\.org/.*"`).
44+
</Alert>
45+
46+
Since the value of `tracePropagationTargets` is `".*"` by default, tracing headers are attached to all requests unless otherwise specified.
47+
48+
```java {tabTitle:Java}
49+
Sentry.init(context, options -> {
50+
final ArrayList<String> tracePropagationTargets = new ArrayList<>();
51+
tracePropagationTargets.add("https://api.myproject.org/");
52+
53+
options.setDsn("___PUBLIC_DSN___");
54+
options.setTracePropagationTargets(tracePropagationTargets);
55+
});
56+
```
57+
58+
```kotlin {tabTitle:Kotlin}
59+
Sentry.init(context, { options ->
60+
options.setDsn("___PUBLIC_DSN___")
61+
options.setTracePropagationTargets(listOf(
62+
"https://api.myproject.org/"
63+
))
64+
})
65+
```

0 commit comments

Comments
 (0)