How to monitor errors and performance in Cloud Functions with Open Telemetry
summary
Cloud Functions for Firebase runs with native GCP integrations like Cloud Logging and Cloud Trace and is instrumented with OpenTelemetry to emit structured logs, custom metrics, and traces. Traces reveal a tail latency caused by over 100 sequential Firestore queries; switching to array-contains-any (batching up to 10 IDs) plus concurrent Promise.all requests cuts a 6+ second 99th percentile to ~100 ms. Instrumentation and exporters to Google Cloud fixing the issue.
AI-written summary · about
chapters (4)
related talks
39mPerformance for Conversion! Use Distributed Tracing to Pinpoint Bottlenecks
35mGoogle Cloud Functions and Firebase
39mEfficient Debugging and Logging with OpenTelemetry in Go
32mChasing performance issues methodically
15mFix performance pitfalls and level up your app with Firebase
49mGet silly with serverless
54mFocus on Your Code, Not Infrastructure, with Google Cloud Functions
55mServerless Applications with Firebase
