Skip to content

Commit

Permalink
👷 Improve sentry release detection
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Feb 6, 2023
1 parent d7b5fd7 commit f07bf25
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 100 deletions.
1 change: 1 addition & 0 deletions apps/builder/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const nextConfig = withTM({

const sentryWebpackPluginOptions = {
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
}

module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@giphy/react-components": "6.5.2",
"@googleapis/drive": "4.0.1",
"@lezer/css": "^1.1.1",
"@sentry/nextjs": "7.34.0",
"@sentry/nextjs": "7.36.0",
"@stripe/stripe-js": "1.46.0",
"@tanstack/react-query": "^4.23.0",
"@tanstack/react-table": "8.7.8",
Expand Down
25 changes: 8 additions & 17 deletions apps/builder/sentry.client.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
// This file configures the initialization of Sentry on the browser.
// The config you add here will be used whenever a page is visited.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from '@sentry/nextjs'

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: SENTRY_DSN,
ignoreErrors: ['ResizeObserver loop limit exceeded'],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
beforeBreadcrumb(breadcrumb, hint) {
try {
if (breadcrumb.category?.startsWith('ui')) {
breadcrumb.message = `${hint?.event.target.tagName.toLowerCase()}: ${
hint?.event.target.innerText
}`
}
} catch (e) {
/* empty */
}
return breadcrumb
debug: true,
beforeSend: (event) => {
console.log('[SENTRY] beforeSend event:', event)
return event
},
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
})
11 changes: 4 additions & 7 deletions apps/builder/sentry.server.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// This file configures the initialization of Sentry on the browser.
// The config you add here will be used whenever a page is visited.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from '@sentry/nextjs'

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
ignoreErrors: ['ResizeObserver loop limit exceeded'],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
dsn: SENTRY_DSN,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
})
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ItemNodeContent } from './ItemNodeContent'
import { ItemNodeContextMenu } from './ItemNodeContextMenu'
import { ContextMenu } from '@/components/ContextMenu'
import { setMultipleRefs } from '@/utils/helpers'
import { isDefined } from 'utils'

