Skip to content

Commit ff98548

Browse files
authored
Quick fix for build compat (#566)
1 parent 1d53faf commit ff98548

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

‎packages/mcp-server/src/telem/sentry.ts‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { logWarn } from "./logging";
2-
31
interface ScrubPattern {
42
pattern: RegExp;
53
replacement: string;
@@ -97,18 +95,12 @@ export function sentryBeforeSend(event: any, hint: any): any {
9795
// Always scrub the entire event
9896
const [scrubbedEvent, didScrub, descriptions] = scrubValue(event);
9997

100-
// Log if we found and scrubbed sensitive data
98+
// Log to console if we found and scrubbed sensitive data
99+
// (avoiding LogTape dependency for edge/browser compatibility)
101100
if (didScrub) {
102-
// Get unique descriptions
103101
const uniqueDescriptions = [...new Set(descriptions)];
104-
logWarn(
105-
`Event contained sensitive data: ${uniqueDescriptions.join(", ")}`,
106-
{
107-
loggerScope: ["security", "scrubbing"],
108-
extra: {
109-
patterns_matched: uniqueDescriptions,
110-
},
111-
},
102+
console.warn(
103+
`[Sentry] Event contained sensitive data: ${uniqueDescriptions.join(", ")}`,
112104
);
113105
}
114106

0 commit comments

Comments
 (0)