Skip to content

Commit ff614cd

Browse files
committed
feat(monitoring): added monitoring part posthog & betterstacklog before better uptime
1 parent 6a40269 commit ff614cd

7 files changed

Lines changed: 17 additions & 20 deletions

File tree

frontend/app/admin/banned-users/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,4 +640,4 @@ export default function BannedUsersPage() {
640640
</div>
641641
</>
642642
);
643-
}
643+
}

frontend/components/PostHogPageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export function PostHogPageView() {
2020
}, [pathname, searchParams]);
2121

2222
return null;
23-
}
23+
}

frontend/components/auth/SignUpForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function SignUpForm() {
5252
const temp_token = res.data.verificationToken;
5353

5454
localStorage.setItem('temp_token', temp_token);
55-
posthog.capture('signup_completed');
55+
posthog.capture('signup_completed');
5656
router.push('/verifyotp');
5757
} catch (error: unknown) {
5858
if (axios.isAxiosError(error)) {

frontend/lib/posthog.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ export const initPostHog = () => {
44
if (typeof window === 'undefined') return;
55

66
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
7-
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST ?? 'https://us.i.posthog.com',
8-
capture_pageview: false,
7+
api_host:
8+
process.env.NEXT_PUBLIC_POSTHOG_HOST ?? 'https://us.i.posthog.com',
9+
capture_pageview: false,
910
capture_pageleave: true,
1011
session_recording: {
11-
maskAllInputs: true,
12+
maskAllInputs: true,
1213
},
1314
});
1415
};
1516

16-
export { posthog };
17+
export { posthog };

frontend/lib/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export default function Providers({ children }: { children: React.ReactNode }) {
2020
{children}
2121
</GoogleOAuthProvider>
2222
);
23-
}
23+
}

live-service/src/config/logger.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import winston from 'winston';
2-
import { Logtail } from '@logtail/node';
3-
import { LogtailTransport } from '@logtail/winston';
2+
import { Logtail } from '@logtail/node';
3+
import { LogtailTransport } from '@logtail/winston';
44

5-
const transports: winston.transport[] = [
6-
new winston.transports.Console(),
7-
];
5+
const transports: winston.transport[] = [new winston.transports.Console()];
86

97
if (process.env.BETTERSTACK_SOURCE_TOKEN) {
108
const logtail = new Logtail(process.env.BETTERSTACK_SOURCE_TOKEN);
@@ -19,4 +17,4 @@ export const logger = winston.createLogger({
1917
),
2018
defaultMeta: { service: 'live-service' },
2119
transports,
22-
});
20+
});

services/auth-service/src/config/logger.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import winston from 'winston';
2-
import { Logtail } from '@logtail/node';
3-
import { LogtailTransport } from '@logtail/winston';
2+
import { Logtail } from '@logtail/node';
3+
import { LogtailTransport } from '@logtail/winston';
44

5-
const transports: winston.transport[] = [
6-
new winston.transports.Console(),
7-
];
5+
const transports: winston.transport[] = [new winston.transports.Console()];
86

97
if (process.env.BETTERSTACK_SOURCE_TOKEN) {
108
const logtail = new Logtail(process.env.BETTERSTACK_SOURCE_TOKEN);
@@ -19,4 +17,4 @@ export const logger = winston.createLogger({
1917
),
2018
defaultMeta: { service: 'auth-service' },
2119
transports,
22-
});
20+
});

0 commit comments

Comments
 (0)