@stackone/olap 3.3.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/index.cjs +49 -51
- package/dist/index.d.cts +111 -2
- package/dist/index.d.mts +111 -2
- package/dist/index.mjs +48 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,6 +156,17 @@ Absent applies no filter. An empty list admits no row, unlike every other array
|
|
|
156
156
|
means unfiltered: a caller scoped to their own credentials who has none should see nothing. A row
|
|
157
157
|
with no credential is never admitted.
|
|
158
158
|
|
|
159
|
+
## The caller's headers in an action log
|
|
160
|
+
|
|
161
|
+
An action's advanced log keeps two sets of headers on `data.request`. `headers` are the action's own
|
|
162
|
+
header inputs, the ones it sends the provider. `callerHeaders` is what `callerHeadersOf` keeps of the
|
|
163
|
+
headers the caller sent StackOne: a short allowlist in full, credential headers by name only, and
|
|
164
|
+
nothing else. The field is absent when nothing is kept.
|
|
165
|
+
|
|
166
|
+
The sink applies the filter itself, so a host may pass raw headers. Only kept values reach the PII
|
|
167
|
+
scrubber, and none are exported as OpenTelemetry attributes. connect-sdk passes them only for
|
|
168
|
+
`action_id` and `path` runs.
|
|
169
|
+
|
|
159
170
|
## Advanced log truncation
|
|
160
171
|
|
|
161
172
|
Advanced logs hold the full request and response of a call. When one is too large to store, what the
|
|
@@ -246,3 +257,16 @@ keep their keys, strings stay strings, scalars are untouched.
|
|
|
246
257
|
|
|
247
258
|
A log that cannot be serialized at all — one carrying a value `JSON.stringify` refuses, such as a
|
|
248
259
|
BigInt — is stored with its payload fields dropped and its envelope intact, rather than being lost.
|
|
260
|
+
|
|
261
|
+
## Log query conditions
|
|
262
|
+
|
|
263
|
+
`Query.conditions` filters the logs list, count, aggregation, dimensions and last-log queries, before pagination. Each condition names an allow-listed snake-case field, an operator from `LOG_QUERY_OPERATORS` and string `values`. Conditions are ANDed. `eq` matches any of its values and `ne` matches none of them; `eq` never matches a missing (NULL) value and `ne` keeps rows where the field is NULL; an empty string is a value like any other. The comparisons `gt`, `gte`, `lt` and `lte` take one number for `status_code` or `duration_ms`, and never match a missing value; a range is two of them, such as `gte` 1000 and `lt` 5000. `status_code` takes whole numbers, as the Int16 it is stored as; a class such as `4xx` is query-language shorthand for callers to expand into the codes it covers. `session_auth_id` matches only `SESSION_TOKEN` credentials.
|
|
264
|
+
|
|
265
|
+
The limits are 50 conditions, 500 values per condition and 2,048 characters per value. `parseLogQueryConditions` checks them, with the field allow-list and the operators' rules, and throws `InvalidLogQueryConditionsError`, whose `issues` name each failing condition and why, ready for a 400. The logs, last-log, aggregation and dimensions readers run the same check before anything else, so an invalid condition is rejected as invalid, rather than as `QueryClientNotConfiguredError`, where ClickHouse is not configured. A query that ClickHouse itself refuses, such as one whose bound values exceed its 128 KiB parameter limit, rejects with ClickHouse's error rather than returning an empty result.
|
|
266
|
+
|
|
267
|
+
## When a read cannot be answered
|
|
268
|
+
|
|
269
|
+
Every read rejects with `QueryClientNotConfiguredError` when the logs sink has no usable ClickHouse
|
|
270
|
+
config, rather than returning an empty result: answer it as a service that is unavailable, not as
|
|
271
|
+
"no logs". The logs, last-log, aggregation and dimensions reads also reject with ClickHouse's error
|
|
272
|
+
when a query fails; the other reads still return an empty result on a failed query.
|