mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 23:27:35 +00:00
update secrets posthog event logic
This commit is contained in:
@@ -973,7 +973,7 @@ export const getSecrets = async (req: Request, res: Response) => {
|
|||||||
|
|
||||||
// reduce the number of events captured
|
// reduce the number of events captured
|
||||||
let shouldRecordK8Event = false
|
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();
|
const randomNumber = Math.random();
|
||||||
if (randomNumber > 0.9) {
|
if (randomNumber > 0.9) {
|
||||||
shouldRecordK8Event = true
|
shouldRecordK8Event = true
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ export const getSecretsHelper = async ({
|
|||||||
|
|
||||||
// reduce the number of events captured
|
// reduce the number of events captured
|
||||||
let shouldRecordK8Event = false
|
let shouldRecordK8Event = false
|
||||||
if (authData instanceof ServiceTokenData && authData.userAgent == K8_USER_AGENT_NAME) {
|
if (authData.userAgent == K8_USER_AGENT_NAME) {
|
||||||
const randomNumber = Math.random();
|
const randomNumber = Math.random();
|
||||||
if (randomNumber > 0.9) {
|
if (randomNumber > 0.9) {
|
||||||
shouldRecordK8Event = true
|
shouldRecordK8Event = true
|
||||||
|
|||||||
Reference in New Issue
Block a user