diff --git a/applications/mobu/README.md b/applications/mobu/README.md index 233b45bc17..9d3a0936fa 100644 --- a/applications/mobu/README.md +++ b/applications/mobu/README.md @@ -14,7 +14,7 @@ Continuous integration testing |-----|------|---------|-------------| | affinity | object | `{}` | Affinity rules for the mobu frontend pod | | config.autostart | list | `[]` | Autostart specification. Must be a list of mobu flock specifications. Each flock listed will be automatically started when mobu is started. | -| config.githubCiApp | string | disabled. | Configuration for the GitHub refresh app integration. See https://mobu.lsst.io/operations/github_ci_app.html#add-phalanx-configuration | +| config.githubCiApp | string | disabled. | Configuration for the GitHub CI app integration. See https://mobu.lsst.io/operations/github_ci_app.html#add-phalanx-configuration | | config.githubRefreshApp | string | disabled. | Configuration for the GitHub refresh app integration. See https://mobu.lsst.io/operations/github_refresh_app.html#add-phalanx-configuration | | config.logLevel | string | `"INFO"` | Log level. Set to 'DEBUG' to include the output from all flocks in the main mobu log. | | config.metrics.application | string | `"mobu"` | Name under which to log metrics. Generally there is no reason to change this. | @@ -24,6 +24,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 | diff --git a/applications/mobu/secrets.yaml b/applications/mobu/secrets.yaml index c9257c8e5a..92e1b15e18 100644 --- a/applications/mobu/secrets.yaml +++ b/applications/mobu/secrets.yaml @@ -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/ diff --git a/applications/mobu/templates/deployment.yaml b/applications/mobu/templates/deployment.yaml index bbc6df1ca4..85b8670a32 100644 --- a/applications/mobu/templates/deployment.yaml +++ b/applications/mobu/templates/deployment.yaml @@ -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: diff --git a/applications/mobu/values-idfdev.yaml b/applications/mobu/values-idfdev.yaml index 9d242e4c9c..b482544afc 100644 --- a/applications/mobu/values-idfdev.yaml +++ b/applications/mobu/values-idfdev.yaml @@ -6,6 +6,8 @@ config: profile: development metrics: enabled: true + sentryEnvironment: idfdev + sentryTracesSampleConfig: errors githubRefreshApp: acceptedGithubOrgs: - lsst-sqre diff --git a/applications/mobu/values.yaml b/applications/mobu/values.yaml index f0ac9fed58..ad2acdd3a3 100644 --- a/applications/mobu/values.yaml +++ b/applications/mobu/values.yaml @@ -32,11 +32,17 @@ config: githubRefreshApp: null # -- Configuration for the GitHub CI app integration. - # -- Configuration for the GitHub refresh app integration. # See https://mobu.lsst.io/operations/github_ci_app.html#add-phalanx-configuration # @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 diff --git a/environments/templates/applications/infrastructure/mobu.yaml b/environments/templates/applications/infrastructure/mobu.yaml index 8ac75ca7d2..553db0b03b 100644 --- a/environments/templates/applications/infrastructure/mobu.yaml +++ b/environments/templates/applications/infrastructure/mobu.yaml @@ -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"