# Serverless and edge runtimes Serverless and edge runtimes need the same trace identity as long-running services, but their lifecycle changes how telemetry is exported. ## Covered environments - AWS Lambda - Azure Functions - Google Cloud Functions and Cloud Run - Vercel Functions and Edge Runtime - Cloudflare Workers - Netlify Functions - Deno - Bun - container jobs and cron workloads ## Rules 1. Detect whether the platform has an official or community OpenTelemetry auto-instrumentation path before adding manual code. 2. Keep exporter setup outside the hot path where the runtime allows reuse between invocations. 3. Flush or register telemetry work with the platform lifecycle before an invocation is torn down. 4. Keep privileged Telemio keys in server-side environment/secrets only. 5. Use a Collector or gateway when direct export is unreliable, high-volume, or needs policy enforcement. 6. Preserve the incoming trace context for event-driven invocations whenever the trigger carries one. ## CLI ```bash telemio setup lambda --runtime node telemio setup edge --platform cloudflare ```