Skip to content
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

chore: 🤖 observability, send client logs to api #401

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
data-domain="app.jelly.xyz"
src="https://plausible.io/js/plausible.js"
></script>
<script
src="https://cdn.jsdelivr.net/gh/megastef/sematext-js-console-logger/index.min.js"
>
sematextLogger("%REACT_APP_LOGS_APP_TOKEN%", 'US')
</script>
</head>
<body>
<noscript
Expand Down
7 changes: 7 additions & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type ConfigParams = {
marketplaceCanisterId: string;
wICPCanisterId: string;
capRouterId: string;
logsAppToken: string;
};

type Config = {
Expand All @@ -23,6 +24,8 @@ type Config = {
test: ConfigParams;
};

const logsAppToken = process.env.REACT_APP_LOGS_APP_TOKEN || '';

const config: Config = {
// The production version
production: {
Expand All @@ -33,6 +36,7 @@ const config: Config = {
marketplaceCanisterId: 'getti-aiaaa-aaaah-abkkq-cai',
wICPCanisterId: 'utozz-siaaa-aaaam-qaaxq-cai',
capRouterId: 'lj532-6iaaa-aaaah-qcc7a-cai',
logsAppToken,
},
// Staging (serverless, local-replica)
// Is similar to the process we have for local development
Expand All @@ -46,6 +50,7 @@ const config: Config = {
marketplaceCanisterId: 'rdmx6-jaaaa-aaaaa-aaadq-cai',
wICPCanisterId: 'qaa6y-5yaaa-aaaaa-aaafa-cai',
capRouterId: 'rrkah-fqaaa-aaaaa-aaaaq-cai',
logsAppToken,
},
// Mainnet test environment
// Provides the Service Canisters published to the Mainnet
Expand All @@ -60,6 +65,7 @@ const config: Config = {
marketplaceCanisterId: 'o3ios-jaaaa-aaaag-qakqq-cai',
wICPCanisterId: 'utozz-siaaa-aaaam-qaaxq-cai',
capRouterId: 'lj532-6iaaa-aaaah-qcc7a-cai',
logsAppToken,
},
// The local development environment settings
development: {
Expand All @@ -70,6 +76,7 @@ const config: Config = {
marketplaceCanisterId: 'rdmx6-jaaaa-aaaaa-aaadq-cai',
wICPCanisterId: 'qaa6y-5yaaa-aaaaa-aaafa-cai',
capRouterId: 'rrkah-fqaaa-aaaaa-aaaaq-cai',
logsAppToken,
},
};

Expand Down