Skip to content

Commit 2b57731

Browse files
feat: log context api
request - ``` { "stream": "teststream", "contextWindow": "1m", "pTimestamp": "2026-06-18T07:39:59.995Z", "pageSize": 500, "message": "Application started", "conditions": { "operator": "and", "groups": [ { "operator": "or", "conditionConfig": [ { "column": "level", "operator": "=", "value": "warn", "type": "text" } ] } ] } } ``` response - ``` { "scope": "contextWindow", "contextStartTime": "2026-06-18T07:38:00Z", "contextEndTime": "2026-06-18T07:40:00Z", "limit": 500, "anchorIndex": 10, "duplicateAnchorCount": 15, "anchoredDuplicate": "first", "records": [ { "app_meta": "okcequedfmkqlgzheaidrcce", "device_id": 126.0, "host": "172.162.1.120", "level": "warn", "location": "uqwetjbuvjameflh", "message": "Application is failing", "meta-containerimage": "ghcr.io/parseablehq/quest", "meta-containername": "log-generator", "meta-host": "10.116.0.3", "meta-namespace": "go-apasdp", "meta-podlabels": "app=go-app,pod-template-hash=6c87bc9cc9", "meta-source": "quest-test", "os": "Windows", "p_src_ip": "127.0.0.1", "p_timestamp": "2026-06-18T07:39:59.995", "p_user_agent": "Grafana k6/1.6.1", "request_body": "vlywlgkpmciorkiklfruxcfnzaspahyscsazpmnqgquqrtahrzhmtojwvackzcqngscesuadnupwpdsryfrvlifembjotnftzuwx", "session_id": "pqr", "source_time": "2026-06-18T07:39:59.991", "status_code": 500.0, "user_id": 98513.0, "uuid": "169fa593-fa27-4625-8576-1faab8b9cc71", "version": "1.2.0" } ], "queries": { "previous": { "query": "SELECT * FROM (SELECT * FROM \"teststream\" WHERE ((\"p_timestamp\" >= TIMESTAMP '2026-06-18 07:38:00.000' AND \"p_timestamp\" < TIMESTAMP '2026-06-18 07:40:00.000') AND ((\"level\" = 'warn'))) AND (\"p_timestamp\" > TIMESTAMP '2026-06-18 07:39:59.995' OR (\"p_timestamp\" = TIMESTAMP '2026-06-18 07:39:59.995' AND \"message\" < 'Application is failing')) ORDER BY \"p_timestamp\" ASC, \"message\" DESC LIMIT 500) AS log_context_seek_page ORDER BY \"p_timestamp\" DESC, \"message\" ASC", "startTime": "2026-06-18T07:38:00Z", "endTime": "2026-06-18T07:40:00Z", "sendNull": false }, "next": { "query": "SELECT * FROM \"teststream\" WHERE ((\"p_timestamp\" >= TIMESTAMP '2026-06-18 07:38:00.000' AND \"p_timestamp\" < TIMESTAMP '2026-06-18 07:40:00.000') AND ((\"level\" = 'warn'))) AND (\"p_timestamp\" < TIMESTAMP '2026-06-18 07:39:59.662' OR (\"p_timestamp\" = TIMESTAMP '2026-06-18 07:39:59.662' AND \"message\" > 'Logging a request')) ORDER BY \"p_timestamp\" DESC, \"message\" ASC LIMIT 500", "startTime": "2026-06-18T07:38:00Z", "endTime": "2026-06-18T07:40:00Z", "sendNull": false } } } ```
1 parent 0f35674 commit 2b57731

6 files changed

Lines changed: 1351 additions & 327 deletions

File tree

0 commit comments

Comments
 (0)