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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: segment not logging in prod #582

Merged
merged 3 commits into from
Oct 29, 2021
Merged

fix: segment not logging in prod #582

merged 3 commits into from
Oct 29, 2021

Conversation

fbwoolf
Copy link
Contributor

@fbwoolf fbwoolf commented Oct 29, 2021

This PR should fix Segment in production 馃 . Moved rendering the snippet into the _document. Now able to use the node env var w/out the NEXT_PUBLIC_ syntax which would expose the write key in the browser.

Issue #571

@fbwoolf fbwoolf linked an issue Oct 29, 2021 that may be closed by this pull request
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Oct 29, 2021

Build failure here is an active issue in webpack and in next tracked here:
webpack/webpack#14532
vercel/next.js#30078

Last suggestion is to downgrade node to 16 in the Dockerfile.

@fbwoolf fbwoolf temporarily deployed to k8s-staging October 29, 2021 18:31 Inactive
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Oct 29, 2021

@CharlieC3 I got the build passing now if you want to test/approve.

@CharlieC3
Copy link
Member

@fbwoolf I believe you're able to deploy to staging. Once you do we can see if it works 馃
https://github.com/hirosystems/explorer/actions/runs/1400138068

@fbwoolf
Copy link
Contributor Author

fbwoolf commented Oct 29, 2021

@fbwoolf I believe you're able to deploy to staging. Once you do we can see if it works 馃 https://github.com/hirosystems/explorer/actions/runs/1400138068

Nope, not logging and Segment script is not in the header. Anything that would be different w/ staging vs production?

@fbwoolf fbwoolf temporarily deployed to k8s-staging October 29, 2021 20:47 Inactive
@CharlieC3
Copy link
Member

@fbwoolf I found an issue with the previous deployment caused by the GH org change. It should be fixed now for future staging deployments, but I had to manually deploy this branch. We'll encounter this issue for prod as well, so I may need to perform the next prod deployment.

When you get a chance can you try it again? fix-segment-prod is running without the SEGMENT_WRITE_KEY env var set.

@fbwoolf
Copy link
Contributor Author

fbwoolf commented Oct 29, 2021

When you get a chance can you try it again? fix-segment-prod is running without the SEGMENT_WRITE_KEY env var set.

Didn't see this and was waiting to deploy again with a change I made, so your fix is likely what got it working I guess. Funny. Anyway, it is working now.

@CharlieC3
Copy link
Member

Still a great success! Also I think the next deployment to prod should work now without intervention. I had to push up 1.17.2 to our new hirosystems Docker org .

Copy link
Member

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

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

:shipit:

@fbwoolf
Copy link
Contributor Author

fbwoolf commented Oct 29, 2021

Thanks, @CharlieC3 for all your help!

@fbwoolf fbwoolf merged commit ed26260 into main Oct 29, 2021
@fbwoolf fbwoolf deleted the fix/segment-prod branch October 29, 2021 21:16
@blockstack-devops
Copy link

馃帀 This PR is included in version 1.17.3 馃帀

The release is available on GitHub release

Your semantic-release bot 馃摝馃殌

@pkellner
Copy link

Thanks for posting this fix. I guess I need to start locking my alpine version to make sure my builds don't crash down the road for infrequently built apps.

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

Successfully merging this pull request may close these issues.

Segment not logging in production
4 participants