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
Copy file name to clipboardExpand all lines: src/platforms/common/profiling/index.mdx
+63-1Lines changed: 63 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ supported:
5
5
- android
6
6
- apple
7
7
- python
8
+
- rust
8
9
notSupported:
9
10
- unity
10
11
- dart
11
12
- flutter
12
-
- rust
13
13
- native
14
14
- php
15
15
- ruby
@@ -50,6 +50,16 @@ Python profiling is currently in alpha. Alpha features are still in-progress and
50
50
51
51
</PlatformSection>
52
52
53
+
<PlatformSectionsupported={["rust"]}>
54
+
55
+
<Note>
56
+
57
+
Rust Profiling is currently in alpha. Alpha features are still in-progress and may have bugs. We recognize the irony. If you have any questions or feedback, please email us at [[email protected]](mailto:[email protected]).
58
+
59
+
</Note>
60
+
61
+
</PlatformSection>
62
+
53
63
With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments.
54
64
55
65
## Enable Performance Monitoring
@@ -91,6 +101,20 @@ sentry_sdk.init(
91
101
92
102
</PlatformSection>
93
103
104
+
<PlatformSectionsupported={["rust"]}>
105
+
106
+
```rust
107
+
sentry::init((
108
+
"___DSN___",
109
+
sentry::ClientOptions {
110
+
traces_sample_rate:1.0,
111
+
..Default::default()
112
+
},
113
+
));
114
+
```
115
+
116
+
</PlatformSection>
117
+
94
118
Check out the <PlatformLinkto="/performance/">performance setup documentation</PlatformLink> for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured. By default, some transactions will be created automatically for common operations like loading a view controller/activity and app startup.
95
119
96
120
## Enable Profiling
@@ -159,6 +183,44 @@ The <PlatformIdentifier name="profiles_sample_rate" /> setting is *relative* to
159
183
160
184
</PlatformSection>
161
185
186
+
187
+
<PlatformSectionsupported={["rust"]}>
188
+
189
+
<Note>
190
+
191
+
Rust Profiling alpha is available starting in SDK version `0.29.0`.
192
+
193
+
</Note>
194
+
195
+
In order to use Profiling, you first need to enable the `profiling` feature in the `sentry` dependency inside the project `Cargo.toml`:
196
+
197
+
```cargo
198
+
[dependencies]
199
+
sentry = { version = "0.29.0", features = ["profiling"] }
200
+
```
201
+
202
+
Once you've completed the step above, you can proceed by enabling it in the SDK:
203
+
204
+
```rust
205
+
sentry::init((
206
+
"___DSN___",
207
+
sentry::ClientOptions {
208
+
traces_sample_rate:1.0,
209
+
enable_profiling:true,
210
+
profiles_sample_rate:1.0,
211
+
..Default::default()
212
+
},
213
+
));
214
+
```
215
+
216
+
<Note>
217
+
218
+
The <PlatformIdentifiername="profiles_sample_rate" /> setting is *relative* to the <PlatformIdentifiername="traces_sample_rate" /> setting.
219
+
220
+
</Note>
221
+
222
+
</PlatformSection>
223
+
162
224
## Troubleshooting
163
225
164
226
If you don't see any profiling data in [sentry.io](https://sentry.io), you can try the following:
0 commit comments