Skip to content

Commit 4c259a2

Browse files
authored
Merge pull request #821 from getsentry/fix/mimi-search
Fix/mimi search
2 parents 4cd4c78 + fe1b437 commit 4c259a2

File tree

8 files changed

+52
-14
lines changed

8 files changed

+52
-14
lines changed

src/collections/_documentation/enriching-error-data/set-tag/javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Sentry.configureScope((scope) => {
33
scope.setTag("{{ page.example_tag_name }}", "{{ page.example_tag_value }}");
44
});
5-
```
5+
```

src/collections/_documentation/enriching-error-data/set-tag/php.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Sentry\configureScope(function (Sentry\State\Scope $scope): void {
33
$scope->setTag('{{ page.example_tag_name }}', '{{ page.example_tag_value }}');
44
});
5-
```
5+
```

src/collections/_documentation/workflow/search.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Search
33
sidebar_order: 3
4+
example_tag_name: page_locale
5+
example_tag_value: de-at
46
---
57

68
Search is available on several major Sentry views: Issues, Events, and Releases.
@@ -14,10 +16,11 @@ Discover is Sentry's powerful query builder for aggregating raw event data and h
1416
level="info"
1517
%}
1618

17-
 
1819
## Syntax
1920

20-
Queries are constructed using a `key:value` pattern, with an optional raw search at the end. Each `key:value` pair is a `token`, except the optional raw search. The optional raw search is itself a `token`. For example:
21+
Queries are constructed using a `key:value` pattern, with an optional raw search at the end. Each `key:value` pair is a `token` and the optional raw search is itself a `token`. The Sentry SDKs treat the `key:value` pair `token` as a search on an issue or event property. The SDKs treat the optional raw search `token` as a message separated by whitespace, which is used to search on event titles/messages.
22+
23+
For example:
2124

2225
```
2326
is:resolved user.username:"Jane Doe" server:web-8 example error
@@ -30,11 +33,10 @@ In the example above, there are three keys (`is:`, `user.username:`, `server:`),
3033
- `server:web-8`
3134
- `example error`
3235

33-
The tokens `is:resolved` and `user.username:"Jane Doe"` are standard search tokens because both use reserved keywords. See [Issue Properties](#issue-properties) and [Events Properties](#events-properties) for appropriate keyword usage. The token `server:web-8` is pointing to a custom tag sent by the Sentry SDK.
36+
The tokens `is:resolved` and `user.username:"Jane Doe"` are standard search tokens because both use reserved keywords. See [Issue Properties](#issue-properties) and [Event Properties](#event-properties) for appropriate keyword usage. The token `server:web-8` is pointing to a custom tag sent by the Sentry SDK. See [Custom Tags](#custom-tags) for more information on how to set tags.
3437

3538
The token `example error` is utilizing the optional raw search and is passed as part of the issue search query (which uses a CONTAINS match similar to SQL). When using the optional raw search, you can provide _one_ string, and the query uses that entire string.
3639

37-
 
3840
### Advanced
3941

4042
#### Exclusion
@@ -49,7 +51,6 @@ is:unresolved !user.email:[email protected]
4951

5052
In the example above, the search query returns all Issues that are unresolved _and_ have not affected the user with the email address `[email protected]`.
5153

52-
 
5354
#### Wildcards
5455

5556
Search supports the wildcard operator `*` as a placeholder for specific characters and strings.
@@ -60,12 +61,11 @@ browser:"Safari 11*"
6061

6162
In the example above, the search query will match on `browser` values like `"Safari 11.0.2"`, `"Safari 11.0.3"`, etc.
6263

63-
 
6464
## Search Properties
6565

6666
In the examples above, we've highlighted a couple of example properties you can search on: `is`, `user`, `server`, `browser`, etc. Below is a canonical list of all available search terms.
6767

68-
### Issue Properties {#issue-properties}
68+
### Issue Properties
6969

7070
Issues are an aggregate of one or more events. Searchable properties include workflow status, assignment, aggregate counts, and age.
7171

@@ -148,8 +148,7 @@ Below is a list of Issue-level tokens reserved and known to Sentry:
148148

149149
`lastSeen:-2d`
150150

151-
 
152-
### Events Properties {#events-properties}
151+
### Event Properties
153152

154153
Events are the underlying event data captured using Sentry SDKs (read: errors and exceptions).
155154

@@ -218,12 +217,22 @@ Below is a list of Event-level tokens reserved and known to Sentry:
218217

219218
: Restrict results to events with a matching stack property.
220219

221-
 
222220
### Custom Tags
223221

224-
Additionally, you can use any tag you’ve specified as a token.
222+
Additionally, you can use any tag you’ve specified as a token. Tags are various key/value pairs that get assigned to an event, and you can use them later as a breakdown or quick access to finding related events.
223+
224+
Most SDKs generally support configuring tags by configuring the scope:
225+
226+
{% include components/platform_content.html content_dir='set-tag' %}
227+
228+
Several common uses for tags include:
229+
230+
- The hostname of the server
231+
- The version of your platform (for example, iOS 5.0)
232+
- The user’s language
233+
234+
For more information, see [full documentation on Tagging Events]({%- link _documentation/enriching-error-data/context.md -%}#tagging-events).
225235

226-
 
227236
## Saving Searches
228237

229238
You can save a search by performing the search, clicking the dropdown arrow next to the Current Search, and then "Save Current Search".
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```csharp
2+
using Sentry;
3+
4+
SentrySdk.ConfigureScope(scope =>
5+
{
6+
scope.SetTag("{{ page.example_tag_name }}", "{{ page.example_tag_value }}");
7+
});
8+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```javascript
2+
Sentry.configureScope((scope) => {
3+
scope.setTag("{{ page.example_tag_name }}", "{{ page.example_tag_value }}");
4+
});
5+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```php
2+
Sentry\configureScope(function (Sentry\State\Scope $scope): void {
3+
$scope->setTag('{{ page.example_tag_name }}', '{{ page.example_tag_value }}');
4+
});
5+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```python
2+
from sentry_sdk import configure_scope
3+
4+
with configure_scope() as scope:
5+
scope.set_tag("{{ page.example_tag_name }}", "{{ page.example_tag_value }}")
6+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```rust
2+
sentry::configure_scope(|scope| {
3+
scope.set_tag("{{ page.example_tag_name }}", "{{ page.example_tag_value }}");
4+
});
5+
```

0 commit comments

Comments
 (0)