Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(webapp,redis-worker): stop logging raw metadata, alert payloads, and job items#4403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
carderne
merged 6 commits into
main
from
fix/redact-run-metadata-alert-worker-logs-sec-395Jul 29, 2026
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
802e613
fix(webapp,redis-worker): stop logging raw metadata, alert payloads, …
carderne cdacca5
fix(webapp): sanitize metadata and webhook error logs
carderne 747eea4
chore: add redis worker changeset
carderne c9e570a
fix(webapp): reuse validated metadata byte length
carderne 8652947
format
carderne bcec492
Delete .changeset/redact-worker-logs.md
carderne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 20 additions & 9 deletions
29 apps/webapp/app/services/metadata/updateMetadata.server.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 39 additions & 11 deletions
50 apps/webapp/app/v3/services/alerts/deliverAlert.server.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -140,7 +140,7 @@ class Worker<TCatalog extends WorkerCatalog> { | ||
| > = new Map(); | ||
| constructor(private options: WorkerOptions<TCatalog>) { | ||
| this.logger = options.logger ?? new Logger("Worker", "debug"); | ||
| this.logger = options.logger ?? new Logger("Worker", "debug", ["item"]); | ||
carderne marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| this.tracer = options.tracer ?? trace.getTracer(options.name); | ||
| this.meter = options.meter ?? metrics.getMeter(options.name); | ||
| @@ -608,7 +608,8 @@ class Worker<TCatalog extends WorkerCatalog> { | ||
| this.logger.error("Unhandled error in processItem:", { | ||
| error: err, | ||
| workerId, | ||
| item, | ||
| id: queueItem.id, | ||
| job: queueItem.job, | ||
| }); | ||
| } | ||
| ); | ||
| @@ -933,11 +934,12 @@ class Worker<TCatalog extends WorkerCatalog> { | ||
| const errorLogLevel = | ||
| error && typeof error === "object" && "logLevel" in error ? error.logLevel : undefined; | ||
| // Never include the raw item/payload here: it is job data that may be | ||
| // customer-controlled. It is retrievable via `getJob(id)` if needed for triage. | ||
| const logAttributes = { | ||
| name: this.options.name, | ||
| id, | ||
| job, | ||
| item, | ||
| visibilityTimeoutMs, | ||
| error, | ||
| errorMessage, | ||
| @@ -994,7 +996,6 @@ class Worker<TCatalog extends WorkerCatalog> { | ||
| name: this.options.name, | ||
| id, | ||
| job, | ||
| item, | ||
| retryDate, | ||
| retryDelay, | ||
| visibilityTimeoutMs, | ||
| @@ -1015,7 +1016,6 @@ class Worker<TCatalog extends WorkerCatalog> { | ||
| name: this.options.name, | ||
| id, | ||
| job, | ||
| item, | ||
| visibilityTimeoutMs, | ||
| error: requeueError, | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.