From 4ab6b6bea9f1c0d33790c8186f79abb58b2c727e Mon Sep 17 00:00:00 2001 From: Liza Mock Date: Thu, 5 Sep 2024 09:41:32 -0700 Subject: [PATCH 1/2] add notes to search syntax --- docs/concepts/search/index.mdx | 4 ++++ docs/concepts/search/searchable-properties/issues.mdx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/concepts/search/index.mdx b/docs/concepts/search/index.mdx index 91c847e6d9669a..7aa946166ba94d 100644 --- a/docs/concepts/search/index.mdx +++ b/docs/concepts/search/index.mdx @@ -8,6 +8,10 @@ Search is available on several features throughout [sentry.io](https://sentry.io ## Query Syntax + +You'll only need to use query syntax if you're using a Sentry [API](/api/). You'll get pre-populated suggestions once you start typing in your search terms when using the search bar anywhere in [Sentry.io](https://sentry.sentry.io/). + + Search 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 single `token`. The `key:value` pair `tokens` are treated as issue or event properties. The optional raw search is treated as a single `token` and searches event titles/messages. For example: diff --git a/docs/concepts/search/searchable-properties/issues.mdx b/docs/concepts/search/searchable-properties/issues.mdx index bdbb5e78746661..008e87be88f12c 100644 --- a/docs/concepts/search/searchable-properties/issues.mdx +++ b/docs/concepts/search/searchable-properties/issues.mdx @@ -10,6 +10,10 @@ sidebar_order: 10 Below is a list of keys and tokens that can be used in the issues search. + +You'll only need to use query syntax for **datetime** and **relative time** searchable property types if you're using the Sentry [API](/api/). + + ### `age` From 656927f650e4b222bcc2cec3e4488f8771e868f2 Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Wed, 18 Sep 2024 09:03:37 -0700 Subject: [PATCH 2/2] Update Trace Explorer syntax section --- docs/product/explore/traces/index.mdx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/product/explore/traces/index.mdx b/docs/product/explore/traces/index.mdx index 8272df960c866d..f67b8349cc707a 100644 --- a/docs/product/explore/traces/index.mdx +++ b/docs/product/explore/traces/index.mdx @@ -80,13 +80,6 @@ All events have built-in key fields or custom tags, this includes our span data. ### Syntax -The Query Builder syntax is identical to [Sentry's Search syntax](/concepts/search/). After you enter a key field from above or a custom tag, you can use any of the referenced syntax. For example, `count()` gives you the number of times an event occurs. This can be written in the following ways: +The Query Builder syntax is identical to [Sentry's Search syntax](/concepts/search/). After you enter a key field from above or a custom tag, you can use any of the referenced syntax. For example, `count()` gives you the number of times an event occurs. -- Exact match (is equal to): `span.duration:99` -- Upper bounds (is less than or equal to): `span.duration:<99` or `span.duration:<=99` -- Lower bounds (is more than or equal to): `span.duration:>99` or `span.duration:>=99` -- Multiple bounds (is more and less than): `span.duration:>10 span.duration:<20` - -Use `OR` and `AND` search conditions between filters. However `OR` cannot be used between aggregate and non-aggregate filters. For more details about these conditions, see [Using `OR` and `AND`](/concepts/search/#using-or-and-and). - -You can also search multiple values for the same key by putting the values in a list. For example, "x:[value1, value2]" will find the same results as "x:value1 `OR` x:value2". You can learn more in our content covering [Multiple Values on the Same Key](/concepts/search/#multiple-values-on-the-same-key). +Use `OR` and `AND` to search conditions between filters. However `OR` cannot be used between aggregate and non-aggregate filters. For more details about these conditions, see [Using `OR` and `AND`](/concepts/search/#using-or-and-and).