Skip to content

531 telemetry client in javascript #532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0b1cff8
adds shared-util package to contain telemetry abstract functions
Dopeamin May 20, 2025
ef43bcc
finishes new util package
Dopeamin May 20, 2025
7f7b505
updates openapi spec
Dopeamin May 20, 2025
531eb2e
adds telemetry service to web-corte
Dopeamin May 20, 2025
bf832ad
adds telemetry to react package
Dopeamin May 21, 2025
586c73d
implements telemetry inside the react package blocks
Dopeamin May 21, 2025
45d5b05
fixes build issues
Dopeamin May 21, 2025
aa1f81f
refactors types
Dopeamin May 22, 2025
7c236ea
update react version
Dopeamin May 22, 2025
748d895
fixes version
Dopeamin May 22, 2025
50450ea
Publish
Dopeamin May 22, 2025
7048236
restores connect packages versions
Dopeamin May 22, 2025
7ede5fe
restores types version
Dopeamin May 22, 2025
c4c3ea1
updates package versions for @corbado/connect-react, @corbado/connect…
Dopeamin May 22, 2025
da8f047
temporarily revert versions
Dopeamin May 22, 2025
d2aec9b
temporarily revert version bump
Dopeamin May 22, 2025
2df4586
fixes publish config
Dopeamin May 22, 2025
b008b96
Update dependencies and implement telemetry event in React example
Dopeamin May 22, 2025
f182f71
Update dependencies, add TelemetryClient component, and implement tel…
Dopeamin May 22, 2025
56656e7
Update index.html structure and enhance shared-util package version t…
Dopeamin May 22, 2025
e083033
Update @corbado/shared-util package version to 1.0.4 and modify build…
Dopeamin May 22, 2025
2289b1d
Update @corbado/shared-util package version to 1.0.5 and modify index…
Dopeamin May 22, 2025
beb7a89
Update @corbado/shared-util package version to 1.0.6, modify esbuild …
Dopeamin May 22, 2025
96a4ced
Update @corbado/shared-util package version to 1.0.7 across multiple …
Dopeamin May 22, 2025
c4bcf54
Update @corbado/shared-util package version to 1.0.8 and remove unuse…
Dopeamin May 22, 2025
323b41b
Update @corbado/shared-util package version to 1.0.8 across all examp…
Dopeamin May 22, 2025
4e8a06e
Update package versions for @corbado/react, @corbado/shared-ui, and @…
Dopeamin May 22, 2025
312e0ab
Refactor telemetry event handling in TelemetryClient component, remov…
Dopeamin May 22, 2025
318d322
Enhance telemetry integration by adding TelemetryConfig to various co…
Dopeamin May 22, 2025
8d089a8
Refactor telemetry handling in CorbadoSessionProvider and FlowHandler…
Dopeamin May 23, 2025
3c3714b
fixes prettier
Dopeamin May 23, 2025
e69a830
Refactor telemetry configuration in CorbadoProvider and update relate…
Dopeamin May 23, 2025
01f3de5
Update package versions and refactor configurations across multiple p…
Dopeamin May 23, 2025
2c08581
simplify vite config
Dopeamin May 23, 2025
ed0835f
fixes prettier
Dopeamin May 23, 2025
ea6611e
Update @corbado/shared-util to version 1.0.9 across multiple examples…
Dopeamin May 23, 2025
05feab4
Update @corbado/shared-util to version 1.0.9 in both react and web-js…
Dopeamin May 23, 2025
db3bf9e
Update package versions for @corbado/react, @corbado/shared-ui, and @…
Dopeamin May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions examples/nextjs/app/components/TelemetryClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use client';

import { sendEvent, TelemetryEventType } from '@corbado/shared-util';
import { useEffect, useRef } from 'react';

export function TelemetryClient() {
const hasSentTelemetry = useRef(false);

useEffect(() => {
if (hasSentTelemetry.current) return;

void sendEvent({
type: TelemetryEventType.EXAMPLE_APPLICATION_OPENED,
payload: {
exampleName: 'corbado/javascript/examples/nextjs',
},
sdkVersion: '3.1.0',
sdkName: 'React SDK',
identifier: process.env.NEXT_PUBLIC_CORBADO_PROJECT_ID!,
});

hasSentTelemetry.current = true;
}, []);

return null;
}
2 changes: 2 additions & 0 deletions examples/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import Image from 'next/image';
import Link from 'next/link';
import { Suspense } from 'react';
import RightIntroSection from './ui/right-intro-section';
import { TelemetryClient } from './components/TelemetryClient';

export default function Page() {
return (
<main className='flex min-h-screen flex-col p-6'>
<TelemetryClient />
<div className='flex h-20 shrink-0 items-end rounded-lg bg-blue-500 p-4 md:h-52'>
<Image
src='/corbado-logo.svg'
Expand Down
Loading
Loading