Skip to content

Commit 3422984

Browse files
authored
Merge pull request #859 from snyk/fix/sanitize-logs
Fix/sanitize logs
2 parents c684b1c + c169f6d commit 3422984

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/supervisor/metadata-extractor.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ export async function buildMetadataForWorkload(
147147
}
148148

149149
if (!(pod.status && pod.status.containerStatuses)) {
150-
logger.warn({ pod }, 'pod lacks status or status.containerStatus');
150+
logger.warn(
151+
{ podMetadata: pod.metadata },
152+
'pod lacks status or status.containerStatus',
153+
);
151154
return undefined;
152155
}
153156

src/transmitter/proxy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export function getProxyAgent(
5050
});
5151

5252
default:
53-
logger.error({ url, endpoint }, 'Unsupported protocol for proxying');
53+
logger.error(
54+
{ urlHost: url.host, urlProtocol: url.protocol },
55+
'Unsupported protocol for proxying',
56+
);
5457
throw new Error('Unsupported protocol for proxying');
5558
}
5659
}

0 commit comments

Comments
 (0)