diff --git a/packages/phone-number-privacy/combiner/src/common/handlers.ts b/packages/phone-number-privacy/combiner/src/common/handlers.ts index c675534b8f4..e9717e2820a 100644 --- a/packages/phone-number-privacy/combiner/src/common/handlers.ts +++ b/packages/phone-number-privacy/combiner/src/common/handlers.ts @@ -57,6 +57,7 @@ export function meteringHandler( const eventLoopLag = Date.now() - eventLoopLagMeasurementStart logger.info({ eventLoopLag }, 'Measure event loop lag') }) + // TODO:(soloseng): session ID may not always exist const startMark = `Begin ${req.url}/${req.body.sessionID}` const endMark = `End ${req.url}/${req.body.sessionID}` const entryName = `${req.url}/${req.body.sessionID} latency` diff --git a/packages/phone-number-privacy/combiner/src/index.ts b/packages/phone-number-privacy/combiner/src/index.ts index fd86e715439..9fc648cbad0 100644 --- a/packages/phone-number-privacy/combiner/src/index.ts +++ b/packages/phone-number-privacy/combiner/src/index.ts @@ -1,5 +1,4 @@ -import { getContractKitWithAgent } from '@celo/phone-number-privacy-common' -import { setGlobalOptions } from 'firebase-functions/v2' +import { getContractKit } from '@celo/phone-number-privacy-common' import * as functions from 'firebase-functions/v2/https' import config from './config' import { startCombiner } from './server' @@ -7,10 +6,14 @@ import { blockchainApiKey, minInstancesConfig, requestConcurency } from './utils require('dotenv').config() -setGlobalOptions({ region: 'us-central1' }) - export const combinerGen2 = functions.onRequest( - { minInstances: minInstancesConfig, secrets: [blockchainApiKey], concurrency: requestConcurency }, - startCombiner(config, getContractKitWithAgent(config.blockchain)) + { + minInstances: minInstancesConfig, + secrets: [blockchainApiKey], + concurrency: requestConcurency, + memory: '512MiB', + region: 'us-central1', + }, + startCombiner(config, getContractKit(config.blockchain)) ) export * from './config'