Skip to content

Commit 011a89f

Browse files
committed
* 'master' of https://github.com/getsentry/sentry-docs: docs(dev-infra): Update development environment docs (#14585) add Sevvy integration docs (#14601) feat(dart/flutter): improve distinction between Logging integration and Structured Logs (#14527) correcting region storage for symbol and source map metadata (#14600)
2 parents dd149b7 + b9f4584 commit 011a89f

File tree

8 files changed

+118
-34
lines changed

8 files changed

+118
-34
lines changed

develop-docs/development-infrastructure/environment/index.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@ devservices up
3434
After that, you can start the development server inside the `sentry` folder:
3535

3636
```shell
37-
sentry devserver --workers
37+
devservices serve
3838
```
3939

40-
If you are developing for aesthetics only and do not rely on the async workers, you can omit the `--workers` flag in order
41-
to use fewer system resources.
42-
4340
Access it at [http://dev.getsentry.net:8000](http://dev.getsentry.net:8000) (you'll have to wait a bit for webpack to finish).
4441
A superuser account should have been created for you during bootstrap - `[email protected]` with password `admin`.
4542
You can create other users with `sentry createuser`.
@@ -86,8 +83,8 @@ After the server is running we can visit the dev server using `https` at port `:
8683
<Link to="/relay/">Relay</Link> and the ingest workers are not started by default. Follow the instructions below to start them so you can send events to your dev environment Sentry instance:
8784

8885
- Set `SENTRY_USE_RELAY = True` in `~/.sentry/sentry.conf.py`.
89-
- Run `devservices up` to start the services Relay needs. (like for example Kafka)
90-
- (Re-)Start your devserver with the `--ingest` flag (e.g. `sentry devserver --workers --ingest`). This will start the Relay container and all related services alongside your devserver.
86+
- Run `devservices up --mode ingest` to start the services Relay needs. (like for example Kafka)
87+
- Start your devserver (e.g. `devservices serve`).
9188

9289
## Running the Getsentry Development Server
9390

@@ -108,7 +105,7 @@ devservices up
108105
After that, you can start the development server inside the `getsentry` folder:
109106

110107
```shell
111-
getsentry devserver --workers
108+
devservices serve
112109
```
113110

114111
**Note**: You **cannot** have both sentry and getsentry devserver running at the same time.
@@ -123,7 +120,7 @@ by `dev.py` if it exists.
123120
To enable the ingest workers, follow the steps described <Link to="#ingestion-pipeline-relay">here</Link> and run
124121

125122
```shell
126-
getsentry devserver --workers --ingest
123+
devservices serve
127124
```
128125

129126
## Running siloed instances
@@ -134,10 +131,10 @@ The devserver command supports `--silo` option that lets you create siloed insta
134131

135132
```shell
136133
# Start control silo servers
137-
sentry devserver --silo=control --celery-beat --workers
134+
devservices serve --silo=control --celery-beat
138135

139136
# Start region silo servers
140-
sentry devserver --silo=region --celery-beat --workers --ingest
137+
devservices serve --silo=region --celery-beat
141138
```
142139

143140
Siloed servers have the following port assignments:

docs/organization/integrations/debugging/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: "Learn more about Sentry's debugging integrations."
88
- [Foam](/organization/integrations/debugging/foamai/)
99
- [Revise.dev](/organization/integrations/debugging/revisedev/)
1010
- [Rookout](/organization/integrations/debugging/rookout/)
11+
- [Sevvy](/organization/integrations/debugging/sevvy/)
1112
- [Sourcery](/organization/integrations/debugging/sourcery/)
1213
- [Tembo](/organization/integrations/debugging/tembo/)
1314

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Sevvy
3+
sidebar_order: 1
4+
5+
description: "Learn about Sentry's Sevvy integration, which helps users debug, fix, and prevent issues, with full-stack context."
6+
---
7+
The Sevvy integration connects Sentry with Sevvy, an AI on-call engineer that monitors your production systems, debugs failures, and performs root-cause analysis using rich context from across your stack. When Issues are created or updated in Sentry, the agent enriches the event
8+
with data from your logs, metrics, source code, databases, docs, runbooks, PRs, deployments, and past incidents, summarizing the root cause and remediation steps.
9+
10+
This integration is maintained and supported by Sevvy. or more details, questions, or support feel free to contact [email protected].
11+
## Install and Configure
12+
13+
<Alert>
14+
15+
Sentry owner, manager, or admin permissions are required to install this integration.
16+
17+
</Alert>
18+
19+
1. Navigate to **Settings > Integrations > Sevvy**
20+
21+
2. Follow the full [Sevvy installation instructions](https://docs.sevvyai.com/integrations/sentry).

docs/organization/integrations/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ For more details, see the [full Integration Platform documentation](/organizatio
111111
| [Foam](/organization/integrations/debugging/foamai/) | |
112112
| [Revise.dev](/organization/integrations/debugging/revisedev/) | |
113113
| [Rookout](/organization/integrations/debugging/rookout/) | X |
114+
| [Sevvy](/organization/integrations/debugging/sevvy/) | |
114115
| [Sourcery](/organization/integrations/debugging/sourcery/) | |
115116
| [Tembo](/organization/integrations/debugging/tembo/) | |
116117

docs/platforms/dart/common/logs/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ With Sentry Structured Logs, you can send text based log information from your a
2121

2222
<PlatformContent includePath="logs/usage" />
2323

24+
## Integrations
25+
26+
<PlatformContent includePath="logs/integrations" />
27+
2428
## Options
2529

2630
<PlatformContent includePath="logs/options" />
Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Logging Integration
3-
description: "Learn more about the Sentry Logging integration for the Dart SDK."
3+
description: "Integrate Sentry with the Dart Logging package to capture events, breadcrumbs, and automatically send structured logs to Sentry."
44
caseStyle: canonical
55
supportLevel: production
66
sidebar_order: 3
@@ -9,9 +9,19 @@ platforms:
99
- flutter
1010
---
1111

12-
The `sentry_logging` library provides [Logging](https://pub.dev/packages/logging) support for Sentry using the [onRecord property](https://pub.dev/documentation/logging/latest/logging/Logger/onRecord.html). It is able to collect breadcrumbs and capture events. Once this integration is configured, you can use Logging's public API exclusively or in combination to the Sentry's SDK API to capture and enrich events.
12+
This integration connects Sentry with the popular [Dart logging package](https://pub.dev/packages/logging), providing the following capabilities:
1313

14-
The source can be found [on GitHub](https://github.com/getsentry/sentry-dart/tree/main/logging/).
14+
- If `enableLogs` is set to `true`, Sentry will send your log messages as [Sentry Structured Logs](/platforms/dart/logs/) (new in `9.5.0`)
15+
- Captures breadcrumbs from your log calls
16+
- Converts error-level logs into Sentry error events
17+
- Works with your existing logging code
18+
19+
<Alert level="info">
20+
21+
This page covers the instrumentation of the **Dart Logging package**.
22+
This integration also supports creating structured logs. However, if you're looking to set up Sentry structured logs in general, visit our [Structured Logs](/platforms/dart/logs/) documentation.
23+
24+
</Alert>
1525

1626
## Install
1727

@@ -26,8 +36,7 @@ dependencies:
2636
2737
## Configure
2838
29-
Configuration should happen as early as possible in your application's lifecycle.
30-
39+
Add the `LoggingIntegration` to your `Sentry.init` call:
3140

3241
```dart
3342
import 'package:sentry_logging/sentry_logging.dart';
@@ -38,36 +47,64 @@ Future<void> main() async {
3847
(options) {
3948
options.dsn = '___PUBLIC_DSN___';
4049
options.addIntegration(LoggingIntegration());
50+
// If you want to enable sending structured logs, set `enableLogs` to `true`
51+
options.enableLogs = true;
4152
},
4253
appRunner: initApp, // Init your App.
4354
);
4455
}
4556
```
4657

58+
### Configuration Options
59+
60+
| Parameter | Default | Description |
61+
|-----------|---------|-------------|
62+
| `minBreadcrumbLevel` | `Level.INFO` | Minimum level for creating breadcrumbs |
63+
| `minEventLevel` | `Level.SEVERE` | Minimum level for creating error events |
64+
| `minSentryLogLevel` | `Level.INFO` | Minimum level for sending structured logs (requires `enableLogs` to be `true`) |
65+
66+
You can customize which log levels trigger different Sentry features:
67+
68+
```dart
69+
await Sentry.init(
70+
(options) {
71+
options.dsn = '___PUBLIC_DSN___';
72+
options.addIntegration(LoggingIntegration(
73+
minBreadcrumbLevel: Level.INFO, // Breadcrumbs for INFO and above
74+
minEventLevel: Level.SEVERE, // Error events for SEVERE and above
75+
minSentryLogLevel: Level.INFO, // Structured logs for INFO and above
76+
));
77+
},
78+
appRunner: initApp,
79+
);
80+
```
81+
4782
## Verify
4883

49-
This snippet captures an intentional error, so you can test that everything is working as soon as you set it up:
84+
Add the following snippet to your app and execute it to verify that Sentry is capturing your logs:
5085

5186
```dart
5287
import 'package:logging/logging.dart';
5388
54-
void main() async {
89+
void testLogging() {
5590
final log = Logger('MyAwesomeLogger');
5691
57-
log.info('a breadcrumb!');
92+
// This creates a breadcrumb AND a structured log (Level.INFO >= defaults)
93+
log.info('User logged in successfully');
94+
95+
// This creates a breadcrumb AND a structured log (Level.WARNING >= defaults)
96+
log.warning('Rate limit approaching');
5897
5998
try {
60-
throw StateError();
99+
throw StateError('Something went wrong');
61100
} catch (error, stackTrace) {
62-
log.severe('an error!', error, stackTrace);
101+
// This creates a breadcrumb, structured log, AND error event (Level.SEVERE >= all defaults)
102+
log.severe('Critical error occurred', error, stackTrace);
63103
}
64104
}
65105
```
66106

67-
<Alert>
68-
69-
Learn more about manually capturing an error or message, in our <PlatformLink to="/usage/">Usage documentation</PlatformLink>.
70-
71-
</Alert>
72-
73-
To view and resolve the recorded message, log into [sentry.io](https://sentry.io) and open your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
107+
### What You'll See in Sentry:
108+
- **Breadcrumbs**: All three log calls will appear as breadcrumbs on the error event
109+
- **Error Event**: The `severe` log creates a full error event with stack trace
110+
- **Structured Logs**: (if `enableLogs` is `true`) Navigate to **Logs** in your Sentry project to see all three entries as searchable structured logs
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Available integrations:
2+
- [Dart Logging package](/platforms/dart/integrations/logging/)
3+
4+
If there's an integration you would like to see, open a [new issue on GitHub](https://github.com/getsentry/sentry-dart/issues/new/choose).

platform-includes/logs/usage/dart.mdx

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,33 @@ Once the feature is enabled on the SDK and the SDK is initialized, you can send
22

33
The `logger` namespace exposes six methods that you can use to log messages at different log levels: `trace`, `debug`, `info`, `warning`, `error`, and `fatal`.
44

5-
You can pass additional attributes directly to the logging functions. These properties will be sent to Sentry, and can be searched from within the Logs UI, and even added to the Logs views as a dedicated column.
5+
Aside from the primary logging methods, we've provided a format text function, `Sentry.logger.fmt`, that you can use to insert properties into to your log entries.
6+
7+
These properties will be sent to Sentry, and can be searched from within the Logs UI, and even added to the Logs views as a dedicated column.
8+
9+
<Alert level="info">
10+
When using the `fmt` function, you must use the `%s` placeholder for each value you want to insert.
11+
</Alert>
612

713
```dart
8-
Sentry.logger.info("A simple log message");
9-
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
10-
'attribute1': SentryLogAttribute.string('string'),
11-
'attribute2': SentryLogAttribute.int(1),
12-
'attribute3': SentryLogAttribute.double(1.0),
13-
'attribute4': SentryLogAttribute.bool(true),
14+
Sentry.logger.fmt.error('Uh oh, something broke, here is the error: %s', [
15+
errorMsg
16+
], attributes: {
17+
'additional_info': SentryLogAttribute.string('some info'),
1418
});
19+
Sentry.logger.fmt.info("%s added %s to cart.", [user.username, product.name]);
1520
```
21+
22+
You can also pass additional attributes directly to the logging functions, avoiding the need to use the `fmt` function.
23+
24+
```dart
25+
Sentry.logger.error('Uh oh, something broke, here is the error: $errorMsg',
26+
attributes: {
27+
'error': SentryLogAttribute.string(errorMsg),
28+
'some_info': SentryLogAttribute.string('some info'),
29+
});
30+
Sentry.logger.info('User ${user.username} added ${product.name} to cart.', attributes: {
31+
'user': SentryLogAttribute.string(user.username),
32+
'product': SentryLogAttribute.string(product.name),
33+
});
34+
```

0 commit comments

Comments
 (0)