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

Update Sentry Config #435

Closed
wants to merge 0 commits into from
Closed

Update Sentry Config #435

wants to merge 0 commits into from

Conversation

harsh3dev
Copy link
Collaborator

Resolves #370

Copy link
Collaborator

@arkid15r arkid15r left a 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

@@ -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
Copy link
Collaborator

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.

@@ -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
Copy link
Collaborator

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

Suggested change
echo "DJANGO_SENTRY_RELEASE=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend
echo "DJANGO_RELEASE_VERSION=$(echo ${{ github.sha }} | cut -c1-7)" >> .env.backend

@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use existing env

@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "VITE_SENTRY_RELEASE=${{ github.event.release.tag_name }}" >> frontend/.env.production
echo "VITE_RELEASE_VERSION=${{ github.event.release.tag_name }}" >> frontend/.env.production

@@ -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"),
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Sentry configuration
2 participants