type Props = {
item: Item
Expand All @@ -39,11 +40,12 @@ export const ItemNode = ({
const itemRef = useRef<HTMLDivElement | null>(null)
const isPreviewing = previewingEdge?.from.itemId === item.id
const isConnectable =
isDefined(typebot) &&
!connectionDisabled &&
!(
typebot?.groups[indices.groupIndex].blocks[
indices.blockIndex
] as ChoiceInputBlock
typebot.groups[indices.groupIndex].blocks[indices.blockIndex] as
| ChoiceInputBlock
| undefined
)?.options?.isMultipleChoice
const onDrag = (position: NodePosition) => {
if (!onMouseDown) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import React, { useEffect, useRef, useState } from 'react'
import { ItemNode } from './ItemNode'
import { SourceEndpoint } from '../../Endpoints'
import { PlaceholderNode } from '../PlaceholderNode'
import { isDefined } from 'utils'

type Props = {
block: BlockWithItems
Expand All @@ -46,7 +47,8 @@ export const ItemNodesList = ({
draggedItem !== undefined && block.items[0].type === draggedItem.type

const isLastBlock =
typebot?.groups[groupIndex].blocks[blockIndex + 1] === undefined
isDefined(typebot) &&
typebot.groups[groupIndex].blocks[blockIndex + 1] === undefined

const [position, setPosition] = useState({
x: 0,
Expand Down
1 change: 1 addition & 0 deletions apps/viewer/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const nextConfig = withTM({

const sentryWebpackPluginOptions = {
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
}

module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
Expand Down
2 changes: 1 addition & 1 deletion apps/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:report": "pnpm playwright show-report"
},
"dependencies": {
"@sentry/nextjs": "7.34.0",
"@sentry/nextjs": "7.36.0",
"@trpc/server": "10.9.0",
"@typebot.io/js": "workspace:*",
"@typebot.io/react": "workspace:*",
Expand Down
6 changes: 4 additions & 2 deletions apps/viewer/sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

import * as Sentry from '@sentry/nextjs'

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: SENTRY_DSN,
ignoreErrors: [
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'ResizeObserver is not defined',
"Can't find variable: ResizeObserver",
],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
})
12 changes: 4 additions & 8 deletions apps/viewer/sentry.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@

import * as Sentry from '@sentry/nextjs'

const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
ignoreErrors: [
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'ResizeObserver is not defined',
"Can't find variable: ResizeObserver",
],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
dsn: SENTRY_DSN,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
})
Loading

4 comments on commit f07bf25

@vercel
Copy link

@vercel vercel bot commented on f07bf25 Feb 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app
docs.typebot.io

@vercel
Copy link

@vercel vercel bot commented on f07bf25 Feb 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on f07bf25 Feb 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

viewer-v2 – ./apps/viewer

an.nigerias.io
app.yvon.earth
ar.nigerias.io
bot.enreso.org
bot.rslabs.pro
bots.bridge.ai
chat.hayuri.id
chicken.cr8.ai
gollum.riku.ai
gsbulletin.com
panther.cr7.ai
panther.cr8.ai
penguin.cr8.ai
talk.gocare.io
ticketfute.com
unicorn.cr8.ai
apo.nigerias.io
apr.nigerias.io
aso.nigerias.io
bot.ageenda.com
bot.artiweb.app
bot.devitus.com
bot.jesopizz.it
bot.reeplai.com
bot.scayver.com
bot.tc-mail.com
chat.lalmon.com
chat.sureb4.com
eventhub.com.au
fitness.riku.ai
games.klujo.com
help.taxtree.io
sakuranembro.it
typebot.aloe.do
bot.contakit.com
bot.piccinato.co
bot.sv-energy.it
botc.ceox.com.br
clo.closeer.work
cockroach.cr8.ai
faqs.nigerias.io
feedback.ofx.one
form.syncwin.com
haymanevents.com
kw.wpwakanda.com
bot.viralsangat.com
bot.winglabs.com.br
carsalesenquiry.com
chat.marius.digital
chatbot.matthesv.de
chatbot.repplai.com
demo.botscientis.us
demo.wemakebots.xyz
kbsub.wpwakanda.com
live.botscientis.us
bot.hotelplayarimini.it
bot.upgradesolutions.eu
bots.baptiste-arnaud.fr
help.comebackreward.com
link.venturasuceder.com
mainmenu.diddancing.com
manualhandlingcourse.ie
register.kandabrand.com
signup.hypemarketing.in
subfooter.wpwakanda.com
survey.hypemarketing.in
testbot.afterorigin.com
91181264.your-access.one
ai.chromebookstoreph.com
form.sergiolimajr.com.br
hunterbot.saleshunter.ai
invite.bridesquadapp.com
link.cascadigital.com.br
onboarding.growthside.io
reward.onlinebotdemo.xyz
stap.venturemarketing.in
type.opaulovieira.com.br
aibot.angrybranding.co.uk
bot.aidigitalmarketing.kr
bot.amicidisanfaustino.it
bot.arraesecenteno.com.br
bot.blackboxsports.com.br
bot.cabinrentalagency.com
bot.fusionstarreviews.com
boyfriend-breakup.riku.ai
brigadeirosemdrama.com.br
chat.ertcrebateportal.com
chat.thehomebuyersusa.com
chat.thisiscrushhouse.com
forms.hiabhaykulkarni.com
healthandsafetycourses.uk
sellmyharleylouisiana.com
testbot.sharemyreview.net
typebot-viewer.vercel.app
verfica.botmachine.com.br
bot.adventureconsulting.hu
casestudyemb.wpwakanda.com
chat.atlasoutfittersk9.com
configurator.bouclidom.com
help.atlasoutfittersk9.com

@vercel
Copy link

@vercel vercel bot commented on f07bf25 Feb 6, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.