Skip to content

Commit 2684ef7

Browse files
authored
Merge pull request #318 from OpenGeoscience/sentry-frontend
Add Sentry error reporting to the frontend
2 parents d86a634 + ec71f21 commit 2684ef7

8 files changed

Lines changed: 1352 additions & 9 deletions

File tree

terraform/django.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "django" {
2020
ec2_worker_ssh_public_key = file("${path.module}/ssh-key.pub")
2121

2222
additional_django_vars = {
23-
DJANGO_UVDAT_WEB_URL = "https://www.geodatalytics.kitware.com/"
23+
DJANGO_UVDAT_WEB_URL = "https://www.geodatalytics.kitware.com/"
2424
DJANGO_DATABASE_POOL_MAX_SIZE = "12"
2525
DJANGO_SENTRY_DSN = "https://5302701c88f1fa6ec056e0c269071191@o267860.ingest.us.sentry.io/4510620385804288"
2626
}

terraform/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
variable "SENTRY_AUTH_TOKEN" {
2+
type = string
3+
nullable = false
4+
sensitive = true
5+
}

terraform/www.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ resource "cloudflare_pages_project" "www" {
3434
environment_variables = local.www_env_vars
3535
}
3636
production {
37-
environment_variables = local.www_env_vars
37+
environment_variables = merge(
38+
local.www_env_vars,
39+
{
40+
VITE_APP_SENTRY_DSN = "https://648b9234b2fc2df0dd59192ddb0111f7@o267860.ingest.us.sentry.io/4511108704501760"
41+
SENTRY_AUTH_TOKEN = var.SENTRY_AUTH_TOKEN
42+
},
43+
)
3844
}
3945
}
4046
}

web/env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ interface ViteTypeOptions {
77
interface ImportMetaEnv {
88
readonly VITE_APP_API_ROOT: string;
99
readonly VITE_APP_VERSION: string;
10+
// This is not set in development
11+
readonly VITE_APP_SENTRY_DSN?: string;
1012
}
1113

1214
interface ImportMeta {

0 commit comments

Comments
 (0)