zuplo 7.15.0 → 7.15.1
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/LICENSE.txt +5 -78
- package/README.md +17 -0
- package/docs/concepts/project-structure.mdx +1 -1
- package/docs/programmable-api/compatibility-dates.mdx +5 -4
- package/docs/programmable-api/logger.mdx +3 -0
- package/docs/programmable-api/runtime-extensions.mdx +14 -0
- package/docs/programmable-api/telemetry-redaction.mdx +308 -0
- package/docs/programmable-api/zuplo-json.mdx +2 -2
- package/package.json +6 -6
package/LICENSE.txt
CHANGED
|
@@ -1,80 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
Copyright (c) Zuplo, Inc. All rights reserved.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"Software").
|
|
3
|
+
Use of this software is governed by the Zuplo Terms of Service at
|
|
4
|
+
https://zuplo.com/legal/terms, or by a separate agreement your company has
|
|
5
|
+
signed with Zuplo.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
by the terms of this Agreement. If you do not agree, do not install or use the
|
|
10
|
-
Software.
|
|
11
|
-
|
|
12
|
-
## 1. License Grant
|
|
13
|
-
|
|
14
|
-
Subject to the terms of this Agreement, Zuplo grants you a limited,
|
|
15
|
-
non-exclusive, non-transferable, non-sublicensable license to use the Software
|
|
16
|
-
**solely for internal local development purposes** and **only if you are an
|
|
17
|
-
active customer of Zuplo**.
|
|
18
|
-
|
|
19
|
-
## 2. Restrictions
|
|
20
|
-
|
|
21
|
-
You may **not**:
|
|
22
|
-
|
|
23
|
-
- Distribute, sublicense, lease, rent, or otherwise make the Software available
|
|
24
|
-
to any third party;
|
|
25
|
-
- Use the Software for any commercial purpose other than in connection with your
|
|
26
|
-
authorized use of Zuplo services;
|
|
27
|
-
- Reverse engineer, decompile, disassemble, or attempt to derive the source code
|
|
28
|
-
of the Software;
|
|
29
|
-
- Use the Software if you are not a current customer of Zuplo.
|
|
30
|
-
|
|
31
|
-
## 3. Intellectual Property Ownership
|
|
32
|
-
|
|
33
|
-
All intellectual property rights in and to the Software — including but not
|
|
34
|
-
limited to all code, documentation, interfaces, design, and trademarks — are and
|
|
35
|
-
shall remain the exclusive property of Zuplo and its licensors.
|
|
36
|
-
This Agreement does not grant you any rights, title, or interest in or to any
|
|
37
|
-
trademarks, trade secrets, copyrights, patents, or other intellectual property
|
|
38
|
-
owned by Zuplo, except for the limited license expressly set forth in Section 1.
|
|
39
|
-
|
|
40
|
-
Any feedback, suggestions, or improvements you provide regarding the Software
|
|
41
|
-
may be freely used by Zuplo without any obligation to you.
|
|
42
|
-
|
|
43
|
-
## 4. Open Source Software Notice
|
|
44
|
-
|
|
45
|
-
The Software may include or rely on components that are subject to separate open
|
|
46
|
-
source licenses. These components are not governed by this Agreement but instead
|
|
47
|
-
by their respective licenses.
|
|
48
|
-
|
|
49
|
-
Copies of the applicable open source licenses are provided in the distribution
|
|
50
|
-
of the Software.
|
|
51
|
-
|
|
52
|
-
## 5. Termination
|
|
53
|
-
|
|
54
|
-
This license is effective until terminated. It will automatically terminate
|
|
55
|
-
without notice if you cease to be a customer of Zuplo or fail to comply with any
|
|
56
|
-
term of this Agreement. Upon termination, you must immediately cease all use of
|
|
57
|
-
the Software and destroy all copies.
|
|
58
|
-
|
|
59
|
-
## 6. No Warranty
|
|
60
|
-
|
|
61
|
-
The Software is provided "**as is**," without warranty of any kind, express or
|
|
62
|
-
implied, including but not limited to the implied warranties of merchantability
|
|
63
|
-
or fitness for a particular purpose.
|
|
64
|
-
|
|
65
|
-
## 7. Limitation of Liability
|
|
66
|
-
|
|
67
|
-
In no event shall Zuplo be liable for any indirect, incidental, special, or
|
|
68
|
-
consequential damages, or damages for loss of profits, revenue, data, or use,
|
|
69
|
-
incurred by you or any third party, whether in an action in contract or tort,
|
|
70
|
-
arising from your use of the Software.
|
|
71
|
-
|
|
72
|
-
## 8. Governing Law
|
|
73
|
-
|
|
74
|
-
This Agreement is governed by and construed in accordance with the laws of the
|
|
75
|
-
State of Delaware, without regard to its conflict of law principles.
|
|
76
|
-
|
|
77
|
-
## 9. Entire Agreement
|
|
78
|
-
|
|
79
|
-
This Agreement constitutes the entire agreement between the parties with respect
|
|
80
|
-
to the Software and supersedes all prior or contemporaneous understandings.
|
|
7
|
+
See https://zuplo.com/legal/eula for more information.
|
package/README.md
CHANGED
|
@@ -20,3 +20,20 @@ This package includes offline documentation and policy reference content in the
|
|
|
20
20
|
```
|
|
21
21
|
node_modules/zuplo/docs/
|
|
22
22
|
```
|
|
23
|
+
|
|
24
|
+
## Usage data
|
|
25
|
+
|
|
26
|
+
The Zuplo CLI included in this package sends usage data and error reports to
|
|
27
|
+
Zuplo. Usage data includes the command you run, your Zuplo user ID (or, when you
|
|
28
|
+
aren't logged in, an identifier derived from your machine), the account and
|
|
29
|
+
project names you pass, whether it runs in CI, and your Node.js version,
|
|
30
|
+
operating system, CPU architecture, and package manager. To turn this off, set
|
|
31
|
+
`ZUPLO_DO_NOT_TRACK=1`. For how Zuplo handles this data, see the
|
|
32
|
+
[Zuplo Privacy Policy](https://zuplo.com/legal/privacy-policy).
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
Copyright (c) Zuplo, Inc. All rights reserved. Use of this package is governed
|
|
37
|
+
by the [Zuplo Terms of Service](https://zuplo.com/legal/terms), or by a separate
|
|
38
|
+
agreement your company has signed with Zuplo. See `LICENSE.txt` and
|
|
39
|
+
[zuplo.com/legal/eula](https://zuplo.com/legal/eula).
|
|
@@ -19,7 +19,8 @@ file, see the [Zuplo Project Configuration](./zuplo-json.mdx) documentation.
|
|
|
19
19
|
|
|
20
20
|
:::note
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
This compatibility date is the default for new projects. Existing projects keep
|
|
23
|
+
the date set in their `zuplo.jsonc`. To adopt it in an existing project, set
|
|
23
24
|
`"compatibilityDate": "2026-11-06"` in `zuplo.jsonc`, then test the change in a
|
|
24
25
|
preview environment before you deploy to production. For examples and migration
|
|
25
26
|
steps for each change, see the
|
|
@@ -277,9 +278,9 @@ operation's `operationId`.
|
|
|
277
278
|
|
|
278
279
|
:::note
|
|
279
280
|
|
|
280
|
-
This compatibility date
|
|
281
|
-
|
|
282
|
-
of this change.
|
|
281
|
+
This compatibility date was the default for projects created after March 1st,
|
|
282
|
+
2026, until `2026-11-06` became the default. Existing projects should update
|
|
283
|
+
their `zuplo.jsonc` to take advantage of this change.
|
|
283
284
|
|
|
284
285
|
:::
|
|
285
286
|
|
|
@@ -184,6 +184,9 @@ context.log.info("User login", {
|
|
|
184
184
|
});
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
+
To redact sensitive values from every log entry, including logs your code
|
|
188
|
+
doesn't control, register a [telemetry redactor](./telemetry-redaction.mdx).
|
|
189
|
+
|
|
187
190
|
### 4. Use Structured Data for Better Querying
|
|
188
191
|
|
|
189
192
|
```ts
|
|
@@ -322,6 +322,20 @@ export function runtimeInit(runtime: RuntimeExtensions) {
|
|
|
322
322
|
}
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
+
## Telemetry Redaction
|
|
326
|
+
|
|
327
|
+
Use `runtime.addTelemetryRedactor` to remove sensitive data from logs, traces,
|
|
328
|
+
analytics, and audit events before Zuplo records them. See
|
|
329
|
+
[Redact sensitive data from telemetry](./telemetry-redaction.mdx).
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
import { RuntimeExtensions, createRedactor } from "@zuplo/runtime";
|
|
333
|
+
|
|
334
|
+
export function runtimeInit(runtime: RuntimeExtensions) {
|
|
335
|
+
runtime.addTelemetryRedactor(createRedactor({ entities: ["pii", "secret"] }));
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
325
339
|
## Plugin and Handler Extensions
|
|
326
340
|
|
|
327
341
|
Built-in and custom plugins and handlers can expose their own extensibility. For
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Redact Sensitive Data from Telemetry
|
|
3
|
+
sidebar_label: Telemetry Redaction
|
|
4
|
+
applies_to:
|
|
5
|
+
product: gateway
|
|
6
|
+
hosting: all
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Requests that pass through your gateway can carry sensitive data such as card
|
|
10
|
+
numbers, government IDs, and health data. Zuplo records values from each request
|
|
11
|
+
in logs, traces, analytics, and audit events. A telemetry redactor removes
|
|
12
|
+
sensitive data from those values before Zuplo records them.
|
|
13
|
+
|
|
14
|
+
Register a redactor once in `zuplo.runtime.ts`, and every log entry, span,
|
|
15
|
+
analytics record, request logger entry, and audit event passes through it.
|
|
16
|
+
Redaction applies only to what Zuplo records. The request, the response, and the
|
|
17
|
+
values your code reads stay unchanged.
|
|
18
|
+
|
|
19
|
+
```ts title="modules/zuplo.runtime.ts"
|
|
20
|
+
import { RuntimeExtensions, createRedactor } from "@zuplo/runtime";
|
|
21
|
+
|
|
22
|
+
export function runtimeInit(runtime: RuntimeExtensions) {
|
|
23
|
+
runtime.addTelemetryRedactor(
|
|
24
|
+
createRedactor({
|
|
25
|
+
entities: ["pii", "secret"],
|
|
26
|
+
queryParameters: ["iban"],
|
|
27
|
+
fieldNames: ["dob"],
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With this redactor, a request to `/accounts?iban=DE89370400440532013000&page=2`
|
|
34
|
+
whose handler calls
|
|
35
|
+
`context.log.info("charging", { card: "4111 1111 1111 1111", dob: "1990-01-01" })`
|
|
36
|
+
is recorded like this:
|
|
37
|
+
|
|
38
|
+
```diff
|
|
39
|
+
- "url": "https://api.example.com/accounts?iban=DE89370400440532013000&page=2"
|
|
40
|
+
+ "url": "https://api.example.com/accounts?iban=%5BREDACTED%5D&page=2"
|
|
41
|
+
- "messages": ["charging", { "card": "4111 1111 1111 1111", "dob": "1990-01-01" }]
|
|
42
|
+
+ "messages": ["charging", { "card": "[REDACTED]", "dob": "[REDACTED]" }]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The response to the client is the same with or without the redactor.
|
|
46
|
+
|
|
47
|
+
## Register a redactor
|
|
48
|
+
|
|
49
|
+
Call `runtime.addTelemetryRedactor` inside `runtimeInit` in
|
|
50
|
+
[`zuplo.runtime.ts`](./runtime-extensions.mdx). A redactor is either the result
|
|
51
|
+
of [`createRedactor`](#use-the-built-in-redactor) or your own
|
|
52
|
+
[function](#write-a-custom-redactor).
|
|
53
|
+
|
|
54
|
+
- Register redactors only in `runtimeInit`. Calling `addTelemetryRedactor` after
|
|
55
|
+
the gateway starts, for example inside a request hook, throws an error and
|
|
56
|
+
doesn't add the redactor.
|
|
57
|
+
- You can register up to 16 redactors. Registering a 17th throws an error.
|
|
58
|
+
- Passing anything other than a function throws an error.
|
|
59
|
+
|
|
60
|
+
An error thrown in `runtimeInit` stops the gateway from starting, so a
|
|
61
|
+
misconfigured redactor never lets data through unredacted.
|
|
62
|
+
|
|
63
|
+
### Combine several redactors
|
|
64
|
+
|
|
65
|
+
Redactors run in the order you register them. Each redactor receives the output
|
|
66
|
+
of the previous one for the same value.
|
|
67
|
+
|
|
68
|
+
```ts title="modules/zuplo.runtime.ts"
|
|
69
|
+
import { RuntimeExtensions, createRedactor } from "@zuplo/runtime";
|
|
70
|
+
|
|
71
|
+
export function runtimeInit(runtime: RuntimeExtensions) {
|
|
72
|
+
// Runs first: built-in patterns
|
|
73
|
+
runtime.addTelemetryRedactor(
|
|
74
|
+
createRedactor({ entities: ["finance-credit-card", "id-us-ssn"] }),
|
|
75
|
+
);
|
|
76
|
+
// Runs second: receives the output of the first redactor
|
|
77
|
+
runtime.addTelemetryRedactor((value, { key }) =>
|
|
78
|
+
key === "accountNumber" ? "[REDACTED]" : value,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Use the built-in redactor
|
|
84
|
+
|
|
85
|
+
`createRedactor(options)` returns a redactor that applies only the options you
|
|
86
|
+
set. It detects sensitive values with the same built-in data types and groups as
|
|
87
|
+
the [Data Loss Prevention policy](../policies/ai-gateway-dlp-inbound.mdx), so
|
|
88
|
+
`entities: ["pii", "secret"]` selects the same data types in both places.
|
|
89
|
+
|
|
90
|
+
| Option | What it redacts |
|
|
91
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
92
|
+
| `entities` | Matches of built-in data types by ID (`finance-credit-card`, `id-us-ssn`), group (`pii`, `secret`, `region-eu`), or ID prefix (`id-us`, `secret-aws`). When omitted, no built-in data type runs. |
|
|
93
|
+
| `customPatterns` | Matches of your own regular expressions. Each entry is `{ name, pattern, confidence?, context? }`. |
|
|
94
|
+
| `minConfidence` | The confidence, from 0 to 1, a match from `entities` or `customPatterns` needs to be redacted. Defaults to `0.5`. |
|
|
95
|
+
| `allowValues` | Matched text that's never redacted, compared exactly, for example a test card number. |
|
|
96
|
+
| `queryParameters` | The value of each named query parameter wherever a query string appears: request URLs, span attributes such as `url.full`, and URLs inside log messages. Names match case-insensitively, after URL decoding. |
|
|
97
|
+
| `fieldNames` | The whole value of any property whose name is in the list, for example `["password", "dob"]`. Names match case-insensitively. |
|
|
98
|
+
| `replacement` | The text recorded in place of a match. It's used literally. Defaults to `[REDACTED]`. In query parameter values, it's URL-encoded, so `[REDACTED]` is recorded as `%5BREDACTED%5D` and the URL stays valid. |
|
|
99
|
+
|
|
100
|
+
`createRedactor` throws an error in `runtimeInit` for an unknown entity, a
|
|
101
|
+
custom pattern that isn't a valid regular expression, or a `minConfidence`
|
|
102
|
+
outside 0 to 1. A typo stops the gateway from starting instead of silently
|
|
103
|
+
turning redaction off.
|
|
104
|
+
|
|
105
|
+
`fieldNames` redacts a value only when it sits directly under the matching
|
|
106
|
+
property name. In `{ dob: "1990-01-01" }` the value is redacted, but in
|
|
107
|
+
`{ dob: ["1990-01-01"] }` or `{ card: { number: "..." } }` the nested values are
|
|
108
|
+
checked only by the other options. Property names themselves are recorded as
|
|
109
|
+
written.
|
|
110
|
+
|
|
111
|
+
### Custom patterns
|
|
112
|
+
|
|
113
|
+
A custom pattern has a `name`, a regular expression `pattern`, an optional base
|
|
114
|
+
`confidence` (defaults to `0.85`), and optional `context` words. Context words
|
|
115
|
+
that appear near a match in the same value raise its confidence. Use a low
|
|
116
|
+
`confidence` with `context` for values that are sensitive only in context.
|
|
117
|
+
|
|
118
|
+
```ts title="modules/zuplo.runtime.ts"
|
|
119
|
+
import { RuntimeExtensions, createRedactor } from "@zuplo/runtime";
|
|
120
|
+
|
|
121
|
+
export function runtimeInit(runtime: RuntimeExtensions) {
|
|
122
|
+
runtime.addTelemetryRedactor(
|
|
123
|
+
createRedactor({
|
|
124
|
+
entities: ["pii"],
|
|
125
|
+
customPatterns: [
|
|
126
|
+
// Always redacted: confidence 0.85 is above the 0.5 default
|
|
127
|
+
{ name: "member-id", pattern: "MBR-\\d{8}" },
|
|
128
|
+
// Redacted only when "patient" or "mrn" appears nearby
|
|
129
|
+
{
|
|
130
|
+
name: "medical-record-number",
|
|
131
|
+
pattern: "\\b\\d{7}\\b",
|
|
132
|
+
confidence: 0.3,
|
|
133
|
+
context: ["patient", "mrn"],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
allowValues: ["4111 1111 1111 1111"],
|
|
137
|
+
}),
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
:::note
|
|
143
|
+
|
|
144
|
+
Pattern matching can't find every form sensitive data takes. Add a
|
|
145
|
+
[custom redactor](#write-a-custom-redactor) for data that's specific to your
|
|
146
|
+
API.
|
|
147
|
+
|
|
148
|
+
:::
|
|
149
|
+
|
|
150
|
+
## Write a custom redactor
|
|
151
|
+
|
|
152
|
+
A redactor is a synchronous function that takes a string and a context and
|
|
153
|
+
returns the string to record: the input unchanged, or a redacted copy.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
interface TelemetryRedactor {
|
|
157
|
+
(value: string, context: RedactionContext): string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface RedactionContext {
|
|
161
|
+
readonly kind: "log" | "span" | "analytics" | "request-log" | "audit-log";
|
|
162
|
+
readonly field: string;
|
|
163
|
+
readonly key: string | undefined;
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
| Property | Description |
|
|
168
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
169
|
+
| `kind` | The kind of record the value is written to. See [What's redacted](#whats-redacted). |
|
|
170
|
+
| `field` | The path of the value in the record, for example `message[0]`, `message[1].user.email`, `properties.customerId`, `attributes.url.full`, or `url`. |
|
|
171
|
+
| `key` | The last property name in `field`, for example `email` or `url.full`. `undefined` when the value isn't an object property, such as a log message string or array element. |
|
|
172
|
+
|
|
173
|
+
For example, `context.log.info("charging", { card: "4111 1111 1111 1111" })`
|
|
174
|
+
calls the redactor twice:
|
|
175
|
+
|
|
176
|
+
| `value` | `kind` | `field` | `key` |
|
|
177
|
+
| ----------------------- | ------ | ----------------- | ----------- |
|
|
178
|
+
| `"charging"` | `log` | `message[0]` | `undefined` |
|
|
179
|
+
| `"4111 1111 1111 1111"` | `log` | `message[1].card` | `card` |
|
|
180
|
+
|
|
181
|
+
The `url.full` attribute on a span is passed with `kind: "span"`,
|
|
182
|
+
`field: "attributes.url.full"`, and `key: "url.full"`.
|
|
183
|
+
|
|
184
|
+
Use the context to apply a rule to one kind of record or one property:
|
|
185
|
+
|
|
186
|
+
```ts title="modules/zuplo.runtime.ts"
|
|
187
|
+
import { RuntimeExtensions } from "@zuplo/runtime";
|
|
188
|
+
|
|
189
|
+
export function runtimeInit(runtime: RuntimeExtensions) {
|
|
190
|
+
runtime.addTelemetryRedactor((value, { kind, key }) => {
|
|
191
|
+
if (key === "ssn") {
|
|
192
|
+
return "[REDACTED]";
|
|
193
|
+
}
|
|
194
|
+
if (kind === "audit-log" && key === "email") {
|
|
195
|
+
return value.replace(/^[^@]+/, "***");
|
|
196
|
+
}
|
|
197
|
+
return value;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### How values are passed
|
|
203
|
+
|
|
204
|
+
- Objects, arrays, and errors are walked the way the log serializers write them,
|
|
205
|
+
and each string inside is passed to the redactor separately. For an error,
|
|
206
|
+
that includes its message, stack, cause, and custom properties. A `Map` or
|
|
207
|
+
`Set` is recorded the way the serializers print it, usually `{}`.
|
|
208
|
+
- Numbers are passed as their decimal string. If the redactor returns the same
|
|
209
|
+
string, the record keeps the number. If it returns a different string, the
|
|
210
|
+
record holds that string. Dates work the same way, using their serialized
|
|
211
|
+
string.
|
|
212
|
+
- A span attribute array must hold a single type. If the redactor changes any
|
|
213
|
+
number in such an array, every element is recorded as text.
|
|
214
|
+
- When the redacted request URL given to log transports is no longer a valid
|
|
215
|
+
URL, transports receive the original origin followed by `/[REDACTED]`.
|
|
216
|
+
- In audit events, the IP address is left out of the event when the redactor
|
|
217
|
+
changes it.
|
|
218
|
+
|
|
219
|
+
### Keep redactors pure and fast
|
|
220
|
+
|
|
221
|
+
A redactor runs on the request path for every value Zuplo records, so keep it
|
|
222
|
+
fast. It must also be pure: the same value and context must always return the
|
|
223
|
+
same output. Zuplo caches results for values of 256 characters or fewer and can
|
|
224
|
+
reuse an earlier result instead of calling the redactor again.
|
|
225
|
+
|
|
226
|
+
Anything a redactor logs is dropped, so a redactor can't write sensitive values
|
|
227
|
+
into the logs it's meant to protect.
|
|
228
|
+
|
|
229
|
+
## Failures
|
|
230
|
+
|
|
231
|
+
Redaction fails closed. When a redactor throws an error, returns anything other
|
|
232
|
+
than a string, or is `async` (returns a promise), Zuplo records the value as
|
|
233
|
+
`[REDACTION_FAILED]`. Later redactors don't run for that value, and the original
|
|
234
|
+
value is never recorded. The `REDACTION_FAILED_PLACEHOLDER` constant exported
|
|
235
|
+
from `@zuplo/runtime` holds this text.
|
|
236
|
+
|
|
237
|
+
Each failure writes a warning to your gateway's logs, at most once a minute for
|
|
238
|
+
each kind of record:
|
|
239
|
+
|
|
240
|
+
```txt
|
|
241
|
+
A redactor registered with runtime.addTelemetryRedactor threw or did not return a string while redacting a log record. The value was recorded as [REDACTION_FAILED]. Further failures are reported at most once a minute.
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The warning never contains the value or the redactor's error message.
|
|
245
|
+
|
|
246
|
+
## Limits
|
|
247
|
+
|
|
248
|
+
| Limit | Value |
|
|
249
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
250
|
+
| Redactors | 16, registered only in `runtimeInit` |
|
|
251
|
+
| Value length | 32,768 characters. Longer values, and longer redactor output, are cut to that length and marked `[Truncated]`. |
|
|
252
|
+
| Values per record | 10,000, shared by every field of the record. Values past the limit are recorded as `[Truncated]`. |
|
|
253
|
+
| Nesting depth | 20 levels. Deeper values are recorded as `[Truncated]`. |
|
|
254
|
+
| Values that repeat | A value that contains itself is recorded as `[Circular]` where it repeats. |
|
|
255
|
+
|
|
256
|
+
## What's redacted
|
|
257
|
+
|
|
258
|
+
When a redactor is registered, these values pass through it before any log
|
|
259
|
+
transport, tracing exporter, plugin, or Zuplo service receives the record. Every
|
|
260
|
+
destination receives the same redacted record. With no redactor registered,
|
|
261
|
+
records are unchanged.
|
|
262
|
+
|
|
263
|
+
| `kind` | Record | Values passed to the redactor |
|
|
264
|
+
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
265
|
+
| `log` | [Logs](./logger.mdx) from Zuplo and from your code | Every message argument, log properties, custom log fields, and the request URL given to log transports |
|
|
266
|
+
| `span` | [OpenTelemetry](../articles/opentelemetry.mdx) spans | The span name, every attribute, every event name and event attribute, every link attribute, and the status message |
|
|
267
|
+
| `analytics` | [Analytics](../analytics/overview.md) request records and events | The request URL (path and query string), properties your code sets with `setLogProperties`, and the resource URI on analytics events |
|
|
268
|
+
| `request-log` | Request logger plugins: [Azure Blob](../articles/plugin-azure-blob.mdx), [Azure Event Hubs](../articles/plugin-azure-event-hubs.mdx), and [Hydrolix](../articles/plugin-hydrolix-traffic-peak.mdx) | Every value of each entry |
|
|
269
|
+
| `audit-log` | Events from the [Audit Logs policy](../policies/audit-log-inbound.mdx) | Every field except the fields listed in the next section |
|
|
270
|
+
|
|
271
|
+
### Values that aren't redacted
|
|
272
|
+
|
|
273
|
+
Zuplo computes usage, analytics, and billing from some recorded values, and
|
|
274
|
+
generates others itself. These values are always recorded as measured, even when
|
|
275
|
+
a redactor is registered:
|
|
276
|
+
|
|
277
|
+
| Record | Values recorded as measured |
|
|
278
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
279
|
+
| Analytics request record | Route pattern, method, status code, sizes, timings, user, client IP, geographic fields, ray ID, request IDs, and properties Zuplo sets |
|
|
280
|
+
| Analytics events | Every field except the resource URI, including the model, provider, app, team, and consumer that AI Gateway usage is metered by |
|
|
281
|
+
| Audit events | `specversion`, `id`, `time`, `datacontenttype`, `bucketid`, `actortype`, `requestid`, `success`, `httpmethod`, and `httpstatus` |
|
|
282
|
+
|
|
283
|
+
Keep sensitive data out of route paths and user identifiers, because a redactor
|
|
284
|
+
can't remove it from these fields.
|
|
285
|
+
|
|
286
|
+
### Data that redactors don't cover
|
|
287
|
+
|
|
288
|
+
Redactors apply only to records the gateway writes through the paths listed
|
|
289
|
+
earlier. They don't cover:
|
|
290
|
+
|
|
291
|
+
- Data that metering and analytics policies send to their services, such as
|
|
292
|
+
Moesif, ReadMe, Amberflo, and OpenMeter. Those services receive the raw
|
|
293
|
+
values.
|
|
294
|
+
- Request and response bodies sent to Akamai API Security.
|
|
295
|
+
- Output written directly to the console instead of through `context.log`, and
|
|
296
|
+
uncaught errors captured by the hosting platform.
|
|
297
|
+
- Logs written before `runtimeInit` runs.
|
|
298
|
+
- OpenTelemetry resource attributes and other static configuration.
|
|
299
|
+
- Data the gateway stores to serve requests, such as cache entries and rate
|
|
300
|
+
limit keys.
|
|
301
|
+
- Records after they leave the gateway.
|
|
302
|
+
|
|
303
|
+
## Related
|
|
304
|
+
|
|
305
|
+
- [Runtime extensions](./runtime-extensions.mdx)
|
|
306
|
+
- [Logger](./logger.mdx)
|
|
307
|
+
- [OpenTelemetry](../articles/opentelemetry.mdx)
|
|
308
|
+
- [Data Loss Prevention policy](../policies/ai-gateway-dlp-inbound.mdx)
|
|
@@ -19,7 +19,7 @@ of the file is `1`.
|
|
|
19
19
|
```jsonc
|
|
20
20
|
{
|
|
21
21
|
"version": 1,
|
|
22
|
-
"compatibilityDate": "
|
|
22
|
+
"compatibilityDate": "2026-11-06",
|
|
23
23
|
"projectType": "managed-edge",
|
|
24
24
|
}
|
|
25
25
|
```
|
|
@@ -46,7 +46,7 @@ and their changes.
|
|
|
46
46
|
```jsonc
|
|
47
47
|
{
|
|
48
48
|
"version": 1,
|
|
49
|
-
"compatibilityDate": "
|
|
49
|
+
"compatibilityDate": "2026-11-06",
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.15.
|
|
3
|
+
"version": "7.15.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The official Zuplo CLI for local development and platform management",
|
|
6
6
|
"homepage": "https://zuplo.com/docs/cli/overview",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"mcp-gateway"
|
|
18
18
|
],
|
|
19
19
|
"author": "Zuplo, Inc.",
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
21
21
|
"files": [
|
|
22
22
|
"README.md",
|
|
23
23
|
"LICENSE.txt",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"zuplo": "zuplo.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@zuplo/cli": "7.15.
|
|
36
|
-
"@zuplo/core": "7.15.
|
|
37
|
-
"@zuplo/runtime": "7.15.
|
|
38
|
-
"@zuplo/test": "7.15.
|
|
35
|
+
"@zuplo/cli": "7.15.1",
|
|
36
|
+
"@zuplo/core": "7.15.1",
|
|
37
|
+
"@zuplo/runtime": "7.15.1",
|
|
38
|
+
"@zuplo/test": "7.15.1"
|
|
39
39
|
}
|
|
40
40
|
}
|