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

SENTRY_PROJECT missing from deploy.yml #719

Closed
fredericrous opened this issue May 5, 2024 · 10 comments
Closed

SENTRY_PROJECT missing from deploy.yml #719

fredericrous opened this issue May 5, 2024 · 10 comments

Comments

@fredericrous
Copy link
Contributor

It should have been aprox a month or so that you are not getting any sentry info for epic-stack

Here is the error message from epic-stack own repo

#20 2.838 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#20 2.839 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#20 3.118 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#20 3.118 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#20 3.131 [sentry-vite-plugin] Info: Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`.
#20 3.320 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#20 3.320 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#20 3.344 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#20 3.344 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#20 3.348 [sentry-vite-plugin] Info: Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`.

https://github.com/epicweb-dev/epic-stack/actions/runs/8945529892/job/24574702633

The solution I went with on my own project:

@kentcdodds
Copy link
Member

@fredericrous
Copy link
Contributor Author

hey @kentcdodds , thank you for the fast reply. Your message is too succinct for me to understand it. What do you mean by check the docs? is what I'm seeing in your repo normal ? https://github.com/epicweb-dev/epic-stack/actions/runs/8945529892/job/24574702633

@kentcdodds
Copy link
Member

Ah, I misunderstood you. Yeah, we'll want to add a note in the docs about updating the environment variables in GitHub CI and update the action as you said. Could you make a PR?

@kentcdodds kentcdodds reopened this May 5, 2024
@taylrd
Copy link
Contributor

taylrd commented Jun 4, 2024

Im glad Im not the only one banging my head against the wall here, ha! I am having the same issues and now I see that epicweb.dev is getting same Sentry errors


Screenshot 2024-06-04 at 1 01 47 PM

I have added this to the deploy.yml and I'm still getting the same errors in the build log

run:
          flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
          --build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
          --build-secret SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }}
          --build-secret SENTRY_ORG=${{ secrets.SENTRY_ORG }}
#17 24.63 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#17 24.63 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#17 24.73 [sentry-vite-plugin] Warning: No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.
#17 24.73 [sentry-vite-plugin] Warning: No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.
#17 24.75 [sentry-vite-plugin] Info: Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`.
#17 24.79 vite v5.2.12 building SSR bundle for production...
#17 24.79 [sentry-vite-plugin] Info: Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`.

@kentcdodds
Copy link
Member

The reason you are getting those errors in the console is because you have a browser extension or some browser functionality that is blocking sentry.

The reason we're getting those errors in the build is because I forgot to set those environment variables. I'll get that done later.

@taylrd
Copy link
Contributor

taylrd commented Jun 5, 2024

Thanks for the clarification Kent. You are correct, running Incognito there are no console or network errors.

Do you know what is causing the sentry-vite-plugin warning about no org provided?

@kentcdodds
Copy link
Member

You need to add those environment variables. You can either add them here:

--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}

And set those in your actions like you do the private token. Or you could hard-code them in the Dockerfile because those values aren't private.

The docs could probably be updated on this I think.

@taylrd
Copy link
Contributor

taylrd commented Jun 6, 2024

I think I have it working properly now. I would agree the monitoring doc is a little confusing. In case you missed my first comment, I had added the following to https://github.com/epicweb-dev/epic-stack/blob/973d834a32cf4318e2657148a27f805047ed66d3/.github/workflows/deploy.yml#L174

run:
          flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}
          --build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
          --build-secret SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }}
          --build-secret SENTRY_ORG=${{ secrets.SENTRY_ORG }}

I made a change in https://github.com/epicweb-dev/epic-stack/blob/973d834a32cf4318e2657148a27f805047ed66d3/other/Dockerfile#L29 to

# Build the app
FROM base as build

ARG COMMIT_SHA
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PROJECT

ENV COMMIT_SHA=$COMMIT_SHA
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ENV SENTRY_ORG=$SENTRY_ORG
ENV SENTRY_PROJECT=$SENTRY_PROJECT


WORKDIR /myapp

COPY --from=deps /myapp/node_modules /myapp/node_modules

ADD prisma .
RUN npx prisma generate

ADD . .
RUN npm run build

And that seems to work or at least the build errors are gone lol and Sentry is monitoring my app.

@kentcdodds
Copy link
Member

Would you be interested in making a PR to fix things?

@taylrd
Copy link
Contributor

taylrd commented Jun 6, 2024

Done :)

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

No branches or pull requests

3 participants