File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
2nd-gen/instrument-with-opentelemetry/functions Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1+ # This loads the telemetry library before functions framework because
2+ # The Open Telemetry SDK must be the first thing that runs
3+ NODE_OPTIONS = --require=./tracing.js
Original file line number Diff line number Diff line change @@ -49,11 +49,12 @@ async function calculatePrice(productIds) {
4949async function calculateDiscount ( productIds ) {
5050 const timer = new Timer ( ) ;
5151
52+
5253 let discountUsd = 0 ;
5354 const processConcurrently = sliceIntoChunks ( productIds , 10 )
5455 . map ( async ( productIds ) => {
5556 const discounts = await db . collection ( "discounts" )
56- . where ( "products" , "array-contains" , productIds )
57+ . where ( "products" , "array-contains-any " , productIds )
5758 . get ( ) ;
5859 for ( const discount of discounts . docs ) {
5960 discountUsd += discount . data ( ) . usd || 0 ;
You can’t perform that action at this time.
0 commit comments