Skip to content

Commit 990cfb8

Browse files
[Log Explorer] Adds info about headers and cookies (#24054)
* Adds info about headers and cookies * Moves section to the end of the page. * Moves section to log search page
1 parent 532f942 commit 990cfb8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/content/docs/log-explorer/log-search.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,23 @@ FROM access_requests
5555
WHERE Date >= '2025-02-06' AND Date <= '2025-02-06' AND CreatedAt >= '2025-02-06T12:28:39Z' AND CreatedAt <= '2025-02-06T12:58:39Z'
5656
```
5757

58+
### Headers and cookies
59+
60+
To query request headers and cookies, you must first enable logging for these fields using [Custom fields](/logs/logpush/logpush-job/custom-fields/).
61+
62+
The example below shows how to query HTTP requests by date, timestamp, client country, and a custom request header. Be sure to log the specific headers or cookies you plan to query in advance.
63+
64+
```bash
65+
SELECT clientip, clientrequesthost, clientrequestmethod, edgeendtimestamp, edgestarttimestamp, rayid, clientcountry, requestheaders
66+
FROM http_requests
67+
WHERE Date >= '2025-07-17'
68+
AND Date <= '2025-07-17'
69+
AND edgeendtimestamp >= '2025-07-17T07:54:19Z'
70+
AND edgeendtimestamp <= '2025-07-18T07:54:19Z'
71+
AND clientcountry = 'us'
72+
AND requestheaders."x-test-header" like '%654AM%';
73+
```
74+
5875
### Save queries
5976

6077
After selecting all the fields for your query, you can save it by selecting **Save query**. Provide a name and description to help identify it later. To view your saved and recent queries, select **Queries** — they will appear in a side panel where you can insert a new query, or delete any query.

0 commit comments

Comments
 (0)