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

DM-48101: mobu - sentry in idfdev #4092

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions applications/mobu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Continuous integration testing
| config.metrics.schemaManager.suffix | string | `""` | Suffix to add to all registered subjects. This is sometimes useful for experimentation during development. |
| config.pathPrefix | string | `"/mobu"` | Prefix for mobu's API routes. |
| config.profile | string | `"production"` | One of 'production' or 'development'. 'production' configures structured JSON logging, and 'development' configures unstructured human readable logging. |
| config.sentryEnvironment | string | `nil` | The environment to report to Sentry |
| config.sentryTracesSampleConfig | float | `0` | Sentry tracing config: a float to specify a percentage, or "errors" to send all transactions with errors. |
| config.slackAlerts | bool | `true` | Whether to send alerts and status to Slack. |
| fullnameOverride | string | `""` | Override the full name for resources (includes the release name) |
| global.baseUrl | string | Set by Argo CD | Base URL for the environment |
Expand Down
7 changes: 7 additions & 0 deletions applications/mobu/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ github-refresh-app-webhook-secret:
This value is also configured in the GitHub UI for the matching GitHub
application. If we need to change this value, the Phalanx secret must be
updated, and the value must be changed in the GitHub UI.

sentry-dsn:
description: >-
The Sentry DSN for the mobu 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/mobu/keys/
7 changes: 7 additions & 0 deletions applications/mobu/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ spec:
secretKeyRef:
name: {{ template "mobu.fullname" . }}-gafaelfawr-token
key: "token"
- name: "MOBU_SENTRY_ENVIRONMENT"
value: {{ .Values.global.environmentName }}
- name: "MOBU_SENTRY_DSN"
valueFrom:
secretKeyRef:
name: {{ template "mobu.fullname" . }}-secret
key: "sentry-dsn"
{{- if .Values.config.githubRefreshApp }}
- name: "MOBU_GITHUB_REFRESH_APP_WEBHOOK_SECRET"
valueFrom:
Expand Down
2 changes: 2 additions & 0 deletions applications/mobu/tests/github_ci_app_enabled_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ tests:
suffix: ""
pathPrefix: /mobu
profile: production
sentryEnvironment: null
sentryTracesSampleConfig: 0
slackAlerts: true
2 changes: 2 additions & 0 deletions applications/mobu/tests/github_disabled_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ tests:
suffix: ""
pathPrefix: /mobu
profile: production
sentryEnvironment: null
sentryTracesSampleConfig: 0
slackAlerts: true
- it: "Should not inject GitHub CI app secrets into the Deployment env"
template: "deployment.yaml"
Expand Down
2 changes: 2 additions & 0 deletions applications/mobu/tests/github_refresh_app_enabled_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ tests:
suffix: ""
pathPrefix: /mobu
profile: production
sentryEnvironment: null
sentryTracesSampleConfig: 0
slackAlerts: true
4 changes: 4 additions & 0 deletions applications/mobu/values-idfdev.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
image:
tag: tickets-DM-48101-sentry-take3
pullPolicy: Always
config:
logLevel: DEBUG
profile: development
metrics:
enabled: true
sentryTracesSampleConfig: errors
githubRefreshApp:
acceptedGithubOrgs:
- lsst-sqre
Expand Down
7 changes: 7 additions & 0 deletions applications/mobu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ config:
# @default -- disabled.
githubCiApp: null

# -- The environment to report to Sentry
sentryEnvironment: null

# -- Sentry tracing config: a float to specify a percentage, or "errors" to
# send all transactions with errors.
sentryTracesSampleConfig: 0.0

# -- Log level. Set to 'DEBUG' to include the output from all flocks in the
# main mobu log.
logLevel: INFO
Expand Down
2 changes: 2 additions & 0 deletions environments/templates/applications/infrastructure/mobu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
value: "https://{{ .Values.fqdn }}"
- name: "global.vaultSecretsPath"
value: {{ .Values.vaultPathPrefix | quote }}
- name: "global.environmentName"
value: {{ .Values.name | quote }}
valueFiles:
- "values.yaml"
- "values-{{ .Values.name }}.yaml"
Expand Down
Loading