update secrets posthog event logic

This commit is contained in:
Maidul Islam
2023-08-24 18:48:46 -04:00
parent a1f08b064e
commit 293a62b632
2 changed files with 2 additions and 2 deletions

View File

@@ -973,7 +973,7 @@ export const getSecrets = async (req: Request, res: Response) => {
// reduce the number of events captured
let shouldRecordK8Event = false
if (req.authData instanceof ServiceTokenData && req.authData.userAgent == K8_USER_AGENT_NAME) {
if (req.authData.userAgent == K8_USER_AGENT_NAME) {
const randomNumber = Math.random();
if (randomNumber > 0.9) {
shouldRecordK8Event = true

View File

@@ -571,7 +571,7 @@ export const getSecretsHelper = async ({
// reduce the number of events captured
let shouldRecordK8Event = false
if (authData instanceof ServiceTokenData && authData.userAgent == K8_USER_AGENT_NAME) {
if (authData.userAgent == K8_USER_AGENT_NAME) {
const randomNumber = Math.random();
if (randomNumber > 0.9) {
shouldRecordK8Event = true