Integrate sentry with google cloud functions running express

I am trying to integrate sentry with GCP, however I did not find enough documentation if I used express instead of GCP’s handler.

Here’s the code that I use to init my web API.

// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
import functions = require('firebase-functions')

import express = require('express')
import cors = require('cors')
import { APP_VERSION } from '../modules/appInfo'
import { RUNTIME_OPTS } from '../modules/constants'
import { api } from '../applications/webApi/api'

const main = express()
main.use(cors({ origin: true })) // ALLOW CORS FOR ALL ENDPOINTS
main.use('/api/v1', api)
main.use(express.urlencoded({ extended: false }))

export const httpWebApi = functions.runWith(RUNTIME_OPTS).https.onRequest(main)


I am not sure how to wrap them with sentry. Please help.