Skip to content

Commit

Permalink
DM-48476: times-square Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
fajpunk committed Jan 17, 2025
1 parent 7a733de commit 5b2689c
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions applications/times-square/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ An API service for managing and rendering parameterized Jupyter notebooks.
| config.profile | string | `"production"` | Run profile: "production" or "development" |
| config.redisCacheUrl | string | Points to embedded Redis | URL for Redis html / noteburst job cache database |
| config.redisQueueUrl | string | Points to embedded Redis | URL for Redis arq queue database |
| config.sentryTracesSampleRate | float | `0` | |
| config.updateSchema | bool | false to disable schema upgrades | Whether to run the database migration job |
| config.worker.enableLivenessCheck | bool | `true` | Enable liveness checks for the arq queue |
| fullnameOverride | string | `""` | Override the full name for resources (includes the release name) |
| global.baseUrl | string | Set by times-square Argo CD Application | Base URL for the environment |
| global.enviromentName | string | Set by times-square Argo CD Application | Name of enviroment |
| global.host | string | Set by times-square Argo CD Application | Host name for ingress |
| global.vaultSecretsPathPrefix | string | Set by times-square Argo CD Application | Base path for Vault secrets |
| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the times-square image |
Expand Down
5 changes: 5 additions & 0 deletions applications/times-square/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ TS_SLACK_WEBHOOK_URL:
copy:
application: mobu
key: app-alert-webhook
TS_SENTRY_DSN:
description: >-
The Sentry DSN for the the times-square Sentry project.
This is a URL that includes an authentication token that tells the Sentry SDK where to send events.
It can be found here: https://rubin-observatory.sentry.io/settings/projects/times-square/keys/
2 changes: 2 additions & 0 deletions applications/times-square/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ data:
SAFIR_PROFILE: {{ .Values.config.profile | quote }}
SAFIR_LOG_LEVEL: {{ .Values.config.logLevel | quote }}
TS_ENVIRONMENT_URL: {{ .Values.global.baseUrl | quote }}
TS_ENVIRONMENT_NAME: {{ .Values.global.environmentName | quote }}
TS_PATH_PREFIX: {{ .Values.ingress.path }}
TS_DATABASE_URL: {{ required "config.databaseUrl must be set" .Values.config.databaseUrl | quote }}
TS_REDIS_URL: {{ required "config.redisCacheUrl must be set" .Values.config.redisCacheUrl | quote }}
Expand All @@ -18,3 +19,4 @@ data:
TS_GITHUB_ORGS: {{ .Values.config.githubOrgs | quote }}
TS_CHECK_RUN_TIMEOUT: {{ .Values.config.githubCheckRunTimeout | quote }}
TS_DEFAULT_EXECUTION_TIMEOUT: {{ .Values.config.defaultExecutionTimeout | quote }}
TS_SENTRY_TRACES_SAMPLE_RATE: {{ .Values.config.sentryTracesSampleRate | quote }}
9 changes: 7 additions & 2 deletions applications/times-square/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: /
path: /healthcheck
port: http
readinessProbe:
httpGet:
path: /
path: /healthcheck
port: http
resources:
{{- toYaml .Values.resources.timesSquare | nindent 12 }}
Expand Down Expand Up @@ -121,6 +121,11 @@ spec:
secretKeyRef:
name: {{ template "times-square.fullname" . }}-secret
key: "TS_SLACK_WEBHOOK_URL"
- name: "TS_SENTRY_DSN"
valueFrom:
secretKeyRef:
name: {{ template "times-square.fullname" . }}-secret
key: "TS_SENTRY_DSN"
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions applications/times-square/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ spec:
secretKeyRef:
name: {{ template "times-square.fullname" . }}-secret
key: "TS_SLACK_WEBHOOK_URL"
- name: "TS_SENTRY_DSN"
valueFrom:
secretKeyRef:
name: {{ template "times-square.fullname" . }}-secret
key: "TS_SENTRY_DSN"
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions applications/times-square/values-idfdev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config:
enableGitHubApp: "True"
githubCheckRunTimeout: "600" # 10 minutes
defaultExecutionTimeout: "60" # 1 minute
sentryTracesSampleRate: 1.0
cloudsql:
enabled: true
instanceConnectionName: "science-platform-dev-7696:us-central1:science-platform-dev-e9e11de2"
Expand Down
7 changes: 7 additions & 0 deletions applications/times-square/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ config:
# -- Default execution timeout for notebooks in seconds
defaultExecutionTimeout: "300" # 5 minutes

# Sentry tracing sample rate
sentryTracesSampleRate: 0.0

worker:
# -- Enable liveness checks for the arq queue
enableLivenessCheck: true
Expand Down Expand Up @@ -229,6 +232,10 @@ global:
# @default -- Set by times-square Argo CD Application
baseUrl: ""

# -- Name of enviroment
# @default -- Set by times-square Argo CD Application
enviromentName: ""

# -- Host name for ingress
# @default -- Set by times-square Argo CD Application
host: ""
Expand Down
2 changes: 2 additions & 0 deletions environments/templates/applications/rsp/times-square.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
value: "https://{{ .Values.fqdn }}"
- name: "global.vaultSecretsPathPrefix"
value: {{ .Values.vaultPathPrefix | quote }}
- name: "global.environmentName"
value: {{ .Values.name | quote }}
valueFiles:
- "values.yaml"
- "values-{{ .Values.name }}.yaml"
Expand Down

0 comments on commit 5b2689c

Please sign in to comment.