-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update Sentry Config #435
Update Sentry Config #435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just needs some clean up
.github/workflows/ci-cd.yaml
Outdated
@@ -209,6 +209,8 @@ jobs: | |||
echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" >> frontend/.env.staging | |||
echo "VITE_ENVIRONMENT=${{ secrets.VITE_ENVIRONMENT }}" >> frontend/.env.staging | |||
echo "VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> frontend/.env.staging | |||
echo "VITE_SENTRY_RELEASE=$(echo ${{ github.sha }} | cut -c1-7)" >> frontend/.env.staging | |||
echo "VITE_SENTRY_ENVIRONMENT=staging" >> frontend/.env.staging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the existing environment variable for that, no need to introduce a new one for Sentry.
.github/workflows/ci-cd.yaml
Outdated
@@ -262,6 +264,8 @@ jobs: | |||
echo "DJANGO_OPEN_AI_SECRET_KEY=${{ secrets.DJANGO_OPEN_AI_SECRET_KEY }}" >> .env.backend | |||
echo "DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }}" >> .env.backend | |||
echo "DJANGO_SENTRY_DSN=${{ secrets.DJANGO_SENTRY_DSN }}" >> .env.backend | |||
echo "DJANGO_SENTRY_RELEASE=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a more common name
echo "DJANGO_SENTRY_RELEASE=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend | |
echo "DJANGO_RELEASE_VERSION=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend |
.github/workflows/ci-cd.yaml
Outdated
@@ -262,6 +264,8 @@ jobs: | |||
echo "DJANGO_OPEN_AI_SECRET_KEY=${{ secrets.DJANGO_OPEN_AI_SECRET_KEY }}" >> .env.backend | |||
echo "DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }}" >> .env.backend | |||
echo "DJANGO_SENTRY_DSN=${{ secrets.DJANGO_SENTRY_DSN }}" >> .env.backend | |||
echo "DJANGO_SENTRY_RELEASE=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend | |||
echo "DJANGO_SENTRY_ENVIRONMENT=staging" >> .env.backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use existing env
.github/workflows/ci-cd.yaml
Outdated
@@ -321,6 +325,13 @@ jobs: | |||
echo "VITE_API_URL=https://nest.owasp.org/api/v1" >> frontend/.env.production | |||
echo "VITE_ENVIRONMENT=production" >> frontend/.env.production | |||
echo "VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> frontend/.env.production | |||
echo "VITE_SENTRY_RELEASE=${{ github.event.release.tag_name }}" >> frontend/.env.production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "VITE_SENTRY_RELEASE=${{ github.event.release.tag_name }}" >> frontend/.env.production | |
echo "VITE_RELEASE_VERSION=${{ github.event.release.tag_name }}" >> frontend/.env.production |
backend/settings/staging.py
Outdated
@@ -13,6 +13,7 @@ class Staging(Base): | |||
dsn=values.SecretValue(environ_name="SENTRY_DSN"), | |||
traces_sample_rate=0.5, | |||
profiles_sample_rate=0.5, | |||
environment=values.SecretValue(environ_name="SENTRY_ENVIRONMENT"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the version here too.
858fc61
to
49d107a
Compare
Resolves #370